Skip to content

Used to submit single or batch transactions to Gnosis Safe Wallets.

Notifications You must be signed in to change notification settings

jake-sanjuan/gnosis-tx-submitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gnosis Transaction Submitter

Used to submit transactions via scripts to the Gnosis UI.

Installation

npm i gnosis-tx-submitter

OR

yarn add gnosis-tx-submitter

Usage

To start using the transaction submitter, import sendTransaction() and Transaction into your script

import { sendTransaction, Transaction } from "gnosis-tx-submitter";

In order to actually submit a transaction, a safe address, an array of Transaction objects, a private key, an Alchemy key, and a chainId must be passed into the sendTransaction() function. The values will be value in Ether, and can be set to 0 if no Ether is being sent.

const tx: Transaction[] = [
  {
    transactionTargetAddress: "0x9e0bcE7ec474B481492610eB9dd5D69EB03718D5",
    transactionValue: zero,
    transactionData: "0xab"
  },
  {
    transactionTargetAddress: "0x9e0bcE7ec474B481492610eB9dd5D69EB03718D5",
    transactionValue: zero,
    transactionData: "0xbc"
  }
];

const safeAddress = "0xabc...";
const privateKey = "1ab...";
const alchemyKey = "V1m...";
const chainId = 1

await sendTransaction(
    safeAddress,
    tx,
    privateKey,
    alchemyKey,
    chainId
)

The transaction submitter currently supports mainnet, rinkeby, goerli, optimism, polygon and arbitrum chains.

About

Used to submit single or batch transactions to Gnosis Safe Wallets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published