mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi: fixed rebasing errors in method sig
This commit is contained in:
parent
362a486475
commit
4434cb4d0a
1 changed files with 11 additions and 0 deletions
|
|
@ -130,3 +130,14 @@ func NewMethod(name string, rawName string, mutability string, isConst, isPayabl
|
||||||
func (method Method) String() string {
|
func (method Method) String() string {
|
||||||
return method.str
|
return method.str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsConstant returns the indicator whether the method is read-only.
|
||||||
|
func (method Method) IsConstant() bool {
|
||||||
|
return method.StateMutability == "view" || method.StateMutability == "pure" || method.Constant
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsPayable returns the indicator whether the method can process
|
||||||
|
// plain ether transfers.
|
||||||
|
func (method Method) IsPayable() bool {
|
||||||
|
return method.StateMutability == "payable" || method.Payable
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue