GetGeneralPaymasterInput will fail due to the underlying behavior of the github.com/ethereum/go-ethereum/accounts/abi library which expects an input as bytes instead of types.GeneralPaymasterInput.
π Reproduction Steps
GetGeneralPaymasterInput(types.GeneralPaymasterInput{}) should return an error.
π€ Expected Behavior
It shouldn't return an error :)
π― Current Behavior
It returns an error :)
Fix
The underlying ABI library expects the arguments to come in as []byte{}, since it uses reflect to check the type of the parameters passed. We were able to hack this around by passing []byte{} manually:
π Bug Report for zksync2-go Go SDK
π Description
GetGeneralPaymasterInput
will fail due to the underlying behavior of thegithub.com/ethereum/go-ethereum/accounts/abi
library which expects an input as bytes instead oftypes.GeneralPaymasterInput
.π Reproduction Steps
GetGeneralPaymasterInput(types.GeneralPaymasterInput{})
should return an error.π€ Expected Behavior
It shouldn't return an error :)
π― Current Behavior
It returns an error :)
Fix
The underlying ABI library expects the arguments to come in as
[]byte{}
, since it usesreflect
to check the type of the parameters passed. We were able to hack this around by passing[]byte{}
manually:Of course this fix should be adapted to supporting the current code.