arjunaskykok / gnosis-safe-web3-startup

The code for the tutorial on how to use the Gnosis Safe SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specifying version of packges

ilijapet opened this issue · comments

commented

I was following your tutorial regarding Gnosis Safe on [https://blog.logrocket.com/build-treasury-wallet-multisignature-gnosis-safe/] And first of all I want to thank you for detail guide in this process!

Beside that I want to inform you that I found one small issue when I try to follow your instructions: I found if we install dependencies yarn add @gnosis.pm/safe-core-sdk @gnosis.pm/safe-ethers-lib without specifying version, yarn will install @gnosis.pm/safe-core-sdk^3.1.1 gnosis.pm/safe-ethers-lib^1.6.1 and this will cause error when we try to run index.js

Instead I think we should specify version of packages (as you have here in your github repo packages.json) yarn add @gnosis.pm/safe-core-sdk@2.0.0 @gnosis.pm/safe-ethers-lib@1.0.0 and this will be ok for forge install safe-global/safe-contracts@v1.3.0-libs.0 or as you propose to git clone safe-contracts and then to checkout to right version.

If you don't install right version of safe-core-sdk and safe-ethers-lib you will get follwoing error =>

Fundraising.
Initial balance of the treasury: 10.0 ETH
TypeError: Cannot read properties of undefined (reading 'to') at standardizeSafeTransactionData (/home/ilijapet/fluidNFT/prism/lib/safe-contracts/node_modules/@gnosis.pm/safe-core-sdk/dist/src/utils/transactions/utils.js:22:16) at Safe.createTransaction (/home/ilijapet/fluidNFT/prism/lib/safe-contracts/node_modules/@gnosis.pm/safe-core-sdk/dist/src/Safe.js:238:90)at main (/home/ilijapet/fluidNFT/prism/lib/safe-contracts/index.js:84:46) at processTicksAndRejections (node:internal/process/task_queues:96:5)

That is why my prposal is just to update your blog and instead

yarn add @gnosis.pm/safe-core-sdk @gnosis.pm/safe-ethers-lib

to write:

yarn add @gnosis.pm/safe-core-sdk@2.0.0 @gnosis.pm/safe-ethers-lib@1.0.0

Thanks ones again for grate post!!

Hi @ilijapet, yeah, I forgot to lock the versions. Thanks for reporting it. I'll try to contact LogRocket to see whether I can update the article or not. As you can see, I'm the guest writer.

commented

Ok, perfect!

best regards!