1 vote
Accepted

Error calling collaborator contract

you are not far from the answer, check your testContract.setDependency(testDependency); to be replaced with await testContract.setDependency(testDependency.address);
user avatar
1 vote

How to call a contract's method via web3 1.x without a node (sign with a privateKey and send)?

Assuming you have a proper Web3 instance setup, the below is how I generally make contract calls from the server using a class (or where you have a fixed key that requires no user input). I use an ...
user avatar
1 vote
Accepted

Can external solidity functions get called within the same contract dynamically?

Is it a valid call or we need to add public modifier to mooz ? It is a valid call, but it's a strange usecase though. You do not need to add public and in fact, you can't. It would trigger a compiler ...
user avatar
  • 4,909
1 vote

How does a single getter call get chosen by a node if there's no reward associated?

Only transactions are distributed to the miners to be executed. The calls to view functions are executed by the web3 provider. If you run your own node the query will be executed locally, if you use a ...
user avatar
  • 29.2k
1 vote

How to get value of a contract public property using web3.eth

None of the other answers work for me. This does: import Web3 from "web3"; const address = "0xe9e7..."; const abi = "[{..."; const web3 = new Web3(); // pass your ...
user avatar
  • 111
1 vote

Pass a function as a parameter in Solidity

For anyone coming from google looking for a quick example of how to pass a function as a parameter, check out the following code excerpt (source https://docs.soliditylang.org/en/latest/types.html#...
user avatar
  • 123

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