var Contract = require('web3-eth-contract');

// set provider for all later instances to use
Contract.setProvider('ws://localhost:8546');

var contract = new Contract(jsonInterface, address);

contract.methods.somFunc().send({from: ....})
.on('receipt', function(){
...
});

Feb 14, 2022, 12:02 AM
But in BSC mainnet
Feb 14, 2022, 12:02 AM
You need to hook up your contravt instance to your wallet
Someone needs to sign the transaction
(The account that is transferring the tokens)
Feb 14, 2022, 12:03 AM
And instead of somFunc i put transfer or transferFrom
Feb 14, 2022, 12:03 AM
Will follow up via DM
Feb 14, 2022, 12:12 AM

© 2024 Draquery.com All rights reserved.