accounts/abi: fixed rebasing errors in method sig

This commit is contained in:
Marius van der Wijden 2020-04-15 11:30:12 +02:00
parent 362a486475
commit 4434cb4d0a

View file

@ -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
}