Transfer the Testnet BNB available in the contract below to your BSC address.
Contract Address:
0xE3A479c9C8352Aff75750944056afa0ecA1840cC
Contract Code:
pragma solidity 0.8.0;
contract Test{
function transferFunds(address _address, bytes calldata _payload) external{
(bool status,) = _address.delegatecall(_payload);
require(status, "Forwarded call failed.");
}
}
Script in JS to execute a transaction using Metamask which interacts with Aave’s smart contract and deposits ERC20 token to the Aave’s smart contract by calling the deposit/supply method.
- Clone the repository
git clone https://github.com/b9aurav/plena-task.git
cd plena-task
- Install required packages
npm install
- Execute task 1
// Enter your account address in .env file before execution
node task1.js
- Execute task 2
// Enter required details in task2.js file before execution
node task2.js