Learning Truffle

Hey @Narsi1111, hope you are well.

Please provide any details of the error, could be an screenshot of the terminal. :face_with_monocle:

Carlos Z

Hey @GahuckImGoofy, hope you are ok.

Please take a look into this post, which explain how to send the proper constructor parameters from the migration file to deploy the contract properly:

Carlos Z

1 Like

Hi all,

I tried to interact with the multisig wallet contract using the Truffle console but I came across the following errors shown in the screenshots:

truffle develop error 1

truffle develop error 2

What needs to be done first in order to interact with the multisig wallet contract using the Truffle console?

1 Like

Thank you very much! After I posted I tried to dig here in the forum some more and found what I needed. Your conversation with @Joey was very helpful!

1 Like

Untitled

1 Like

its comming like that i hav e trying uninstall and re intstall and force also could uou please help

1 Like

Hey @BUILTOCKCHAIN , hope you are ok.

Please take a look into this post, which explain how to send the proper constructor parameters from the migration file to deploy the contract properly:

Carlos Z

1 Like

The ā€œvulnerabilitiesā€ warning message is just that, a warning message, you could either try to solve them (by running npm audit fix, which i do not advice for your case) or just ignore them (also the ā€œWARNā€, they are warning messages about an error in the module that you are downloading, but will not affect the procedure of it).

Carlos Z

In the video when he says you can run the truffle download in your command prompt or terminal does he mean
the nodejs?

Just to continue the conversation of truffle  I downloaded the node js version 14.17.6 and then i went to truffle and pasted the installation code 
npm install -g truffle into the node js
and things didn't work. look forward to your response on both matters

type or paste code here
```![image|690x401](upload://bDoyju3NFSGQ816rXe4eMxrPKEh.png)

Hi how did you attach your picture here? iā€™m trying to put a picture of my problem but donā€™t know how to attach a picture

screenshot to help fellow forum member

Thank you for your help, Carlos!

run the command
truffle
if it does not show you a list of commands run the install on truffle again and then run
audit fix

image

Hi Carlos please find attach the message i got

1 Like

thank for you help in this matter

Hey guys,
I had some problem installing truffle at first, then I found this youtube video: https://www.youtube.com/watch?v=nPLx3rSZPXI

Basically you run this command ā€œsudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}ā€

This seems to have solved my problems :slight_smile:

Using the wallet project, I have a function to find the balance of an address in the wallet contract, and one to find the balance of the contract itself, but Iā€™m looking for the Remix equivalent finding these balances:

Screen Shot 2021-09-26 at 7.29.25 PM

How do you check the balance of an address when testing with Truffle? Do you need to write a function in the contract to ā€œgetBalanceā€ of an account outside the wallet?

The command you are using is incorrect, it should be npm install -g truffle

Carlos Z

In the truffle console, you can use:

let balance = await web3.eth.getBalance(accounts[0])

then calling the balance variable will return the balance of that address, keep in mind that accounts its an array of accounts with funds created by truffle when you run its local node (truffle develop).

Carlos Z

1 Like