mirror of
https://github.com/forta-network/go-multicall.git
synced 2026-05-17 13:36:38 +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
|
CallName string
|
||||||
Contract *Contract
|
Contract *Contract
|
||||||
Method string
|
Method string
|
||||||
|
Extend any
|
||||||
Inputs []any
|
Inputs []any
|
||||||
Outputs any
|
Outputs any
|
||||||
CanFail bool
|
CanFail bool
|
||||||
|
|
@ -67,6 +68,15 @@ func (call *Call) Name(name string) *Call {
|
||||||
return 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
|
// AllowFailure sets if the call is allowed to fail. This helps avoiding a revert
|
||||||
// when one of the calls in the array fails.
|
// when one of the calls in the array fails.
|
||||||
func (call *Call) AllowFailure() *Call {
|
func (call *Call) AllowFailure() *Call {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue