1

Solidity has a StackTooDeepException. This means that you can only have 16 local variables at any given time. Scoping, in this sense, allows the contract to create local variables within a specific scope (for example, within brackets {...}), and then destroy them within that scope. The reason this is important is because the newly created/destroyed variable ...


1

I'll paste an example from web3 docs for you to take a look myContract.methods.myMethod(123) .call({from:'0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'}) .then(function(result){ console.log(result) }); I also think that you need to change new Contract to new web3.eth.Contract if you are using the current version of web3.


Only top voted, non community-wiki answers of a minimum length are eligible