To use:
git clone https://github.com/Hacker-DAO/calling-variations.git
- Read the two contracts in
calling-variations/contracts
. They illustrate three different ways theCalling
contract can call the two functions on theCalled
contract. - Decide what the value of the storage variable
uint data
will be on theCalling
contract after calling each of its six functionscastThenCallOk
,abiEncodeThenCallOk
, etc.. - Write down your answers.
- Look at
calling-variations/test/calling.js
for the correct answers. - Run the tests to verify this:
cd calling-variations
npm install
npx hardhat test