From 4278b8bd7e1c3086a1972d99037542438cc5c09f Mon Sep 17 00:00:00 2001 From: Brian Stafford Date: Mon, 3 Jun 2024 18:48:32 -0500 Subject: [PATCH] deploy testnet and mainnet contracts --- client/asset/eth/deploy.go | 60 ++++--- client/asset/eth/eth.go | 54 ++++-- client/asset/polygon/polygon.go | 2 +- .../erc20/contracts/updatecontract.sh | 21 +-- .../erc20/contracts/v0/BinRuntimeV0.go | 6 - dex/networks/erc20/contracts/v0/contract.go | 7 +- .../erc20/contracts/v0/swap_contract.bin | Bin 0 -> 3730 bytes .../erc20/contracts/v0/token_contract.bin | Bin 0 -> 2717 bytes .../erc20/contracts/v1/BinRuntimeV1.go | 6 - .../erc20/contracts/v1/swap_contract.bin | Bin 0 -> 4361 bytes .../erc20/contracts/v1/token_contract.bin | Bin 0 -> 2717 bytes .../eth/contracts/build-multibalance.sh | 17 +- .../multibalance/BinRuntimeMultiBalanceV0.go | 6 - .../eth/contracts/multibalance/contract.bin | Bin 0 -> 1187 bytes dex/networks/eth/contracts/updatecontract.sh | 17 +- dex/networks/eth/contracts/v0/BinRuntimeV0.go | 6 - dex/networks/eth/contracts/v0/contract.bin | Bin 0 -> 2970 bytes dex/networks/eth/contracts/v0/contract.go | 2 +- dex/networks/eth/contracts/v1/BinRuntimeV1.go | 6 - dex/networks/eth/contracts/v1/contract.bin | Bin 0 -> 3602 bytes dex/networks/eth/params.go | 4 +- dex/networks/eth/tokens.go | 124 +++++++++++--- dex/networks/polygon/params.go | 156 +++++++++++++++++- dex/testing/dcrdex/harness.sh | 2 - dex/testing/eth/harness.sh | 16 +- dex/testing/polygon/harness.sh | 47 ++++-- dex/testing/walletpair/walletpair.sh | 2 +- server/asset/eth/coiner_test.go | 2 - server/cmd/dcrdex/evm-protocol-overrides.json | 11 +- 29 files changed, 397 insertions(+), 177 deletions(-) delete mode 100644 dex/networks/erc20/contracts/v0/BinRuntimeV0.go create mode 100644 dex/networks/erc20/contracts/v0/swap_contract.bin create mode 100644 dex/networks/erc20/contracts/v0/token_contract.bin delete mode 100644 dex/networks/erc20/contracts/v1/BinRuntimeV1.go create mode 100644 dex/networks/erc20/contracts/v1/swap_contract.bin create mode 100644 dex/networks/erc20/contracts/v1/token_contract.bin mode change 100644 => 100755 dex/networks/eth/contracts/build-multibalance.sh delete mode 100644 dex/networks/eth/contracts/multibalance/BinRuntimeMultiBalanceV0.go create mode 100644 dex/networks/eth/contracts/multibalance/contract.bin delete mode 100644 dex/networks/eth/contracts/v0/BinRuntimeV0.go create mode 100644 dex/networks/eth/contracts/v0/contract.bin delete mode 100644 dex/networks/eth/contracts/v1/BinRuntimeV1.go create mode 100644 dex/networks/eth/contracts/v1/contract.bin diff --git a/client/asset/eth/deploy.go b/client/asset/eth/deploy.go index 975f155ec2..310b76ac94 100644 --- a/client/asset/eth/deploy.go +++ b/client/asset/eth/deploy.go @@ -13,9 +13,11 @@ import ( "decred.org/dcrdex/client/asset" "decred.org/dcrdex/dex" erc20v0 "decred.org/dcrdex/dex/networks/erc20/contracts/v0" + erc20v1 "decred.org/dcrdex/dex/networks/erc20/contracts/v1" dexeth "decred.org/dcrdex/dex/networks/eth" multibal "decred.org/dcrdex/dex/networks/eth/contracts/multibalance" ethv0 "decred.org/dcrdex/dex/networks/eth/contracts/v0" + ethv1 "decred.org/dcrdex/dex/networks/eth/contracts/v1" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -140,37 +142,35 @@ func (contractDeployer) EstimateMultiBalanceDeployFunding( } func (contractDeployer) txData(contractVer uint32, tokenAddr common.Address) (txData []byte, err error) { - var abi *abi.ABI - var bytecode []byte - isToken := tokenAddr != (common.Address{}) - if isToken { - switch contractVer { - case 0: - bytecode = common.FromHex(erc20v0.ERC20SwapBin) - abi, err = erc20v0.ERC20SwapMetaData.GetAbi() - } - } else { + if tokenAddr == (common.Address{}) { switch contractVer { case 0: - bytecode = common.FromHex(ethv0.ETHSwapBin) - abi, err = ethv0.ETHSwapMetaData.GetAbi() + return common.FromHex(ethv0.ETHSwapBin), nil + case 1: + return common.FromHex(ethv1.ETHSwapBin), nil } } + var abi *abi.ABI + var bytecode []byte + switch contractVer { + case 0: + bytecode = common.FromHex(erc20v0.ERC20SwapBin) + abi, err = erc20v0.ERC20SwapMetaData.GetAbi() + case 1: + bytecode = common.FromHex(erc20v1.ERC20SwapBin) + abi, err = erc20v1.ERC20SwapMetaData.GetAbi() + } if err != nil { return nil, fmt.Errorf("error parsing ABI: %w", err) } if abi == nil { return nil, fmt.Errorf("no abi data for version %d", contractVer) } - txData = bytecode - if isToken { - argData, err := abi.Pack("", tokenAddr) - if err != nil { - return nil, fmt.Errorf("error packing token address: %w", err) - } - txData = append(txData, argData...) + argData, err := abi.Pack("", tokenAddr) + if err != nil { + return nil, fmt.Errorf("error packing token address: %w", err) } - return + return append(bytecode, argData...), nil } // DeployContract deployes a dcrdex swap contract. @@ -199,6 +199,11 @@ func (contractDeployer) DeployContract( contractAddr, tx, _, err := erc20v0.DeployERC20Swap(txOpts, cb, tokenAddress) return contractAddr, tx, err } + case 1: + deployer = func(txOpts *bind.TransactOpts, cb bind.ContractBackend) (common.Address, *types.Transaction, error) { + contractAddr, tx, _, err := erc20v1.DeployERC20Swap(txOpts, cb, tokenAddress) + return contractAddr, tx, err + } } } else { @@ -208,6 +213,11 @@ func (contractDeployer) DeployContract( contractAddr, tx, _, err := ethv0.DeployETHSwap(txOpts, cb) return contractAddr, tx, err } + case 1: + deployer = func(txOpts *bind.TransactOpts, cb bind.ContractBackend) (common.Address, *types.Transaction, error) { + contractAddr, tx, _, err := ethv1.DeployETHSwap(txOpts, cb) + return contractAddr, tx, err + } } } if deployer == nil { @@ -264,7 +274,7 @@ func (contractDeployer) deployContract( } feeRate := dexeth.WeiToGweiCeil(maxFeeRate) - log.Infof("Estimated fees: %s gwei / gas", ui.ConventionalString(feeRate*gas)) + log.Infof("Estimated fees: %s gwei", ui.ConventionalString(feeRate*gas)) gas *= 5 / 4 // Add 20% buffer feesWithBuffer := feeRate * gas @@ -287,7 +297,13 @@ func (contractDeployer) deployContract( return err } - log.Infof("👍 Contract %s launched with tx %s", contractAddr, tx.Hash()) + log.Infof("Contract %s launched with tx %s", contractAddr, tx.Hash()) + + if err = waitForConfirmation(ctx, cl, tx.Hash()); err != nil { + return fmt.Errorf("error waiting for deployment transaction status: %w", err) + } + + log.Info("👍 Transaction confirmed") return nil } diff --git a/client/asset/eth/eth.go b/client/asset/eth/eth.go index d7d4773cdf..346124fb14 100644 --- a/client/asset/eth/eth.go +++ b/client/asset/eth/eth.go @@ -879,7 +879,8 @@ func (w *ETHWallet) Connect(ctx context.Context) (_ *sync.WaitGroup, err error) for ver, constructor := range contractorConstructors { contractAddr, exists := w.versionedContracts[ver] if !exists || contractAddr == (common.Address{}) { - return nil, fmt.Errorf("no contract address for version %d, net %s", ver, w.net) + w.log.Debugf("no eth swap contract address for version %d, net %s", ver, w.net) + continue } c, err := constructor(w.net, contractAddr, w.addr, w.node.contractBackend()) if err != nil { @@ -5580,9 +5581,26 @@ func (getGas) ReadCredentials(chain, credentialsPath string, net dex.Network) (a return } -func getGetGasClientWithEstimatesAndBalances(ctx context.Context, net dex.Network, assetID, contractVer uint32, maxSwaps int, - walletDir string, providers []string, seed []byte, wParams *GetGasWalletParams, log dex.Logger) (cl *multiRPCClient, c contractor, - ethReq, swapReq, feeRate uint64, ethBal, tokenBal *big.Int, err error) { +func getGetGasClientWithEstimatesAndBalances( + ctx context.Context, + net dex.Network, + contractVer uint32, + maxSwaps int, + walletDir string, + providers []string, + seed []byte, + wParams *GetGasWalletParams, + log dex.Logger, +) ( + cl *multiRPCClient, + c contractor, + ethReq, + swapReq, + feeRate uint64, + ethBal, + tokenBal *big.Int, + err error, +) { cl, c, err = quickNode(ctx, walletDir, contractVer, seed, providers, wParams, net, log) if err != nil { @@ -5666,7 +5684,7 @@ func (getGas) EstimateFunding(ctx context.Context, net dex.Network, assetID, con } defer os.RemoveAll(walletDir) - cl, _, ethReq, swapReq, _, ethBalBig, tokenBalBig, err := getGetGasClientWithEstimatesAndBalances(ctx, net, assetID, contractVer, maxSwaps, walletDir, providers, seed, wParams, log) + cl, _, ethReq, swapReq, _, ethBalBig, tokenBalBig, err := getGetGasClientWithEstimatesAndBalances(ctx, net, contractVer, maxSwaps, walletDir, providers, seed, wParams, log) if err != nil { return err } @@ -5833,6 +5851,7 @@ func (getGas) returnFunds( } remainder := ethBal - fees + txOpts, err := cl.txOpts(ctx, remainder, defaultSendGasLimit, maxFeeRate, tipRate, nil) if err != nil { return fmt.Errorf("error generating tx opts: %w", err) @@ -5857,6 +5876,10 @@ func (getGas) returnFunds( func (getGas) Estimate(ctx context.Context, net dex.Network, assetID, contractVer uint32, maxSwaps int, credentialsPath string, wParams *GetGasWalletParams, log dex.Logger) error { + if *wParams.Gas == (dexeth.Gases{}) { + return fmt.Errorf("empty gas table. put some estimates in VersionedGases or Tokens for this contract") + } + symbol := dex.BipIDSymbol(assetID) log.Infof("Getting gas estimates for up to %d swaps of asset %s, contract version %d on %s", maxSwaps, symbol, contractVer, symbol) @@ -5873,7 +5896,7 @@ func (getGas) Estimate(ctx context.Context, net dex.Network, assetID, contractVe } defer os.RemoveAll(walletDir) - cl, c, ethReq, swapReq, feeRate, ethBal, tokenBal, err := getGetGasClientWithEstimatesAndBalances(ctx, net, assetID, contractVer, maxSwaps, walletDir, providers, seed, wParams, log) + cl, c, ethReq, swapReq, feeRate, ethBal, tokenBal, err := getGetGasClientWithEstimatesAndBalances(ctx, net, contractVer, maxSwaps, walletDir, providers, seed, wParams, log) if err != nil { return err } @@ -5998,6 +6021,8 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t return fmt.Errorf("error getting network fees: %v", err) } + maxFeeRate := new(big.Int).Add(tipRate, new(big.Int).Mul(baseRate, big.NewInt(2))) + defer func() { if len(stats.swaps) == 0 { return @@ -6038,10 +6063,15 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t fmt.Printf(" %+v \n", stats.transfers) }() + logTx := func(tag string, n int, tx *types.Transaction) { + log.Infof("%s %d tx, hash = %s, nonce = %d, maxFeeRate = %s, tip cap = %s", + tag, n, tx.Hash(), tx.Nonce(), tx.GasFeeCap(), tx.GasTipCap()) + } + // Estimate approve for tokens. if isToken { sendApprove := func(cl ethFetcher, c tokenContractor) error { - txOpts, err := cl.txOpts(ctx, 0, g.Approve*2, baseRate, tipRate, nil) + txOpts, err := cl.txOpts(ctx, 0, g.Approve*2, maxFeeRate, tipRate, nil) if err != nil { return fmt.Errorf("error constructing signed tx opts for approve: %w", err) } @@ -6049,6 +6079,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t if err != nil { return fmt.Errorf("error estimating approve gas: %w", err) } + logTx("Approve", 1, tx) if err = waitForConfirmation(ctx, cl, tx.Hash()); err != nil { return fmt.Errorf("error waiting for approve transaction: %w", err) } @@ -6075,7 +6106,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t return fmt.Errorf("error sending approve transaction for the initiator: %w", err) } - txOpts, err := cl.txOpts(ctx, 0, g.Transfer*2, baseRate, tipRate, nil) + txOpts, err := cl.txOpts(ctx, 0, g.Transfer*2, maxFeeRate, tipRate, nil) if err != nil { return fmt.Errorf("error constructing signed tx opts for transfer: %w", err) } @@ -6088,6 +6119,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t if err != nil { return fmt.Errorf("transfer error: %w", err) } + logTx("Transfer", 1, transferTx) if err = waitForConfirmation(ctx, cl, transferTx.Hash()); err != nil { return fmt.Errorf("error waiting for transfer tx: %w", err) } @@ -6127,7 +6159,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t } // Send the inits - txOpts, err := cl.txOpts(ctx, optsVal, g.SwapN(n)*2, baseRate, tipRate, nil) + txOpts, err := cl.txOpts(ctx, optsVal, g.SwapN(n)*2, maxFeeRate, tipRate, nil) if err != nil { return fmt.Errorf("error constructing signed tx opts for %d swaps: %v", n, err) } @@ -6136,6 +6168,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t if err != nil { return fmt.Errorf("initiate error for %d swaps: %v", n, err) } + logTx("Initiate", n, tx) if err = waitForConfirmation(ctx, cl, tx.Hash()); err != nil { return fmt.Errorf("error waiting for init tx to be mined: %w", err) } @@ -6170,7 +6203,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t }) } - txOpts, err = cl.txOpts(ctx, 0, g.RedeemN(n)*2, baseRate, tipRate, nil) + txOpts, err = cl.txOpts(ctx, 0, g.RedeemN(n)*2, maxFeeRate, tipRate, nil) if err != nil { return fmt.Errorf("error constructing signed tx opts for %d redeems: %v", n, err) } @@ -6179,6 +6212,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t if err != nil { return fmt.Errorf("redeem error for %d swaps: %v", n, err) } + logTx("Redeem", n, tx) if err = waitForConfirmation(ctx, cl, tx.Hash()); err != nil { return fmt.Errorf("error waiting for redeem tx to be mined: %w", err) } diff --git a/client/asset/polygon/polygon.go b/client/asset/polygon/polygon.go index fd8faeaf3a..f97a82b51c 100644 --- a/client/asset/polygon/polygon.go +++ b/client/asset/polygon/polygon.go @@ -74,7 +74,7 @@ var ( WalletInfo = asset.WalletInfo{ Name: "Polygon", Version: 0, - SupportedVersions: []uint32{0}, + SupportedVersions: []uint32{0, 1}, UnitInfo: dexpolygon.UnitInfo, AvailableWallets: []*asset.WalletDefinition{ { diff --git a/dex/networks/erc20/contracts/updatecontract.sh b/dex/networks/erc20/contracts/updatecontract.sh index 4ab633e891..328badfc95 100755 --- a/dex/networks/erc20/contracts/updatecontract.sh +++ b/dex/networks/erc20/contracts/updatecontract.sh @@ -36,16 +36,6 @@ fi mkdir temp solc --abi --bin --bin-runtime --overwrite --optimize ${SOLIDITY_FILE} -o ./temp/ -BYTECODE=$(<./temp/${CONTRACT_NAME}.bin-runtime) - -cat > "./${PKG_NAME}/BinRuntimeV${VERSION}.go" < "v${VERSION}/swap_contract.bin" +echo "${TEST_TOKEN_BYTECODE}" | xxd -r -p > "v${VERSION}/token_contract.bin" rm -fr temp diff --git a/dex/networks/erc20/contracts/v0/BinRuntimeV0.go b/dex/networks/erc20/contracts/v0/BinRuntimeV0.go deleted file mode 100644 index 9d5a079e5d..0000000000 --- a/dex/networks/erc20/contracts/v0/BinRuntimeV0.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package v0 - -const ERC20SwapRuntimeBin = "608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a8793f941161005b578063a8793f94146100ff578063d0f761c014610112578063eb84e7f214610135578063f4fd17f9146101a457600080fd5b80637249fbb61461008257806376467cbd146100975780638c8e8fee146100c0575b600080fd5b610095610090366004610ac8565b6101b7565b005b6100aa6100a5366004610ac8565b610376565b6040516100b79190610b19565b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b61009561010d366004610b7e565b610451565b610125610120366004610ac8565b61074c565b60405190151581526020016100b7565b610191610143366004610ac8565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100b79796959493929190610bf3565b6100956101b2366004610c3f565b6107ac565b3233146101df5760405162461bcd60e51b81526004016101d690610ca2565b60405180910390fd5b6101e88161074c565b6102255760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101d6565b60008181526020818152604080832060058101805460ff60a01b1916600360a01b17905560018101548251336024820152604480820192909252835180820390920182526064018352928301805163a9059cbb60e01b6001600160e01b0390911617905290519092916060916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916102c591610ccc565b6000604051808303816000865af19150503d8060008114610302576040519150601f19603f3d011682016040523d82523d6000602084013e610307565b606091505b5090925090508180156103325750805115806103325750808060200190518101906103329190610cfb565b6103705760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d6565b50505050565b6103b36040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561043757610437610ae1565b600381111561044857610448610ae1565b90525092915050565b3233146104705760405162461bcd60e51b81526004016101d690610ca2565b6000805b82811015610615573684848381811061048f5761048f610d1d565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104ed5760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101d6565b813561052f5760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101d6565b60006005820154600160a01b900460ff16600381111561055157610551610ae1565b146105905760405162461bcd60e51b815260206004820152600f60248201526e0c8eae040e6cac6e4cae840d0c2e6d608b1b60448201526064016101d6565b436002820155813560038201556004810180546001600160a01b031916331790556105c16060830160408401610d33565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b1790556105fe9085610d72565b93505050808061060d90610d8b565b915050610474565b5060408051336024820152306044820152606480820184905282518083039091018152608490910182526020810180516001600160e01b03166323b872dd60e01b17905290516000916060916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169161069591610ccc565b6000604051808303816000865af19150503d80600081146106d2576040519150601f19603f3d011682016040523d82523d6000602084013e6106d7565b606091505b5090925090508180156107025750805115806107025750808060200190518101906107029190610cfb565b6107455760405162461bcd60e51b81526020600482015260146024820152731d1c985b9cd9995c88199c9bdb4819985a5b195960621b60448201526064016101d6565b5050505050565b600081815260208190526040812060016005820154600160a01b900460ff16600381111561077c5761077c610ae1565b148015610795575060048101546001600160a01b031633145b80156107a5575080600301544210155b9392505050565b3233146107cb5760405162461bcd60e51b81526004016101d690610ca2565b6000805b828110156109a357368484838181106107ea576107ea610d1d565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff16600381111561082b5761082b610ae1565b146108645760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101d6565b60058101546001600160a01b031633146108b25760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101d6565b8160200135600283600001356040516020016108d091815260200190565b60408051601f19818403018152908290526108ea91610ccc565b602060405180830381855afa158015610907573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061092a9190610da4565b146109645760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101d6565b60058101805460ff60a01b1916600160a11b17905581358155600181015461098c9085610d72565b93505050808061099b90610d8b565b9150506107cf565b5060408051336024820152604480820184905282518083039091018152606490910182526020810180516001600160e01b031663a9059cbb60e01b17905290516000916060916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691610a1d91610ccc565b6000604051808303816000865af19150503d8060008114610a5a576040519150601f19603f3d011682016040523d82523d6000602084013e610a5f565b606091505b509092509050818015610a8a575080511580610a8a575080806020019051810190610a8a9190610cfb565b6107455760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d6565b600060208284031215610ada57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60048110610b1557634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c0830151610b7760c0840182610af7565b5092915050565b60008060208385031215610b9157600080fd5b823567ffffffffffffffff80821115610ba957600080fd5b818501915085601f830112610bbd57600080fd5b813581811115610bcc57600080fd5b8660208260071b8501011115610be157600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e08101610c3360c0830184610af7565b98975050505050505050565b60008060208385031215610c5257600080fd5b823567ffffffffffffffff80821115610c6a57600080fd5b818501915085601f830112610c7e57600080fd5b813581811115610c8d57600080fd5b8660208260061b8501011115610be157600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b6000825160005b81811015610ced5760208186018101518583015201610cd3565b506000920191825250919050565b600060208284031215610d0d57600080fd5b815180151581146107a557600080fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215610d4557600080fd5b81356001600160a01b03811681146107a557600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610d8557610d85610d5c565b92915050565b600060018201610d9d57610d9d610d5c565b5060010190565b600060208284031215610db657600080fd5b505191905056fea2646970667358221220a055a4890a5ecf3876dbee91dfbeb46ba11b5f7c09b6d935173932d93f8fb92264736f6c63430008120033" diff --git a/dex/networks/erc20/contracts/v0/contract.go b/dex/networks/erc20/contracts/v0/contract.go index 3f9d522c31..4b366daf0e 100644 --- a/dex/networks/erc20/contracts/v0/contract.go +++ b/dex/networks/erc20/contracts/v0/contract.go @@ -27,13 +27,12 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ERC20SwapMetaData contains all meta data concerning the ERC20Swap contract. var ERC20SwapMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"refundTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structERC20Swap.Initiation[]\",\"name\":\"initiations\",\"type\":\"tuple[]\"}],\"name\":\"initiate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"isRefundable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"internalType\":\"structERC20Swap.Redemption[]\",\"name\":\"redemptions\",\"type\":\"tuple[]\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"swap\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refundBlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"enumERC20Swap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"internalType\":\"structERC20Swap.Swap\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"swaps\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refundBlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"enumERC20Swap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561001057600080fd5b50604051610e92380380610e9283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610df361009f6000396000818160c50152818161029b0152818161066b01526109f30152610df36000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a8793f941161005b578063a8793f94146100ff578063d0f761c014610112578063eb84e7f214610135578063f4fd17f9146101a457600080fd5b80637249fbb61461008257806376467cbd146100975780638c8e8fee146100c0575b600080fd5b610095610090366004610ac8565b6101b7565b005b6100aa6100a5366004610ac8565b610376565b6040516100b79190610b19565b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b61009561010d366004610b7e565b610451565b610125610120366004610ac8565b61074c565b60405190151581526020016100b7565b610191610143366004610ac8565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100b79796959493929190610bf3565b6100956101b2366004610c3f565b6107ac565b3233146101df5760405162461bcd60e51b81526004016101d690610ca2565b60405180910390fd5b6101e88161074c565b6102255760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101d6565b60008181526020818152604080832060058101805460ff60a01b1916600360a01b17905560018101548251336024820152604480820192909252835180820390920182526064018352928301805163a9059cbb60e01b6001600160e01b0390911617905290519092916060916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916102c591610ccc565b6000604051808303816000865af19150503d8060008114610302576040519150601f19603f3d011682016040523d82523d6000602084013e610307565b606091505b5090925090508180156103325750805115806103325750808060200190518101906103329190610cfb565b6103705760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d6565b50505050565b6103b36040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561043757610437610ae1565b600381111561044857610448610ae1565b90525092915050565b3233146104705760405162461bcd60e51b81526004016101d690610ca2565b6000805b82811015610615573684848381811061048f5761048f610d1d565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104ed5760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101d6565b813561052f5760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101d6565b60006005820154600160a01b900460ff16600381111561055157610551610ae1565b146105905760405162461bcd60e51b815260206004820152600f60248201526e0c8eae040e6cac6e4cae840d0c2e6d608b1b60448201526064016101d6565b436002820155813560038201556004810180546001600160a01b031916331790556105c16060830160408401610d33565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b1790556105fe9085610d72565b93505050808061060d90610d8b565b915050610474565b5060408051336024820152306044820152606480820184905282518083039091018152608490910182526020810180516001600160e01b03166323b872dd60e01b17905290516000916060916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169161069591610ccc565b6000604051808303816000865af19150503d80600081146106d2576040519150601f19603f3d011682016040523d82523d6000602084013e6106d7565b606091505b5090925090508180156107025750805115806107025750808060200190518101906107029190610cfb565b6107455760405162461bcd60e51b81526020600482015260146024820152731d1c985b9cd9995c88199c9bdb4819985a5b195960621b60448201526064016101d6565b5050505050565b600081815260208190526040812060016005820154600160a01b900460ff16600381111561077c5761077c610ae1565b148015610795575060048101546001600160a01b031633145b80156107a5575080600301544210155b9392505050565b3233146107cb5760405162461bcd60e51b81526004016101d690610ca2565b6000805b828110156109a357368484838181106107ea576107ea610d1d565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff16600381111561082b5761082b610ae1565b146108645760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101d6565b60058101546001600160a01b031633146108b25760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101d6565b8160200135600283600001356040516020016108d091815260200190565b60408051601f19818403018152908290526108ea91610ccc565b602060405180830381855afa158015610907573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061092a9190610da4565b146109645760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101d6565b60058101805460ff60a01b1916600160a11b17905581358155600181015461098c9085610d72565b93505050808061099b90610d8b565b9150506107cf565b5060408051336024820152604480820184905282518083039091018152606490910182526020810180516001600160e01b031663a9059cbb60e01b17905290516000916060916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691610a1d91610ccc565b6000604051808303816000865af19150503d8060008114610a5a576040519150601f19603f3d011682016040523d82523d6000602084013e610a5f565b606091505b509092509050818015610a8a575080511580610a8a575080806020019051810190610a8a9190610cfb565b6107455760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d6565b600060208284031215610ada57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60048110610b1557634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c0830151610b7760c0840182610af7565b5092915050565b60008060208385031215610b9157600080fd5b823567ffffffffffffffff80821115610ba957600080fd5b818501915085601f830112610bbd57600080fd5b813581811115610bcc57600080fd5b8660208260071b8501011115610be157600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e08101610c3360c0830184610af7565b98975050505050505050565b60008060208385031215610c5257600080fd5b823567ffffffffffffffff80821115610c6a57600080fd5b818501915085601f830112610c7e57600080fd5b813581811115610c8d57600080fd5b8660208260061b8501011115610be157600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b6000825160005b81811015610ced5760208186018101518583015201610cd3565b506000920191825250919050565b600060208284031215610d0d57600080fd5b815180151581146107a557600080fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215610d4557600080fd5b81356001600160a01b03811681146107a557600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610d8557610d85610d5c565b92915050565b600060018201610d9d57610d9d610d5c565b5060010190565b600060208284031215610db657600080fd5b505191905056fea2646970667358221220a055a4890a5ecf3876dbee91dfbeb46ba11b5f7c09b6d935173932d93f8fb92264736f6c63430008120033", + Bin: "0x60a060405234801561001057600080fd5b50604051610e92380380610e9283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610df361009f6000396000818160c50152818161029b0152818161066b01526109f30152610df36000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a8793f941161005b578063a8793f94146100ff578063d0f761c014610112578063eb84e7f214610135578063f4fd17f9146101a457600080fd5b80637249fbb61461008257806376467cbd146100975780638c8e8fee146100c0575b600080fd5b610095610090366004610ac8565b6101b7565b005b6100aa6100a5366004610ac8565b610376565b6040516100b79190610b19565b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b61009561010d366004610b7e565b610451565b610125610120366004610ac8565b61074c565b60405190151581526020016100b7565b610191610143366004610ac8565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100b79796959493929190610bf3565b6100956101b2366004610c3f565b6107ac565b3233146101df5760405162461bcd60e51b81526004016101d690610ca2565b60405180910390fd5b6101e88161074c565b6102255760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101d6565b60008181526020818152604080832060058101805460ff60a01b1916600360a01b17905560018101548251336024820152604480820192909252835180820390920182526064018352928301805163a9059cbb60e01b6001600160e01b0390911617905290519092916060916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916102c591610ccc565b6000604051808303816000865af19150503d8060008114610302576040519150601f19603f3d011682016040523d82523d6000602084013e610307565b606091505b5090925090508180156103325750805115806103325750808060200190518101906103329190610cfb565b6103705760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d6565b50505050565b6103b36040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561043757610437610ae1565b600381111561044857610448610ae1565b90525092915050565b3233146104705760405162461bcd60e51b81526004016101d690610ca2565b6000805b82811015610615573684848381811061048f5761048f610d1d565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104ed5760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101d6565b813561052f5760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101d6565b60006005820154600160a01b900460ff16600381111561055157610551610ae1565b146105905760405162461bcd60e51b815260206004820152600f60248201526e0c8eae040e6cac6e4cae840d0c2e6d608b1b60448201526064016101d6565b436002820155813560038201556004810180546001600160a01b031916331790556105c16060830160408401610d33565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b1790556105fe9085610d72565b93505050808061060d90610d8b565b915050610474565b5060408051336024820152306044820152606480820184905282518083039091018152608490910182526020810180516001600160e01b03166323b872dd60e01b17905290516000916060916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169161069591610ccc565b6000604051808303816000865af19150503d80600081146106d2576040519150601f19603f3d011682016040523d82523d6000602084013e6106d7565b606091505b5090925090508180156107025750805115806107025750808060200190518101906107029190610cfb565b6107455760405162461bcd60e51b81526020600482015260146024820152731d1c985b9cd9995c88199c9bdb4819985a5b195960621b60448201526064016101d6565b5050505050565b600081815260208190526040812060016005820154600160a01b900460ff16600381111561077c5761077c610ae1565b148015610795575060048101546001600160a01b031633145b80156107a5575080600301544210155b9392505050565b3233146107cb5760405162461bcd60e51b81526004016101d690610ca2565b6000805b828110156109a357368484838181106107ea576107ea610d1d565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff16600381111561082b5761082b610ae1565b146108645760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101d6565b60058101546001600160a01b031633146108b25760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101d6565b8160200135600283600001356040516020016108d091815260200190565b60408051601f19818403018152908290526108ea91610ccc565b602060405180830381855afa158015610907573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061092a9190610da4565b146109645760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101d6565b60058101805460ff60a01b1916600160a11b17905581358155600181015461098c9085610d72565b93505050808061099b90610d8b565b9150506107cf565b5060408051336024820152604480820184905282518083039091018152606490910182526020810180516001600160e01b031663a9059cbb60e01b17905290516000916060916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691610a1d91610ccc565b6000604051808303816000865af19150503d8060008114610a5a576040519150601f19603f3d011682016040523d82523d6000602084013e610a5f565b606091505b509092509050818015610a8a575080511580610a8a575080806020019051810190610a8a9190610cfb565b6107455760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d6565b600060208284031215610ada57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60048110610b1557634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c0830151610b7760c0840182610af7565b5092915050565b60008060208385031215610b9157600080fd5b823567ffffffffffffffff80821115610ba957600080fd5b818501915085601f830112610bbd57600080fd5b813581811115610bcc57600080fd5b8660208260071b8501011115610be157600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e08101610c3360c0830184610af7565b98975050505050505050565b60008060208385031215610c5257600080fd5b823567ffffffffffffffff80821115610c6a57600080fd5b818501915085601f830112610c7e57600080fd5b813581811115610c8d57600080fd5b8660208260061b8501011115610be157600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b6000825160005b81811015610ced5760208186018101518583015201610cd3565b506000920191825250919050565b600060208284031215610d0d57600080fd5b815180151581146107a557600080fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215610d4557600080fd5b81356001600160a01b03811681146107a557600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610d8557610d85610d5c565b92915050565b600060018201610d9d57610d9d610d5c565b5060010190565b600060208284031215610db657600080fd5b505191905056fea26469706673582212206e467d69294766316da063165c1299fd448b484e03da316a32f5fc033f36ef0d64736f6c63430008120033", } // ERC20SwapABI is the input ABI used to generate the binding from. @@ -158,11 +157,11 @@ func NewERC20SwapFilterer(address common.Address, filterer bind.ContractFilterer // bindERC20Swap binds a generic wrapper to an already deployed contract. func bindERC20Swap(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ERC20SwapMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ERC20SwapABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/dex/networks/erc20/contracts/v0/swap_contract.bin b/dex/networks/erc20/contracts/v0/swap_contract.bin new file mode 100644 index 0000000000000000000000000000000000000000..bf7155710808cda0bc8467c5cf60fa0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Dosxd?r>)AiqgLnlo775P#cfvuYH@>?d@lx6u&M-DG>~cM%r!{o%dcIu|? zs)*EG5wcSgt(QkNq%-i;S9XaBRS_#x8tx z$Ca^l&V`#ZsHCib^2#+#B?~)|ddm;f1Y$sGbz{G*=>VxhE)}V(5vX8)P$cR*|CNJ> zJChaE0rx%(=*mp$%Z8{>Z1kv5xTq8+<^9f211H(%%1)o?Y;S%#Fn@2L_PaZNefCTI z(rWvc>m}pQP`#8z8P-hE`D7~_JI^h%G5PZrHU@RIm4_2;c^H-0|C5L54Y%fDdMCy2 z7CcOUc@+=S$0HsFi)9|BkKcxe|6N_BiXOJf=__ITX%>A2QjR}3@~y8?x1rhmV?1v2 zJ1E|uT({`TRoZ{6Y$7vX@W2YsqAXWs02&p~60Is5Dpf!&tMAtW{s(K>*0b&{!ODc0lwNBlAmmjL_6(6|~eOwPkx9f#aF6+!U>wIIC z^@^_7BUw>W8SZ*B+)lv-JXxqSM#A?(Ave&6vD5yHsVLjSBgcps2ubYMxyiv#Z?b}k+plh zr}?^ze4Z+x4U>eUAS18?)d ANB{r; literal 0 HcmV?d00001 diff --git a/dex/networks/erc20/contracts/v0/token_contract.bin b/dex/networks/erc20/contracts/v0/token_contract.bin new file mode 100644 index 0000000000000000000000000000000000000000..b7b53ee1b848e611fccdc7419e1195fad7addc8c GIT binary patch literal 2717 zcmaJ@Yitx%6rMY?-KD6|Vt0`&(4ipFsuU>YA&A>l4a5Yu!#*IRcy4!>heEgA@-UFv znc102B*r^Ss|i8`B{9VW6G7fl0tPiH6@D0rk%uuvV?tCaQA0{SclJ?QHn!RJ?7iQ) z-*?VE=iUn%1e7_NmkMQ35VQd`2!TdAde3}G!@ubTI)Q-B6e`r%lmsFw1hhuYAk0>v zR9Dtk&pv*ldfsQB9);t6kPV`M#HjEhGpJY^;cFGplCCs)E53u@ayS>_%mS`N3&G$7 z9}H$##%D8oJPWTYZCu=QMQqRn0mLu}Aft|TV(5hfTQqh}5IWkIPC0XG_UZD`vo0o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B=iW6MOWhQA^BRd> zcX>{t*UNUI3t>9Z>t!d=>+i1`y#JxG@Kd=2E+aPhGJ5V0V z^X>ssv;gQlc4kKFU*yJMGZ56kp%FHc{D#vQ_;>T+d=o2>WD$?1usKJPup^5Pe%_jh zx|?AFwau@xL>kHL zho9ty)OHGVeh!f|ei$(bwgnRh@cf}s|MN4zsQ-7ucwCOThR|3v@YEpQ;KiCGSxUtN zhnxDZq;XnhI=GQd)c;W$KQ#DAN@Yp3gWn7YvO7?R%W(Cd@CXrzWD8FJ2z)*bE(FJ5 zXR!iV>+yG77g_FHwz#_*4cwEj+SEqa5hZ^ZkEp^;Tq|eu{3aLJXPwE7Sh>4v1{xVS zY>n%AJU{1QahA-dfgjmpF`fGn7`J{FK!%B|D^Ca?wC_J47g>>vm`4=m#CC?#534H; z*3MNLTvVYn_=Rbur8!DbMcnc$xY=5V2hms&WZaIJX(fNjy21vra*9i^$#A^u-i?nu zfPD|7Bzzh?Nw}HUalGDwK^S=OUJ-mHU44<3O)3~og1v+1d7Ml5NLtlhq=dLL2QS$Q zV?rayJi)>YX)w_C()jY_r^4ayvel9nn+_l z7Kly~dGr;RKgUlUQjwTOQn4K5WDuT*CT#-~8eV@Jsbkr+3t^YzLOBa7e3-G)-hU;* zm3;F3?!Lk8LtAc~FTZeA8ruH7N6$B}xpLx*5462`Y2Vehw_ay^UjF($zkF!h&z|WX O8tCs@FZt$6EB*sz>8>IG literal 0 HcmV?d00001 diff --git a/dex/networks/erc20/contracts/v1/token_contract.bin b/dex/networks/erc20/contracts/v1/token_contract.bin new file mode 100644 index 0000000000000000000000000000000000000000..b7b53ee1b848e611fccdc7419e1195fad7addc8c GIT binary patch literal 2717 zcmaJ@Yitx%6rMY?-KD6|Vt0`&(4ipFsuU>YA&A>l4a5Yu!#*IRcy4!>heEgA@-UFv znc102B*r^Ss|i8`B{9VW6G7fl0tPiH6@D0rk%uuvV?tCaQA0{SclJ?QHn!RJ?7iQ) z-*?VE=iUn%1e7_NmkMQ35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#wvUy51?`3&nXgYuLf08M0+bENokNpfO&bCf29BWJG;t8xs$Vw35chi-pZ0 zWUoT^Q&CGNcxPD#o*+aq2z5{4{VYJh=p+aXK;;Cy>4?uFgkR&?HrML% "./${PKG_NAME}/BinRuntime${CONTRACT_NAME}.go" < "${PKG_NAME}/contract.bin" rm -fr temp diff --git a/dex/networks/eth/contracts/multibalance/BinRuntimeMultiBalanceV0.go b/dex/networks/eth/contracts/multibalance/BinRuntimeMultiBalanceV0.go deleted file mode 100644 index 7f70e53a0e..0000000000 --- a/dex/networks/eth/contracts/multibalance/BinRuntimeMultiBalanceV0.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package multibalance - -const MultiBalanceV0RuntimeBin = "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d3e5ca8714610030575b600080fd5b61004361003e3660046102a5565b610059565b604051610050919061032b565b60405180910390f35b60606000610068836001610385565b67ffffffffffffffff8111156100805761008061039e565b6040519080825280602002602001820160405280156100a9578160200160208202803683370190505b509050846001600160a01b031631816000815181106100ca576100ca6103b4565b60200260200101818152505060005b838110156102805760008585838181106100f5576100f56103b4565b905060200201602081019061010a91906103ca565b905060006060826001600160a01b03167f70a08231b98ef4ca268c9cc3f6b4590e4bfec28280db06bb5d45e689f2a360be8a60405160240161015b91906001600160a01b0391909116815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161019991906103ec565b600060405180830381855afa9150503d80600081146101d4576040519150601f19603f3d011682016040523d82523d6000602084013e6101d9565b606091505b509092509050816102285760405162461bcd60e51b815260206004820152601560248201527418985b185b98d953d98818d85b1b0819985a5b1959605a1b604482015260640160405180910390fd5b60008180602001905181019061023e919061041b565b9050808661024d876001610385565b8151811061025d5761025d6103b4565b60200260200101818152505050505050808061027890610434565b9150506100d9565b50949350505050565b80356001600160a01b03811681146102a057600080fd5b919050565b6000806000604084860312156102ba57600080fd5b6102c384610289565b9250602084013567ffffffffffffffff808211156102e057600080fd5b818601915086601f8301126102f457600080fd5b81358181111561030357600080fd5b8760208260051b850101111561031857600080fd5b6020830194508093505050509250925092565b6020808252825182820181905260009190848201906040850190845b8181101561036357835183529284019291840191600101610347565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103985761039861036f565b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156103dc57600080fd5b6103e582610289565b9392505050565b6000825160005b8181101561040d57602081860181015185830152016103f3565b506000920191825250919050565b60006020828403121561042d57600080fd5b5051919050565b6000600182016104465761044661036f565b506001019056fea26469706673582212207074e3e189a2692e2841f7943a9de24bcdbca943ee6bfcbd83a2fa6e43ec497b64736f6c63430008120033" diff --git a/dex/networks/eth/contracts/multibalance/contract.bin b/dex/networks/eth/contracts/multibalance/contract.bin new file mode 100644 index 0000000000000000000000000000000000000000..195ca6c0377535310b6280a230cfd213df054796 GIT binary patch literal 1187 zcmZWoU1$|Y6rQuYiWFL6Ft-V}kV^?7h*GUdX(4Gss;!7JyTVxDYzWDo~Zx?*hhX#E}mGnt`Fs6bu(KCC!!Qw8%y>sR}XTR?| zXHa2(v`4i`))FIAtAfiQQIeIAeTi&&4c|M*pr=K$?S$^e#ZT1e{iXWk7Rf$~MV>F& zpk#eL7)bAOSx7ci7T6z3#xpDZ?fFJ!zFiiG$RztQL6Cl>EPi(9lcdqCcc4=ff)I_vSmFm*JN|o{opmoGK zGLh((Ht8wSQK=-_L01U6l0z*gFjd!JC4AtR*UN%}4AHEA z)uE3Ltlcr{;l>*yd;ghwehF`%BH`Et5=3U3S((iWIwI=UNmC(qcIeax9c398|}X*>O~twlDJaL&U|=A^HteFGlkKyjUCb^VUihQ^FHzjo zF*__ehH$uu-#E}1wIg)xTqQc1dIUCfo_T#lGAKIFR8@KhC$Z7wyd~a9EWMHUTEgj3 zN_xLh=AN=3NsdiIgHM4X^ljrP6t9~o>^m^k&dUsRlO_fEB zx|u@v`h+P%BjznOP`U~kuVQBctjh$+MkVSN&h&BB7^=9A6SRKTV(fo)J=d%okRYkh6d>`ncSi2 zTK;ilCZwB@a}7R>Y5uFAA*>`25z}R2imV2iiRd!tt~Uz?I~oOf*gT+{DuaD7t(+|< zt+u>2KXz>V`x8e#Z7q$TeDe3y{IQ+e242p5b>Z=WdpEBPKKtpvTgm*ZUk0D "./${PKG_NAME}/BinRuntimeV${VERSION}.go" < "v${VERSION}/contract.bin" rm -fr temp diff --git a/dex/networks/eth/contracts/v0/BinRuntimeV0.go b/dex/networks/eth/contracts/v0/BinRuntimeV0.go deleted file mode 100644 index 35f5a11c05..0000000000 --- a/dex/networks/eth/contracts/v0/BinRuntimeV0.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package v0 - -const ETHSwapRuntimeBin = "6080604052600436106100555760003560e01c80637249fbb61461005a57806376467cbd1461007c578063a8793f94146100b2578063d0f761c0146100c5578063eb84e7f2146100f5578063f4fd17f914610171575b600080fd5b34801561006657600080fd5b5061007a610075366004610871565b610191565b005b34801561008857600080fd5b5061009c610097366004610871565b6102c9565b6040516100a991906108c2565b60405180910390f35b61007a6100c0366004610927565b6103a4565b3480156100d157600080fd5b506100e56100e0366004610871565b61059b565b60405190151581526020016100a9565b34801561010157600080fd5b5061015e610110366004610871565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100a9979695949392919061099c565b34801561017d57600080fd5b5061007a61018c3660046109e8565b6105e3565b3233146101b95760405162461bcd60e51b81526004016101b090610a4b565b60405180910390fd5b6101c28161059b565b6101ff5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101b0565b60008181526020819052604080822060058101805460ff60a01b1916600360a01b1790556004810154600182015492519193926001600160a01b03909116918381818185875af1925050503d8060008114610276576040519150601f19603f3d011682016040523d82523d6000602084013e61027b565b606091505b50909150506001811515146102c45760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050565b6103066040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561038a5761038a61088a565b600381111561039b5761039b61088a565b90525092915050565b3233146103c35760405162461bcd60e51b81526004016101b090610a4b565b6000805b8281101561056157368484838181106103e2576103e2610a75565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104405760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101b0565b81356104825760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101b0565b60006005820154600160a01b900460ff1660038111156104a4576104a461088a565b146104dc5760405162461bcd60e51b8152602060048201526008602482015267064757020737761760c41b60448201526064016101b0565b436002820155813560038201556004810180546001600160a01b0319163317905561050d6060830160408401610a8b565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b17905561054a9085610aca565b93505050808061055990610ae3565b9150506103c7565b503481146102c45760405162461bcd60e51b8152602060048201526007602482015266189859081d985b60ca1b60448201526064016101b0565b600081815260208190526040812060016005820154600160a01b900460ff1660038111156105cb576105cb61088a565b1480156105dc575080600301544210155b9392505050565b3233146106025760405162461bcd60e51b81526004016101b090610a4b565b6000805b828110156107da573684848381811061062157610621610a75565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff1660038111156106625761066261088a565b1461069b5760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101b0565b60058101546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101b0565b81602001356002836000013560405160200161070791815260200190565b60408051601f198184030181529082905261072191610afc565b602060405180830381855afa15801561073e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107619190610b2b565b1461079b5760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101b0565b60058101805460ff60a01b1916600160a11b1790558135815560018101546107c39085610aca565b9350505080806107d290610ae3565b915050610606565b50604051600090339083908381818185875af1925050503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b509091505060018115151461086b5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b50505050565b60006020828403121561088357600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600481106108be57634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c083015161092060c08401826108a0565b5092915050565b6000806020838503121561093a57600080fd5b823567ffffffffffffffff8082111561095257600080fd5b818501915085601f83011261096657600080fd5b81358181111561097557600080fd5b8660208260071b850101111561098a57600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e081016109dc60c08301846108a0565b98975050505050505050565b600080602083850312156109fb57600080fd5b823567ffffffffffffffff80821115610a1357600080fd5b818501915085601f830112610a2757600080fd5b813581811115610a3657600080fd5b8660208260061b850101111561098a57600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9d57600080fd5b81356001600160a01b03811681146105dc57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610add57610add610ab4565b92915050565b600060018201610af557610af5610ab4565b5060010190565b6000825160005b81811015610b1d5760208186018101518583015201610b03565b506000920191825250919050565b600060208284031215610b3d57600080fd5b505191905056fea2646970667358221220d288c9a18362adf67607179f5c8585d0abe014bdb904b6e878451ac0c393a04364736f6c63430008120033" diff --git a/dex/networks/eth/contracts/v0/contract.bin b/dex/networks/eth/contracts/v0/contract.bin new file mode 100644 index 0000000000000000000000000000000000000000..32395c9d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fyvtDcGpGoCVtzUSf4TS|(OgHw|!AaeQ^BPYcFVrxk{pKKuAS6-WIjmSzC_ z)f+(is!IW+uWyZo0MbjtR}CP32>^BJW+aZX`KH6i7A-oS$-E?&9bamYa}U+0@{se>|uKG&Z*eY)cvmx9~s%Y`H^+E8Ohnk G;(q{V2kWr_ literal 0 HcmV?d00001 diff --git a/dex/networks/eth/contracts/v0/contract.go b/dex/networks/eth/contracts/v0/contract.go index d11ea6cff3..5e44d70cf3 100644 --- a/dex/networks/eth/contracts/v0/contract.go +++ b/dex/networks/eth/contracts/v0/contract.go @@ -56,7 +56,7 @@ type ETHSwapSwap struct { // ETHSwapMetaData contains all meta data concerning the ETHSwap contract. var ETHSwapMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"refundTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structETHSwap.Initiation[]\",\"name\":\"initiations\",\"type\":\"tuple[]\"}],\"name\":\"initiate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"isRefundable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"internalType\":\"structETHSwap.Redemption[]\",\"name\":\"redemptions\",\"type\":\"tuple[]\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"swap\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refundBlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"enumETHSwap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"internalType\":\"structETHSwap.Swap\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"swaps\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refundBlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"enumETHSwap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50610b7a806100206000396000f3fe6080604052600436106100555760003560e01c80637249fbb61461005a57806376467cbd1461007c578063a8793f94146100b2578063d0f761c0146100c5578063eb84e7f2146100f5578063f4fd17f914610171575b600080fd5b34801561006657600080fd5b5061007a610075366004610871565b610191565b005b34801561008857600080fd5b5061009c610097366004610871565b6102c9565b6040516100a991906108c2565b60405180910390f35b61007a6100c0366004610927565b6103a4565b3480156100d157600080fd5b506100e56100e0366004610871565b61059b565b60405190151581526020016100a9565b34801561010157600080fd5b5061015e610110366004610871565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100a9979695949392919061099c565b34801561017d57600080fd5b5061007a61018c3660046109e8565b6105e3565b3233146101b95760405162461bcd60e51b81526004016101b090610a4b565b60405180910390fd5b6101c28161059b565b6101ff5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101b0565b60008181526020819052604080822060058101805460ff60a01b1916600360a01b1790556004810154600182015492519193926001600160a01b03909116918381818185875af1925050503d8060008114610276576040519150601f19603f3d011682016040523d82523d6000602084013e61027b565b606091505b50909150506001811515146102c45760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050565b6103066040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561038a5761038a61088a565b600381111561039b5761039b61088a565b90525092915050565b3233146103c35760405162461bcd60e51b81526004016101b090610a4b565b6000805b8281101561056157368484838181106103e2576103e2610a75565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104405760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101b0565b81356104825760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101b0565b60006005820154600160a01b900460ff1660038111156104a4576104a461088a565b146104dc5760405162461bcd60e51b8152602060048201526008602482015267064757020737761760c41b60448201526064016101b0565b436002820155813560038201556004810180546001600160a01b0319163317905561050d6060830160408401610a8b565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b17905561054a9085610aca565b93505050808061055990610ae3565b9150506103c7565b503481146102c45760405162461bcd60e51b8152602060048201526007602482015266189859081d985b60ca1b60448201526064016101b0565b600081815260208190526040812060016005820154600160a01b900460ff1660038111156105cb576105cb61088a565b1480156105dc575080600301544210155b9392505050565b3233146106025760405162461bcd60e51b81526004016101b090610a4b565b6000805b828110156107da573684848381811061062157610621610a75565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff1660038111156106625761066261088a565b1461069b5760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101b0565b60058101546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101b0565b81602001356002836000013560405160200161070791815260200190565b60408051601f198184030181529082905261072191610afc565b602060405180830381855afa15801561073e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107619190610b2b565b1461079b5760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101b0565b60058101805460ff60a01b1916600160a11b1790558135815560018101546107c39085610aca565b9350505080806107d290610ae3565b915050610606565b50604051600090339083908381818185875af1925050503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b509091505060018115151461086b5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b50505050565b60006020828403121561088357600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600481106108be57634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c083015161092060c08401826108a0565b5092915050565b6000806020838503121561093a57600080fd5b823567ffffffffffffffff8082111561095257600080fd5b818501915085601f83011261096657600080fd5b81358181111561097557600080fd5b8660208260071b850101111561098a57600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e081016109dc60c08301846108a0565b98975050505050505050565b600080602083850312156109fb57600080fd5b823567ffffffffffffffff80821115610a1357600080fd5b818501915085601f830112610a2757600080fd5b813581811115610a3657600080fd5b8660208260061b850101111561098a57600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9d57600080fd5b81356001600160a01b03811681146105dc57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610add57610add610ab4565b92915050565b600060018201610af557610af5610ab4565b5060010190565b6000825160005b81811015610b1d5760208186018101518583015201610b03565b506000920191825250919050565b600060208284031215610b3d57600080fd5b505191905056fea2646970667358221220d288c9a18362adf67607179f5c8585d0abe014bdb904b6e878451ac0c393a04364736f6c63430008120033", + Bin: "0x608060405234801561001057600080fd5b50610b7a806100206000396000f3fe6080604052600436106100555760003560e01c80637249fbb61461005a57806376467cbd1461007c578063a8793f94146100b2578063d0f761c0146100c5578063eb84e7f2146100f5578063f4fd17f914610171575b600080fd5b34801561006657600080fd5b5061007a610075366004610871565b610191565b005b34801561008857600080fd5b5061009c610097366004610871565b6102c9565b6040516100a991906108c2565b60405180910390f35b61007a6100c0366004610927565b6103a4565b3480156100d157600080fd5b506100e56100e0366004610871565b61059b565b60405190151581526020016100a9565b34801561010157600080fd5b5061015e610110366004610871565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100a9979695949392919061099c565b34801561017d57600080fd5b5061007a61018c3660046109e8565b6105e3565b3233146101b95760405162461bcd60e51b81526004016101b090610a4b565b60405180910390fd5b6101c28161059b565b6101ff5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101b0565b60008181526020819052604080822060058101805460ff60a01b1916600360a01b1790556004810154600182015492519193926001600160a01b03909116918381818185875af1925050503d8060008114610276576040519150601f19603f3d011682016040523d82523d6000602084013e61027b565b606091505b50909150506001811515146102c45760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050565b6103066040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561038a5761038a61088a565b600381111561039b5761039b61088a565b90525092915050565b3233146103c35760405162461bcd60e51b81526004016101b090610a4b565b6000805b8281101561056157368484838181106103e2576103e2610a75565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104405760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101b0565b81356104825760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101b0565b60006005820154600160a01b900460ff1660038111156104a4576104a461088a565b146104dc5760405162461bcd60e51b8152602060048201526008602482015267064757020737761760c41b60448201526064016101b0565b436002820155813560038201556004810180546001600160a01b0319163317905561050d6060830160408401610a8b565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b17905561054a9085610aca565b93505050808061055990610ae3565b9150506103c7565b503481146102c45760405162461bcd60e51b8152602060048201526007602482015266189859081d985b60ca1b60448201526064016101b0565b600081815260208190526040812060016005820154600160a01b900460ff1660038111156105cb576105cb61088a565b1480156105dc575080600301544210155b9392505050565b3233146106025760405162461bcd60e51b81526004016101b090610a4b565b6000805b828110156107da573684848381811061062157610621610a75565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff1660038111156106625761066261088a565b1461069b5760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101b0565b60058101546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101b0565b81602001356002836000013560405160200161070791815260200190565b60408051601f198184030181529082905261072191610afc565b602060405180830381855afa15801561073e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107619190610b2b565b1461079b5760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101b0565b60058101805460ff60a01b1916600160a11b1790558135815560018101546107c39085610aca565b9350505080806107d290610ae3565b915050610606565b50604051600090339083908381818185875af1925050503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b509091505060018115151461086b5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b50505050565b60006020828403121561088357600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600481106108be57634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c083015161092060c08401826108a0565b5092915050565b6000806020838503121561093a57600080fd5b823567ffffffffffffffff8082111561095257600080fd5b818501915085601f83011261096657600080fd5b81358181111561097557600080fd5b8660208260071b850101111561098a57600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e081016109dc60c08301846108a0565b98975050505050505050565b600080602083850312156109fb57600080fd5b823567ffffffffffffffff80821115610a1357600080fd5b818501915085601f830112610a2757600080fd5b813581811115610a3657600080fd5b8660208260061b850101111561098a57600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9d57600080fd5b81356001600160a01b03811681146105dc57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610add57610add610ab4565b92915050565b600060018201610af557610af5610ab4565b5060010190565b6000825160005b81811015610b1d5760208186018101518583015201610b03565b506000920191825250919050565b600060208284031215610b3d57600080fd5b505191905056fea2646970667358221220648f19b7cbecc5d8f334599230fe401b87cd978a6b609a47cb0554cb5da562b364736f6c63430008120033", } // ETHSwapABI is the input ABI used to generate the binding from. diff --git a/dex/networks/eth/contracts/v1/BinRuntimeV1.go b/dex/networks/eth/contracts/v1/BinRuntimeV1.go deleted file mode 100644 index 9bd4f954ae..0000000000 --- a/dex/networks/eth/contracts/v1/BinRuntimeV1.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package v1 - -const ETHSwapRuntimeBin = "60806040526004361061007b5760003560e01c8063a76f9f2d1161004e578063a76f9f2d1461010a578063d5cfd04914610138578063db3b419c14610158578063eb84e7f21461018557600080fd5b806323f0388b146100805780633da59631146100a257806377d7e031146100b55780638cd8dd97146100ea575b600080fd5b34801561008c57600080fd5b506100a061009b366004610b14565b6101b2565b005b6100a06100b0366004610b89565b610420565b3480156100c157600080fd5b506100d56100d0366004610bec565b61069d565b60405190151581526020015b60405180910390f35b3480156100f657600080fd5b506100a0610105366004610c0e565b610719565b34801561011657600080fd5b5061012a610125366004610c0e565b610911565b6040519081526020016100e1565b34801561014457600080fd5b506100d5610153366004610c0e565b6109f9565b34801561016457600080fd5b50610178610173366004610c0e565b610a2d565b6040516100e19190610c3c565b34801561019157600080fd5b5061012a6101a0366004610c7f565b60006020819052908152604090205481565b3233146101da5760405162461bcd60e51b81526004016101d190610c98565b60405180910390fd5b6000805b8281101561038957368484838181106101f9576101f9610cc2565b60c00291909101915033905061021560a0830160808401610cd8565b6001600160a01b0316146102585760405162461bcd60e51b815260206004820152600a6024820152691b9bdd08185d5d1a195960b21b60448201526064016101d1565b6000808061026584610ae8565b92509250925060008111801561027a57504381105b6102b65760405162461bcd60e51b815260206004820152600d60248201526c0756e66696c6c6564207377617609c1b60448201526064016101d1565b6102c182853561069d565b156103015760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995919595b595960821b60448201526064016101d1565b61031060a0850135853561069d565b61034d5760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081cd958dc995d60921b60448201526064016101d1565b60008381526020818152604090912060a086013590556103709085013587610d1e565b955050505050808061038190610d31565b9150506101de565b50604051600090339083908381818185875af1925050503d80600081146103cc576040519150601f19603f3d011682016040523d82523d6000602084013e6103d1565b606091505b509091505060018115151461041a5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d1565b50505050565b32331461043f5760405162461bcd60e51b81526004016101d190610c98565b6000805b8281101561065e573684848381811061045e5761045e610cc2565b905060a00201905060008160200135116104a25760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101d1565b60006104b46080830160608401610d4a565b67ffffffffffffffff16116104ff5760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101d1565b7f5069ec89f08d9ca0424bb5a5f59c3c60ed50cf06af5911a368e41e771763bfaf8135016105805760405162461bcd60e51b815260206004820152602860248201527f696c6c6567616c2073656372657420686173682028726566756e64207265636f604482015267726420686173682960c01b60648201526084016101d1565b600061058b82610911565b60008181526020819052604090205490915080156105dc5760405162461bcd60e51b815260206004820152600e60248201526d73776170206e6f7420656d70747960901b60448201526064016101d1565b50436105e981843561069d565b156106275760405162461bcd60e51b815260206004820152600e60248201526d3430b9b41031b7b63634b9b4b7b760911b60448201526064016101d1565b6000828152602081815260409091208290556106469084013586610d1e565b9450505050808061065690610d31565b915050610443565b503481146106985760405162461bcd60e51b8152602060048201526007602482015266189859081d985b60ca1b60448201526064016101d1565b505050565b6000816002846040516020016106b591815260200190565b60408051601f19818403018152908290526106cf91610d74565b602060405180830381855afa1580156106ec573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061070f9190610da3565b1490505b92915050565b3233146107385760405162461bcd60e51b81526004016101d190610c98565b6107486080820160608301610d4a565b67ffffffffffffffff164210156107985760405162461bcd60e51b81526020600482015260146024820152731b1bd8dadd1a5b59481b9bdd08195e1c1a5c995960621b60448201526064016101d1565b60008060006107a684610ae8565b9250925092506000811180156107bc5750438111155b6107fa5760405162461bcd60e51b815260206004820152600f60248201526e73776170206e6f742061637469766560881b60448201526064016101d1565b61080582853561069d565b1561084a5760405162461bcd60e51b81526020600482015260156024820152741cddd85c08185b1c9958591e481c995919595b5959605a1b60448201526064016101d1565b600083815260208190526040808220600019905561086e9060608701908701610cd8565b6001600160a01b0316856020013560405160006040518083038185875af1925050503d80600081146108bc576040519150601f19603f3d011682016040523d82523d6000602084013e6108c1565b606091505b509091505060018115151461090a5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101d1565b5050505050565b6000600282356109276060850160408601610cd8565b60601b61093a60a0860160808701610cd8565b60601b856020013560001b8660600160208101906109589190610d4a565b6040805160208101969096526bffffffffffffffffffffffff199485169086015292909116605484015260688301526001600160c01b031960c09190911b16608882015260900160408051601f19818403018152908290526109b991610d74565b602060405180830381855afa1580156109d6573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107139190610da3565b6000806000610a0784610ae8565b925092505080600014158015610a255750610a2382853561069d565b155b949350505050565b604080516060810182526000808252602082018190529181018290529080610a5484610ae8565b9250925050610a7e6040805160608101909152806000815260006020820181905260409091015290565b81600003610aa5578060005b90816003811115610a9d57610a9d610c26565b905250610a25565b60018301610ab557806003610a8a565b610ac083863561069d565b15610ad5576002815260208101839052610a25565b6001815260408101919091529392505050565b600080600080610af785610911565b600081815260208190526040902054909690955085945092505050565b60008060208385031215610b2757600080fd5b823567ffffffffffffffff80821115610b3f57600080fd5b818501915085601f830112610b5357600080fd5b813581811115610b6257600080fd5b86602060c083028501011115610b7757600080fd5b60209290920196919550909350505050565b60008060208385031215610b9c57600080fd5b823567ffffffffffffffff80821115610bb457600080fd5b818501915085601f830112610bc857600080fd5b813581811115610bd757600080fd5b86602060a083028501011115610b7757600080fd5b60008060408385031215610bff57600080fd5b50508035926020909101359150565b600060a08284031215610c2057600080fd5b50919050565b634e487b7160e01b600052602160045260246000fd5b8151606082019060048110610c6157634e487b7160e01b600052602160045260246000fd5b80835250602083015160208301526040830151604083015292915050565b600060208284031215610c9157600080fd5b5035919050565b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610cea57600080fd5b81356001600160a01b0381168114610d0157600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561071357610713610d08565b600060018201610d4357610d43610d08565b5060010190565b600060208284031215610d5c57600080fd5b813567ffffffffffffffff81168114610d0157600080fd5b6000825160005b81811015610d955760208186018101518583015201610d7b565b506000920191825250919050565b600060208284031215610db557600080fd5b505191905056fea2646970667358221220420ce9cfd5a39be8e719369517f704148d580fb33472b5b8947c77d61eee66d664736f6c63430008120033" diff --git a/dex/networks/eth/contracts/v1/contract.bin b/dex/networks/eth/contracts/v1/contract.bin new file mode 100644 index 0000000000000000000000000000000000000000..c68e299ad65f5e2cdb9957336a096684962928d4 GIT binary patch literal 3602 zcma)9eQZ#DQ*2>yZwzR;ylKsU7nGol8C-T1v7c zYqn91_nz$l{gCc+lPnQovp}qWwxUVXNR<}$M>S2G=>7;$RwgEG{TiFPR$J9dZFlZ{ z&rTj#Rc-nC`kr%t=bU?g=bUTMA+5IRF)Br}AnBiL3JrgxQ%MHtevm%?0=OJ}Z4oLR zMTHbxZ_&G79Q^ftO;ma;YY(H8gmAcg@y#FLa0d?m^4;&v;;;*c|17-w5e|zsy54=~ zhdZ8)Qb|Wq`?;wtI6Q;HvCG%_a2|)xUAgv49Db11gg?T!=PJHQWh$L&10QXOW;9C9 zXEaHpeDY;6c@igmaz+!2E>ssSQ|V11zkzc9>5K;HP8N$9D#(P7b<4{>wio@cx~NP^ z9beRV8!ieYY)}%f$jP@T*<6*^H`$;9l1hJbv>&c$OUslzzM}o9Bk!rm$xkU6smeq5 z2{gp97;SvOQMRheXu2$vkD;CfvcXh_meWk$V`Q|g+i<_HW-+dVyOMu`e*>2h0=!DkW`LU0#;^(RkV3vSrIzd4bE^GSG^OM18~+;3f{p56ity_eBS z3V(xSG$9i`KhG*1Mnt2YS8GCt1@u55^G@H?8*gNG2DU%79%kL>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a/dex/networks/eth/params.go +++ b/dex/networks/eth/params.go @@ -66,8 +66,8 @@ var ( dex.Simnet: common.HexToAddress("0x2f68e723b8989ba1c6a9f03e42f33cb7dc9d606f"), }, 1: { - dex.Mainnet: common.Address{}, - dex.Testnet: common.Address{}, + dex.Mainnet: common.HexToAddress("0xa958d5B8a3a29E3f5f41742Fbb939A0dd93EB418"), // tx 0x4adf0314237c454acee1f8d33e97f84126af612245cad0794471693f0906610e + dex.Testnet: common.HexToAddress("0x9CDe3c347021F0AA63E2780dAD867B5949c5E083"), // tx 0x90f18e70121598a48fc49a5d5b0328358eb34441e2c5dee439dda2dfc7bf3dd8 dex.Simnet: common.HexToAddress("0x2f68e723b8989ba1c6a9f03e42f33cb7dc9d606f"), }, } diff --git a/dex/networks/eth/tokens.go b/dex/networks/eth/tokens.go index d6e6c9f4d4..c77da808e0 100644 --- a/dex/networks/eth/tokens.go +++ b/dex/networks/eth/tokens.go @@ -101,6 +101,32 @@ var Tokens = map[uint32]*Token{ Transfer: 85_100, }, }, + 1: { + // deploy tx: https://etherscan.io/tx/0x49a382f1ae27fd5191c8b92f14738ea934cdb1e167b1a59e2c4a3022097a35b1 + // swap contract: https://etherscan.io/address/0xd45e648D97Beb2ee0045E5e91d1C2C751Cd0Bc00 + Address: common.HexToAddress("0xd45e648D97Beb2ee0045E5e91d1C2C751Cd0Bc00"), + Gas: Gases{ + // First swap used 98443 gas Recommended Gases.Swap = 127975 + // 1 additional swaps averaged 26491 gas each. Recommended Gases.SwapAdd = 34438 + // [98443 124934] + // First redeem used 54761 gas. Recommended Gases.Redeem = 71189 + // 1 additional redeems averaged 10722 gas each. recommended Gases.RedeemAdd = 13938 + // [54761 65483] + // Average of 2 refunds: 58328. Recommended Gases.Refund = 75826 + // [58289 58367] + // Average of 2 approvals: 55882. Recommended Gases.Approve = 72646 + // [55882 55882] + // Average of 1 transfers: 62224. Recommended Gases.Transfer = 80891 + // [62224] + Swap: 127_975, + SwapAdd: 34_438, + Redeem: 71_189, + RedeemAdd: 13_938, + Refund: 75_826, + Approve: 72_646, + Transfer: 80_891, + }, + }, }, }, dex.Testnet: { @@ -154,24 +180,29 @@ var Tokens = map[uint32]*Token{ }, }, 1: { - // Swap contract address. The simnet harness writes this - // address to file. Live tests must populate this field. - Address: common.Address{}, + // deploy tx: https://sepolia.etherscan.io/tx/0x2955323c4ff389d37b95c2c4c9c47044346c4aa52419711db880836710136c52 + // swap contract: https://sepolia.etherscan.io/address/0x0F373a20Fa2c4ecB42984C2e6bE2B3C594E97B85 + Address: common.HexToAddress("0x0F373a20Fa2c4ecB42984C2e6bE2B3C594E97B85"), Gas: Gases{ - Swap: 95_000, // [86009 112920 139831 166742 193651] - SwapAdd: 30_000, // avg SwapAdd 26910 - Redeem: 50_000, // [42569 53614 64646 75703 86734] - RedeemAdd: 14_000, // avg RedeemAdd 11038 - Refund: 50_000, // [45306 45306 45306 45306 45294] avg: 45303 - // Approve is the gas used to call the approve - // method of the contract. For Approve transactions, - // the very first approval for an account-spender - // pair takes more than subsequent approvals. The - // results are repeated for a different account's - // first approvals on the same contract, so it's not - // just the global first. - Approve: 46_000, - Transfer: 33_000, + // First swap used 98310 gas Recommended Gases.Swap = 127803 + // 2 additional swaps averaged 26507 gas each. Recommended Gases.SwapAdd = 34459 + // [98310 124825 151325] + // First redeem used 54672 gas. Recommended Gases.Redeem = 71073 + // 2 additional redeems averaged 10726 gas each. recommended Gases.RedeemAdd = 13943 + // [54672 65406 76124] + // Average of 3 refunds: 58056. Recommended Gases.Refund = 75472 + // [58187 58278 57705] + // Average of 2 approvals: 55785. Recommended Gases.Approve = 72520 + // [55785 55785] + // Average of 1 transfers: 62135. Recommended Gases.Transfer = 80775 + // [62135] + Swap: 127_803, + SwapAdd: 34_459, + Redeem: 71_073, + RedeemAdd: 13_943, + Refund: 75_472, + Approve: 72_520, + Transfer: 80_775, }, }, }, @@ -192,7 +223,7 @@ var Tokens = map[uint32]*Token{ }, }, 1: { - Address: common.Address{}, + Address: common.Address{}, // Filled in by MaybeReadSimnetAddrs Gas: Gases{ Swap: 174_000, // [171756 284366 396976 509586 622184] SwapAdd: 115_000, @@ -254,6 +285,32 @@ var Tokens = map[uint32]*Token{ Transfer: 82_124, }, }, + 1: { + // deploy tx: https://etherscan.io/tx/0xf0549c2ec72d1beba23b239a1ad5901c7efce1daeeb38e976f8da224112380a9 + // swap contract: https://etherscan.io/address/0x11158fDeF839FC4e50b78cc3931683b441E8B9f5 + Address: common.HexToAddress("0x11158fDeF839FC4e50b78cc3931683b441E8B9f5"), + // First swap used 95314 gas Recommended Gases.Swap = 123908 + // 1 additional swaps averaged 26503 gas each. Recommended Gases.SwapAdd = 34453 + // [95314 121817] + // First redeem used 55512 gas. Recommended Gases.Redeem = 72165 + // 1 additional redeems averaged 10710 gas each. recommended Gases.RedeemAdd = 13923 + // [55512 66222] + // Average of 2 refunds: 59072. Recommended Gases.Refund = 76793 + // [59036 59109] + // Average of 2 approvals: 48897. Recommended Gases.Approve = 63566 + // [48897 48897] + // Average of 1 transfers: 63173. Recommended Gases.Transfer = 82124 + // [63173] + Gas: Gases{ + Swap: 123_908, + SwapAdd: 34_453, + Redeem: 72_165, + RedeemAdd: 13_923, + Refund: 76_793, + Approve: 63_566, + Transfer: 82_124, + }, + }, }, }, dex.Testnet: { @@ -285,13 +342,39 @@ var Tokens = map[uint32]*Token{ Transfer: 82_196, }, }, + 1: { + // deploy tx: https://sepolia.etherscan.io/tx/0x2298079e0201e9fd82b0294e4e32607174090c3f84313560d8e18179d3051fe3 + // swap contract: https://sepolia.etherscan.io/address/0x10cFdf5ba50ebc3974564913eF983B46FD4A08F4 + Address: common.HexToAddress("0x10cFdf5ba50ebc3974564913eF983B46FD4A08F4"), + Gas: Gases{ + // First swap used 95350 gas Recommended Gases.Swap = 123955 + // 2 additional swaps averaged 26501 gas each. Recommended Gases.SwapAdd = 34451 + // [95350 121853 148353] + // First redeem used 55567 gas. Recommended Gases.Redeem = 72237 + // 2 additional redeems averaged 10714 gas each. recommended Gases.RedeemAdd = 13928 + // [55567 66289 76995] + // Average of 3 refunds: 58950. Recommended Gases.Refund = 76635 + // [59092 58595 59164] + // Average of 2 approvals: 48930. Recommended Gases.Approve = 63609 + // [48930 48930] + // Average of 1 transfers: 63216. Recommended Gases.Transfer = 82180 + // [63216] + Swap: 123_955, + SwapAdd: 34_451, + Redeem: 72_237, + RedeemAdd: 13_928, + Refund: 76_635, + Approve: 63_609, + Transfer: 82_180, + }, + }, }, }, dex.Simnet: { Address: common.Address{}, SwapContracts: map[uint32]*SwapContract{ 0: { - Address: common.Address{}, + Address: common.Address{}, // Filled in by MaybeReadSimnetAddrs Gas: Gases{ Swap: 242_000, SwapAdd: 146_400, @@ -300,7 +383,8 @@ var Tokens = map[uint32]*Token{ Refund: 77_000, Approve: 78_400, Transfer: 85_100, - }}, + }, + }, }, }, }, diff --git a/dex/networks/polygon/params.go b/dex/networks/polygon/params.go index c77dac7eef..6ea4ce3b6a 100644 --- a/dex/networks/polygon/params.go +++ b/dex/networks/polygon/params.go @@ -38,8 +38,26 @@ var ( Refund: 55_000, } + v1Gases = &dexeth.Gases{ + Swap: 62_842, + // 4 additional swaps averaged 26499 gas each. Recommended Gases.SwapAdd = 34448 + // [48340 74837 101338 127836 154338] + SwapAdd: 34_448, + // First redeem used 39496 gas. Recommended Gases.Redeem = 51344 + Redeem: 51_344, + // 4 additional redeems averaged 10744 gas each. recommended Gases.RedeemAdd = 13967 + // [39496 50238 60984 71727 82473] + RedeemAdd: 13_967, + // *** Compare expected Swap + Redeem = 88k with UniSwap v2: 102k, v3: 127k + // *** A 1-match order is cheaper than UniSwap. + // Average of 5 refunds: 39918. Recommended Gases.Refund = 51893 + // [39918 39918 39918 39918 39918] + Refund: 51_893, + } + VersionedGases = map[uint32]*dexeth.Gases{ 0: v0Gases, + 1: v1Gases, } ContractAddresses = map[uint32]map[dex.Network]common.Address{ @@ -48,7 +66,11 @@ var ( dex.Testnet: common.HexToAddress("0x73bc803A2604b2c58B8680c3CE1b14489842EF16"), // txid: 0x88f656a8e432fdd50f33e67bdc39a66d24f663e33792bfab16b033dd2c609a99 dex.Simnet: common.HexToAddress(""), // Filled in by MaybeReadSimnetAddrs }, - 1: {}, + 1: { + dex.Mainnet: common.HexToAddress("0xcb9B5AD64FD3fc20215f744293d95887c888B8a5"), // txid: 0x35e5318f3b91b9890a59b0907c6fe9603cc46651111ee18e4df142c7a39cdc10 + dex.Testnet: common.HexToAddress("0xFbF60393F5AB800139F283cc6e090a17db6cC7a1"), // txid: 0xab730f7c64f4af013a590e0c9521a9caa29f549462de842c67c7c9c6c08f8c3e + dex.Simnet: common.HexToAddress(""), // Filled in by MaybeReadSimnetAddrs + }, } MultiBalanceAddresses = map[dex.Network]common.Address{ @@ -111,6 +133,32 @@ var ( Transfer: 85_150, }, }, + 1: { + // deploy tx: https://polygonscan.com/tx/0xd0b8a2ed95e522ebdb15490f2af8504dcb84d0081ad42e89278201696eff783a + // swap contract: https://polygonscan.com/address/0x4ce6d6514e27c703591eac3862b1f4aedb22a204 + Address: common.HexToAddress("0x4cE6D6514e27c703591eaC3862B1F4aedb22A204"), + Gas: dexeth.Gases{ + // First swap used 98322 gas Recommended Gases.Swap = 127818 + // 1 additional swaps averaged 26503 gas each. Recommended Gases.SwapAdd = 34453 + // [98322 124825] + // First redeem used 54684 gas. Recommended Gases.Redeem = 71089 + // 1 additional redeems averaged 10722 gas each. recommended Gases.RedeemAdd = 13938 + // [54684 65406] + // Average of 2 refunds: 60205. Recommended Gases.Refund = 78266 + // [60205 60205] + // Average of 2 approvals: 55785. Recommended Gases.Approve = 72520 + // [55785 55785] + // Average of 1 transfers: 62135. Recommended Gases.Transfer = 80775 + // [62135] + Swap: 127_818, + SwapAdd: 34_453, + Redeem: 71_089, + RedeemAdd: 13_938, + Refund: 78_266, + Approve: 72_520, + Transfer: 80_775, + }, + }, }, }, dex.Testnet: { @@ -142,6 +190,32 @@ var ( Transfer: 82_816, }, }, + 1: { + // deploy tx: https://amoy.polygonscan.com/tx/0x7e0ad6974b41bf0012877cbd6b966aca731cbed2838aa4616fcc2a8c369d661e + // swap contract: https://amoy.polygonscan.com/address/0xA41505bc164d1Fb70D25218EaFaD17C2D4e50e77 + Address: common.HexToAddress("0xA41505bc164d1Fb70D25218EaFaD17C2D4e50e77"), + Gas: dexeth.Gases{ + // First swap used 98322 gas Recommended Gases.Swap = 127818 + // 2 additional swaps averaged 26495 gas each. Recommended Gases.SwapAdd = 34443 + // [98322 124825 151313] + // First redeem used 54684 gas. Recommended Gases.Redeem = 71089 + // 2 additional redeems averaged 10708 gas each. recommended Gases.RedeemAdd = 13920 + // [54684 65406 76100] + // Average of 3 refunds: 57705. Recommended Gases.Refund = 75016 + // [57705 57705 57705] + // Average of 2 approvals: 55785. Recommended Gases.Approve = 72520 + // [55785 55785] + // Average of 1 transfers: 62135. Recommended Gases.Transfer = 80775 + // [62135] + Swap: 127_818, + SwapAdd: 34_443, + Redeem: 71_089, + RedeemAdd: 13_920, + Refund: 75_016, + Approve: 72_520, + Transfer: 80_775, + }, + }, }, }, dex.Simnet: { @@ -160,7 +234,7 @@ var ( }, }, 1: { - Address: common.Address{}, + Address: common.Address{}, // Filled in by MaybeReadSimnetAddrs Gas: dexeth.Gases{ Swap: 174_000, // [171756 284366 396976 509586 622184] SwapAdd: 115_000, @@ -220,6 +294,32 @@ var ( Transfer: 74_451, }, }, + 1: { + // deploy tx: https://polygonscan.com/tx/0x55d6228406d116bf3a0a6678dc019f58c3e0d6a55c5f6a653c6825f741d717b0 + // swap contract: https://polygonscan.com/address/0x14D19F97785A299c47a4e10601C5780bdb9A0206 + Address: common.HexToAddress("0x14D19F97785A299c47a4e10601C5780bdb9A0206"), + Gas: dexeth.Gases{ + // First swap used 95187 gas Recommended Gases.Swap = 123743 + // 1 additional swaps averaged 26503 gas each. Recommended Gases.SwapAdd = 34453 + // [95187 121690] + // First redeem used 49819 gas. Recommended Gases.Redeem = 64764 + // 1 additional redeems averaged 10722 gas each. recommended Gases.RedeemAdd = 13938 + // [49819 60541] + // Average of 2 refunds: 62502. Recommended Gases.Refund = 81252 + // [62502 62502] + // Average of 2 approvals: 52072. Recommended Gases.Approve = 67693 + // [52072 52072] + // Average of 1 transfers: 57270. Recommended Gases.Transfer = 74451 + // [57270] + Swap: 123_743, + SwapAdd: 34_453, + Redeem: 72_237, // using eth testnet value which is higher + RedeemAdd: 13_928, + Refund: 81_252, + Approve: 67_693, + Transfer: 82_180, // using eth testnet value which is higher + }, + }, }, }, dex.Simnet: { @@ -286,6 +386,32 @@ var ( Transfer: 67_483, }, }, + 1: { + // deploy tx: https://polygonscan.com/tx/0xaf897a42db8bd52fa1a233489746561def4562d933d23795f7e5774a32b0afd9 + // swap contract: https://polygonscan.com/address/0xD123F0ed3c97b2990A11BF5C06eed3e184b4aEAC + Address: common.HexToAddress("0xD123F0ed3c97b2990A11BF5C06eed3e184b4aEAC"), + Gas: dexeth.Gases{ + // First swap used 89867 gas Recommended Gases.Swap = 116827 + // 1 additional swaps averaged 26527 gas each. Recommended Gases.SwapAdd = 34485 + // [89867 116394] + // First redeem used 44483 gas. Recommended Gases.Redeem = 57827 + // 1 additional redeems averaged 10746 gas each. recommended Gases.RedeemAdd = 13969 + // [44483 55229] + // Average of 2 refunds: 49766. Recommended Gases.Refund = 64695 + // [49766 49766] + // Average of 2 approvals: 46712. Recommended Gases.Approve = 60725 + // [46712 46712] + // Average of 1 transfers: 51910. Recommended Gases.Transfer = 67483 + // [51910] + Swap: 116_827, + SwapAdd: 34_485, + Redeem: 57_827, + RedeemAdd: 13_969, + Refund: 64_695, + Approve: 60_725, + Transfer: 67_483, + }, + }, }, }, }, @@ -338,6 +464,32 @@ var ( Transfer: 74_451, }, }, + 1: { + // deploy tx: https://polygonscan.com/tx/0xbcd772a2439c56ea1ba96437775dde729ac6f1b992ed93c06fad588cc4e4cd26 + // swap contract: https://polygonscan.com/address/0xA2A3B9CFFd040C7DddF1c8153b5501c3492F7B18 + Address: common.HexToAddress("0xA2A3B9CFFd040C7DddF1c8153b5501c3492F7B18"), + Gas: dexeth.Gases{ + // First swap used 95187 gas Recommended Gases.Swap = 123743 + // 1 additional swaps averaged 26503 gas each. Recommended Gases.SwapAdd = 34453 + // [95187 121690] + // First redeem used 49819 gas. Recommended Gases.Redeem = 64764 + // 1 additional redeems averaged 10722 gas each. recommended Gases.RedeemAdd = 13938 + // [49819 60541] + // Average of 2 refunds: 62502. Recommended Gases.Refund = 81252 + // [62502 62502] + // Average of 2 approvals: 52072. Recommended Gases.Approve = 67693 + // [52072 52072] + // Average of 1 transfers: 57270. Recommended Gases.Transfer = 74451 + // [57270] + Swap: 123_743, + SwapAdd: 34_453, + Redeem: 64_764, + RedeemAdd: 13_938, + Refund: 81_252, + Approve: 67_693, + Transfer: 74_451, + }, + }, }, }, }, diff --git a/dex/testing/dcrdex/harness.sh b/dex/testing/dcrdex/harness.sh index edb7f267ed..a94c0624ad 100755 --- a/dex/testing/dcrdex/harness.sh +++ b/dex/testing/dcrdex/harness.sh @@ -127,8 +127,6 @@ chmod +x "${DCRDEX_DATA_DIR}/quit" cat > "${DCRDEX_DATA_DIR}/evm-protocol-overrides.json" < "${NODES_ROOT}/eth_swap_contract_address_v0.txt" < "${NODES_ROOT}/eth_swap_contract_address_v1.txt" < "${HARNESS_DIR}/sendUSDT" < "${NODES_ROOT}/usdc_swap_contract_address_v0.txt" < "${NODES_ROOT}/usdc_swap_contract_address_v1.txt" < "${HARNESS_DIR}/bw1ctl" chmod +x "${HARNESS_DIR}/bw1ctl" echo "xdg-open http://${CLIENT_2_ADDR} > /dev/null 2>&1" > "${HARNESS_DIR}/dexc2" -chmod +x "${HARNESS_DIR}/dexc2" +chmod +x "${HARNESS_DIR}/bisonw2" echo "bwctl -C ${CLIENT_2_CTL_CONF} \$1" > "${HARNESS_DIR}/bw2ctl" chmod +x "${HARNESS_DIR}/bw2ctl" diff --git a/server/asset/eth/coiner_test.go b/server/asset/eth/coiner_test.go index 1b658b989a..2ea5f83f1c 100644 --- a/server/asset/eth/coiner_test.go +++ b/server/asset/eth/coiner_test.go @@ -123,8 +123,6 @@ func TestNewRedeemCoin(t *testing.T) { t.Fatalf("unexpected error for test %q: %v", test.name, err) } - fmt.Println("--", rc.gasFeeCap == nil, rc.gasTipCap == nil) - if test.txErr == nil && (!bytes.Equal(rc.locator, test.locator) || rc.secret != secretB || rc.value != 0 || diff --git a/server/cmd/dcrdex/evm-protocol-overrides.json b/server/cmd/dcrdex/evm-protocol-overrides.json index ad3cb65d05..9e26dfeeb6 100644 --- a/server/cmd/dcrdex/evm-protocol-overrides.json +++ b/server/cmd/dcrdex/evm-protocol-overrides.json @@ -1,10 +1 @@ -{ - "eth": 0, - "usdc.eth": 0, - "usdt.eth": 0, - "polygon": 0, - "usdc.polygon": 0, - "usdt.polygon": 0, - "wbtc.polygon": 0, - "weth.polygon": 0 -} \ No newline at end of file +{} \ No newline at end of file