Skip to content

Use ABI package for Pack/Unpack in all precompiles  #510

@ceyonur

Description

@ceyonur

Context and scope
We have recently added new methods to ABI package to Pack/Unpack inputs and outputs for precompiles. However we only used them in the recent reward manager precompile and embedded into the precompile gen template. We should use them in the old precompiles without breaking backward compatible to ensure consistency.

We have also realized that our old packers does not support extra padded bytes in this issue. We should also start using "non strict mode" inputs when we handle byte inputs.

Discussion and alternatives
We should be changing any input/output packing in old precompiles like native minter, fee config manager etc with the ones in ABI package. See rewardmanager/contrac.go to see how it uses the ABI for pack/unpack.

Open questions
Maintaining backward compatibility is crucial here.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done 🎉

Relationships

None yet

Development

No branches or pull requests

Issue actions