Closed mlemos closed 2 years ago
I'm trying to interact with a payable function/method in a contract. But I'm not sure on how to specify the value on the code and I'm getting this error:
Basically I don't know how to define the value in a payable transaction with a contract.
My ABI is like this:
"function bet(uint256[] max) payable returns (bool)"
And I'm calling the like this:
if (contract == null) { contract = Contract( address, Interface(abi), provider!.getSigner(), ); } final tx = await contract.send( 'bet', [max], );
Any help is welcome!
Define override property in send method to be not null.
override
send
Example.
final tx = await contract.send( 'somePaybleFunction', [], TransactionOverride(value: BigInt.from(1)), );
I'm trying to interact with a payable function/method in a contract. But I'm not sure on how to specify the value on the code and I'm getting this error:
Basically I don't know how to define the value in a payable transaction with a contract.
My ABI is like this:
"function bet(uint256[] max) payable returns (bool)"
And I'm calling the like this:
Any help is welcome!