Skip to content

Commit

Permalink
fix: sw3 [debug]
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Nov 24, 2023
1 parent ea63f70 commit 6a98dab
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/beekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
K3S_VERSION: "v1.22.17+k3s1"
REPLICA: 3
RUN_TYPE: "PR RUN"
SETUP_CONTRACT_IMAGE_TAG: "2.0.5"
SETUP_CONTRACT_IMAGE_TAG: "2.0.6"
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/ethereum/go-ethereum v1.13.4
github.com/ethersphere/go-price-oracle-abi v0.2.0
github.com/ethersphere/go-storage-incentives-abi v0.6.1-rc3
github.com/ethersphere/go-sw3-abi v0.5.4
github.com/ethersphere/go-sw3-abi v0.6.1
github.com/ethersphere/langos v1.0.0
github.com/go-playground/validator/v10 v10.11.1
github.com/gogo/protobuf v1.3.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ github.com/ethersphere/go-price-oracle-abi v0.2.0 h1:wtIcYLgNZHY4BjYwJCnu93SvJdV
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.6.1-rc3 h1:qvVPM1UUel3yJMAxSxEWjBo4sIo3HSCOXdcNrBVSizI=
github.com/ethersphere/go-storage-incentives-abi v0.6.1-rc3/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc=
github.com/ethersphere/go-sw3-abi v0.5.4 h1:unO7lCzrgUH7gu3qAB34ljqtDc/aRD+Jp1wjCfLXvbk=
github.com/ethersphere/go-sw3-abi v0.5.4/go.mod h1:BmpsvJ8idQZdYEtWnvxA8POYQ8Rl/NhyCdF0zLMOOJU=
github.com/ethersphere/go-sw3-abi v0.6.1 h1:Ki8tOs9bmDQx3XX/eBf+M9kgjLxXuhb4DiyZKYX3XeU=
github.com/ethersphere/go-sw3-abi v0.6.1/go.mod h1:BmpsvJ8idQZdYEtWnvxA8POYQ8Rl/NhyCdF0zLMOOJU=
github.com/ethersphere/langos v1.0.0 h1:NBtNKzXTTRSue95uOlzPN4py7Aofs0xWPzyj4AI1Vcc=
github.com/ethersphere/langos v1.0.0/go.mod h1:dlcN2j4O8sQ+BlCaxeBu43bgr4RQ+inJ+pHwLeZg5Tw=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/node/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func (m noOpChainBackend) Metrics() []prometheus.Collector {
}

func (m noOpChainBackend) CodeAt(context.Context, common.Address, *big.Int) ([]byte, error) {
return common.FromHex(sw3abi.SimpleSwapFactoryDeployedBinv0_5_4), nil
return common.FromHex(sw3abi.SimpleSwapFactoryDeployedBinv0_6_1), nil
}
func (m noOpChainBackend) CallContract(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error) {
return nil, errors.New("disabled chain backend")
Expand Down
2 changes: 1 addition & 1 deletion pkg/postage/postagecontract/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
var (
BucketDepth = uint8(16)

erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_5_4)
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_6_1)

ErrBatchCreate = errors.New("batch creation failed")
ErrInsufficientFunds = errors.New("insufficient token balance")
Expand Down
2 changes: 1 addition & 1 deletion pkg/settlement/swap/chequebook/cashout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

