mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi: minor fixes
This commit is contained in:
parent
e2973474d4
commit
5ab8562a85
2 changed files with 6 additions and 6 deletions
|
|
@ -172,7 +172,7 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {
|
|||
case "fallback":
|
||||
// New introduced function type in v0.6.0, check more detail
|
||||
// here https://solidity.readthedocs.io/en/v0.6.0/contracts.html#fallback-function
|
||||
if abi.Fallback.Name != "" {
|
||||
if abi.Fallback.Fallback {
|
||||
return errors.New("only single fallback is allowed")
|
||||
}
|
||||
abi.Fallback = Method{
|
||||
|
|
@ -195,7 +195,7 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {
|
|||
case "receive":
|
||||
// New introduced function type in v0.6.0, check more detail
|
||||
// here https://solidity.readthedocs.io/en/v0.6.0/contracts.html#fallback-function
|
||||
if abi.Receive.Name != "" {
|
||||
if abi.Receive.Receive {
|
||||
return errors.New("only single receive is allowed")
|
||||
}
|
||||
if field.StateMutability != "payable" {
|
||||
|
|
|
|||
|
|
@ -361,14 +361,14 @@ var (
|
|||
return _{{$contract.Type}}.contract.RawTransact(opts, calldata)
|
||||
}
|
||||
|
||||
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||||
//
|
||||
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||||
//
|
||||
// Solidity: {{formatmethod .Fallback.Original $structs}}
|
||||
func (_{{$contract.Type}} *{{$contract.Type}}Session) Fallback(calldata []byte) (*types.Transaction, error) {
|
||||
return _{{$contract.Type}}.Contract.Fallback(&_{{$contract.Type}}.TransactOpts, calldata)
|
||||
}
|
||||
|
||||
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||||
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||||
//
|
||||
// Solidity: {{formatmethod .Fallback.Original $structs}}
|
||||
func (_{{$contract.Type}} *{{$contract.Type}}TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) {
|
||||
|
|
@ -385,7 +385,7 @@ var (
|
|||
}
|
||||
|
||||
// Receive is a paid mutator transaction binding the contract receive function.
|
||||
//
|
||||
//
|
||||
// Solidity: {{formatmethod .Receive.Original $structs}}
|
||||
func (_{{$contract.Type}} *{{$contract.Type}}Session) Receive() (*types.Transaction, error) {
|
||||
return _{{$contract.Type}}.Contract.Receive(&_{{$contract.Type}}.TransactOpts)
|
||||
|
|
|
|||
Loading…
Reference in a new issue