Skip to content

Commit

Permalink
chore: upgrade abi version (#4780)
Browse files Browse the repository at this point in the history
  • Loading branch information
istae authored Aug 27, 2024
1 parent a0d2879 commit 4b07887
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/beekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
REPLICA: 3
RUN_TYPE: "PR RUN"
SETUP_CONTRACT_IMAGE: "ethersphere/bee-localchain"
SETUP_CONTRACT_IMAGE_TAG: "0.9.1-rc1"
SETUP_CONTRACT_IMAGE_TAG: "0.9.1-rc3"
BEELOCAL_BRANCH: "main"
BEEKEEPER_BRANCH: "master"
BEEKEEPER_METRICS_ENABLED: false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/coreos/go-semver v0.3.0
github.com/ethereum/go-ethereum v1.14.3
github.com/ethersphere/go-price-oracle-abi v0.2.0
github.com/ethersphere/go-storage-incentives-abi v0.9.1-rc1
github.com/ethersphere/go-storage-incentives-abi v0.9.1-rc3
github.com/ethersphere/go-sw3-abi v0.6.5
github.com/ethersphere/langos v1.0.0
github.com/go-playground/validator/v10 v10.11.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ github.com/ethereum/go-ethereum v1.14.3 h1:5zvnAqLtnCZrU9uod1JCvHWJbPMURzYFHfc2e
github.com/ethereum/go-ethereum v1.14.3/go.mod h1:1STrq471D0BQbCX9He0hUj4bHxX2k6mt5nOQJhDNOJ8=
github.com/ethersphere/go-price-oracle-abi v0.2.0 h1:wtIcYLgNZHY4BjYwJCnu93SvJdVAZVvBaKinspyyHvQ=
github.com/ethersphere/go-price-oracle-abi v0.2.0/go.mod h1:sI/Qj4/zJ23/b1enzwMMv0/hLTpPNVNacEwCWjo6yBk=
github.com/ethersphere/go-storage-incentives-abi v0.9.1-rc1 h1:+BfZEv0zIN9MKQeRsZG/y3KruIuPlHHaG01oJ2wAvNA=
github.com/ethersphere/go-storage-incentives-abi v0.9.1-rc1/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc=
github.com/ethersphere/go-storage-incentives-abi v0.9.1-rc3 h1:cROwOEgT4L+C0qsx4IV/eCD1ruSlOMIyfemUTWzQwAQ=
github.com/ethersphere/go-storage-incentives-abi v0.9.1-rc3/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc=
github.com/ethersphere/go-sw3-abi v0.6.5 h1:M5dcIe1zQYvGpY2K07UNkNU9Obc4U+A1fz68Ho/Q+XE=
github.com/ethersphere/go-sw3-abi v0.6.5/go.mod h1:BmpsvJ8idQZdYEtWnvxA8POYQ8Rl/NhyCdF0zLMOOJU=
github.com/ethersphere/langos v1.0.0 h1:NBtNKzXTTRSue95uOlzPN4py7Aofs0xWPzyj4AI1Vcc=
Expand Down
6 changes: 3 additions & 3 deletions pkg/storageincentives/staking/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var (
ErrInsufficientStake = errors.New("insufficient stake")
ErrNotImplemented = errors.New("not implemented")
ErrNotPaused = errors.New("contract is not paused")
ErrUnexpectedLength = errors.New("unexpected results length")

approveDescription = "Approve tokens for stake deposit operations"
depositStakeDescription = "Deposit Stake"
Expand Down Expand Up @@ -322,14 +323,13 @@ func (c *contract) getPotentialStake(ctx context.Context) (*big.Int, error) {
// committedStake uint256,
// potentialStake uint256,
// lastUpdatedBlockNumber uint256,
// isValue bool
results, err := c.stakingContractABI.Unpack("stakes", result)
if err != nil {
return nil, err
}

if len(results) < 5 {
return nil, errors.New("unexpected empty results")
if len(results) < 4 {
return nil, ErrUnexpectedLength
}

return abi.ConvertType(results[2], new(big.Int)).(*big.Int), nil
Expand Down

0 comments on commit 4b07887

Please sign in to comment.