1.0.6 • Published 1 year ago

safe-wrapped-contract v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Package to interact with smart contracts with Gnosis Safe

For those wishing to use Gnosis safes headlessly to propose new txs or deploy contracts

Usage

  • Install the package yarn add -D safe-wrapped-contract
  • Import in the script file import { getSafeWrappedContract } from "safe-wrapped-contract";
  • Call the getSafeWrappedContract function and it will return a new contract. Simply interact with the contract and the new tx(s) will be shown on the Safe UI.

Caveat

The tx(s) submitted are required to be successful, or a "GS013" error will be shown. See Safe contracts

Test

The following test procedure simulates how a project uses this package

  1. run yarn link in root
  2. cd test/project && yarn
  3. Run yarn link safe-wrapped-contract to link to local package, if getting cannot find module, make sure to build first in root
  4. yarn test --network <NETWORK>
  5. see the results on the Safe UI
  6. (Optional) Test proxy contracts using delegate calls yarn hardhat run scripts/testSafeWrappedDelegateCall.ts --network <NETWORK>
  • if package's code is changed, run yarn build in root to rebuild the package
  • after testing, run yarn unlink safe-wrapped-contract in test/project, then yarn unlink in root.

Publish

Run yarn publish

Info

Goerli safe service url: https://safe-transaction-goerli.safe.global

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago