From e079719cf2fddfcb5426b57c7832f520414d370c Mon Sep 17 00:00:00 2001 From: Cesar Date: Thu, 4 Jan 2024 02:09:17 -0300 Subject: [PATCH] Use fixed bytes for addresses --- precompile/contracts/rewardmanager/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/precompile/contracts/rewardmanager/config.go b/precompile/contracts/rewardmanager/config.go index 6c0d892f28..9bf53a0242 100644 --- a/precompile/contracts/rewardmanager/config.go +++ b/precompile/contracts/rewardmanager/config.go @@ -31,7 +31,7 @@ func (u *InitialRewardConfig) MarshalBinary() ([]byte, error) { if p.Err != nil { return nil, p.Err } - p.PackBytes(u.RewardAddress[:]) + p.PackFixedBytes(u.RewardAddress[:]) return p.Bytes, p.Err } @@ -43,7 +43,7 @@ func (u *InitialRewardConfig) UnmarshalBinary(data []byte) error { if p.Err != nil { return p.Err } - u.RewardAddress = common.BytesToAddress(p.UnpackBytes()) + u.RewardAddress = common.BytesToAddress(p.UnpackFixedBytes(common.AddressLength)) if p.Err != nil { return p.Err }