var (
chequebookABI = abiutil.MustParseABI(sw3abi.ERC20SimpleSwapABIv0_5_4)
chequebookABI = abiutil.MustParseABI(sw3abi.ERC20SimpleSwapABIv0_6_1)
chequeCashedEventType = chequebookABI.Events["ChequeCashed"]
chequeBouncedEventType = chequebookABI.Events["ChequeBounced"]
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/settlement/swap/chequebook/chequebook.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var (
// ErrInsufficientFunds is the error when the chequebook has not enough free funds for a user action
ErrInsufficientFunds = errors.New("insufficient token balance")

chequebookABI = abiutil.MustParseABI(sw3abi.ERC20SimpleSwapABIv0_5_4)
chequebookABI = abiutil.MustParseABI(sw3abi.ERC20SimpleSwapABIv0_6_1)
chequeCashedEventType = chequebookABI.Events["ChequeCashed"]
chequeBouncedEventType = chequebookABI.Events["ChequeBounced"]
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/settlement/swap/chequebook/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
ErrNotDeployedByFactory = errors.New("chequebook not deployed by factory")
errDecodeABI = errors.New("could not decode abi data")

factoryABI = abiutil.MustParseABI(sw3abi.SimpleSwapFactoryABIv0_5_4)
factoryABI = abiutil.MustParseABI(sw3abi.SimpleSwapFactoryABIv0_6_1)
simpleSwapDeployedEventType = factoryABI.Events["SimpleSwapDeployed"]
)

Expand Down Expand Up @@ -54,7 +54,7 @@ type simpleSwapDeployedEvent struct {
}

// the bytecode of factories which can be used for deployment
var currentDeployVersion = common.FromHex(sw3abi.SimpleSwapFactoryDeployedBinv0_5_4)
var currentDeployVersion = common.FromHex(sw3abi.SimpleSwapFactoryDeployedBinv0_6_1)

// the bytecode of factories from which we accept chequebooks
var supportedVersions = [][]byte{
Expand Down
12 changes: 6 additions & 6 deletions pkg/settlement/swap/chequebook/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

var (
factoryABI = abiutil.MustParseABI(sw3abi.SimpleSwapFactoryABIv0_5_4)
factoryABI = abiutil.MustParseABI(sw3abi.SimpleSwapFactoryABIv0_6_1)
simpleSwapDeployedEvent = factoryABI.Events["SimpleSwapDeployed"]
)

Expand Down Expand Up @@ -82,9 +82,9 @@ func TestFactoryVerifySelf(t *testing.T) {

factory := chequebook.NewFactory(
backendWithCodeAt(map[common.Address]string{
factoryAddress: sw3abi.SimpleSwapFactoryDeployedBinv0_5_4,
legacyFactory1: sw3abi.SimpleSwapFactoryDeployedBinv0_5_4,
legacyFactory2: sw3abi.SimpleSwapFactoryDeployedBinv0_5_4,
factoryAddress: sw3abi.SimpleSwapFactoryDeployedBinv0_6_1,
legacyFactory1: sw3abi.SimpleSwapFactoryDeployedBinv0_6_1,
legacyFactory2: sw3abi.SimpleSwapFactoryDeployedBinv0_6_1,
}),
transactionmock.New(),
factoryAddress,
Expand Down Expand Up @@ -123,8 +123,8 @@ func TestFactoryVerifySelf(t *testing.T) {

factory := chequebook.NewFactory(
backendWithCodeAt(map[common.Address]string{
factoryAddress: sw3abi.SimpleSwapFactoryDeployedBinv0_5_4,
legacyFactory1: sw3abi.SimpleSwapFactoryDeployedBinv0_5_4,
factoryAddress: sw3abi.SimpleSwapFactoryDeployedBinv0_6_1,
legacyFactory1: sw3abi.SimpleSwapFactoryDeployedBinv0_6_1,
legacyFactory2: "abcd",
}),
transactionmock.New(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/settlement/swap/erc20/erc20.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

var (
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_5_4)
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_6_1)
errDecodeABI = errors.New("could not decode abi data")
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/settlement/swap/erc20/erc20_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

var (
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_5_4)
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_6_1)
)

func TestBalanceOf(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/storageincentives/staking/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
var (
MinimumStakeAmount = big.NewInt(100000000000000000)

erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_5_4)
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_6_1)

ErrInsufficientStakeAmount = errors.New("insufficient stake amount")
ErrInsufficientFunds = errors.New("insufficient token balance")
Expand Down
2 changes: 1 addition & 1 deletion pkg/transaction/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

var (
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_5_4)
erc20ABI = abiutil.MustParseABI(sw3abi.ERC20ABIv0_6_1)
)

type transferEvent struct {
Expand Down

0 comments on commit 6a98dab

Please sign in to comment.