accounts/abi: implement new fallback functions (#20764)

* accounts/abi: implement new fackball functions

In Solidity v0.6.0, the original fallback is separated
into two different sub types: fallback and receive.

This PR addes the support for parsing new format abi
and the relevant abigen functionalities.

* accounts/abi: fix unit tests

* accounts/abi: minor fixes

* accounts/abi, mobile: support jave binding

* accounts/abi: address marius's comment

* accounts/abi: Work around the uin64 conversion issue

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
This commit is contained in:
gary rong
2020-04-15 15:23:58 +08:00
committed by GitHub
parent 2a836bb259
commit 00064ddcfb
12 changed files with 445 additions and 94 deletions

View File

@ -197,6 +197,15 @@ func (c *BoundContract) Transact(opts *TransactOpts, method string, args *Interf
return &Transaction{rawTx}, nil
}
// RawTransact invokes the (paid) contract method with raw calldata as input values.
func (c *BoundContract) RawTransact(opts *TransactOpts, calldata []byte) (tx *Transaction, _ error) {
rawTx, err := c.contract.RawTransact(&opts.opts, calldata)
if err != nil {
return nil, err
}
return &Transaction{rawTx}, nil
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (c *BoundContract) Transfer(opts *TransactOpts) (tx *Transaction, _ error) {