Create Simple Calculator Sender
Create a contract that sends multiple parameters of a function
Now, our goal is to create a dApp that works as a cross-Avalanche L1 Calculator, receiving multiple parameters and using those for a calculation. For now our calculator will only have the Sum
function.
Create Sender Contract
On the Fuji C-Chain, we need to create the sender part of our cross-chain calculator. This will send two numbers (uint) to the receiver contract on the Dispatch test L1.
To increase the readability of the code, we have created a helper function encodeAddData
that encodes the two numbers into a single byte array.
Save the Sender Contract Address
Overwrite the SENDER_ADDRESS
environment variable with the new address:
Is this guide helpful?