mirror of
https://github.com/forta-network/go-multicall.git
synced 2026-02-26 15:47:23 +00:00
Support extension parameter return as is
This commit is contained in:
parent
12c2d287e9
commit
4ca4148863
1 changed files with 10 additions and 0 deletions
10
call.go
10
call.go
|
|
@ -42,6 +42,7 @@ type Call struct {
|
|||
CallName string
|
||||
Contract *Contract
|
||||
Method string
|
||||
Extend any
|
||||
Inputs []any
|
||||
Outputs any
|
||||
CanFail bool
|
||||
|
|
@ -67,6 +68,15 @@ func (call *Call) Name(name string) *Call {
|
|||
return call
|
||||
}
|
||||
|
||||
func (call *Call) SetExtend(ext any) *Call {
|
||||
call.Extend = ext
|
||||
return call
|
||||
}
|
||||
|
||||
func (call *Call) UnpackResult() []interface{} {
|
||||
return call.Outputs.([]interface{})
|
||||
}
|
||||
|
||||
// AllowFailure sets if the call is allowed to fail. This helps avoiding a revert
|
||||
// when one of the calls in the array fails.
|
||||
func (call *Call) AllowFailure() *Call {
|
||||
|
|
|
|||
Loading…
Reference in a new issue