Trx
const oneEthInWei = '1000000000000000000';
const sEthAddress = '0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5';
const provider = window.ethereum;
(async function() {
console.log('Supplying ETH to the Belugas Loan...');
// Mint some aBNB by supplying ETH to the Belugas Loan
const trx = await Belugas.eth.trx(
sEthAddress,
'function mint() payable',
[],
{
provider,
value: oneEthInWei
}
);
// const result = await trx.wait(1); // JSON object of trx info, once mined
console.log('Ethers.js transaction object', trx);
})().catch(console.error);Last updated