diff --git a/client/asset/eth/eth.go b/client/asset/eth/eth.go index e3e38b44b4..431f6ae4e4 100644 --- a/client/asset/eth/eth.go +++ b/client/asset/eth/eth.go @@ -368,7 +368,8 @@ type monitoredTx struct { // replacedTx could be set when the tx is created, be immutable, and not // need the mutex, but since Redeem doesn't know if the transaction is a // replacement or a new one, this variable is set in recordReplacementTx. - replacedTx *common.Hash + replacedTx *common.Hash + errorsBroadcasted uint16 } // MarshalBinary marshals a monitoredTx into a byte array. @@ -3235,8 +3236,13 @@ func (w *assetWallet) SwapConfirmations(ctx context.Context, coinID dex.Bytes, c } spent = swapData.State >= dexeth.SSRedeemed - confs = uint32(hdr.Number.Uint64() - swapData.BlockHeight + 1) - + tip := hdr.Number.Uint64() + // TODO: If tip < swapData.BlockHeight (which has been observed), what does + // that mean? Are we using the wrong provider in a multi-provider setup? How + // do we resolve provider relevance? + if tip >= swapData.BlockHeight { + confs = uint32(hdr.Number.Uint64() - swapData.BlockHeight + 1) + } return } @@ -3763,6 +3769,8 @@ func (w *assetWallet) resubmitRedemption(tx *types.Transaction, contractVersion var replacementHash common.Hash copy(replacementHash[:], txs[0]) + w.log.Infof("Redemption transaction %s was broadcast to replace transaction %s (original tx: %s)", replacementHash, monitoredTx.tx.Hash(), tx.Hash()) + if monitoredTx != nil { err = w.recordReplacementTx(monitoredTx, replacementHash) if err != nil { @@ -4041,11 +4049,27 @@ func (w *assetWallet) confirmRedemption(coinID dex.Bytes, redemption *asset.Rede w.clearMonitoredTx(monitoredTx) return confStatus(txConfsNeededToConfirm, txHash), nil } - replacementTxHash, err := w.resubmitRedemption(tx, contractVer, nil, feeWallet, monitoredTx) - if err != nil { - return nil, err + + w.log.Errorf("Redemption transaction rejected!!! Tx %s failed to redeem %s funds", tx.Hash(), dex.BipIDSymbol(w.assetID)) + // Only broadcast a single replacement before giving up. + if monitoredTx.replacedTx == nil { + w.log.Infof("Attempting to resubmit a %s redemption with secret hash %s", dex.BipIDSymbol(w.assetID), hex.EncodeToString(secretHash[:])) + replacementTxHash, err := w.resubmitRedemption(tx, contractVer, nil, feeWallet, monitoredTx) + if err != nil { + return nil, err + } + return confStatus(0, *replacementTxHash), nil } - return confStatus(0, *replacementTxHash), nil + // We've failed to redeem twice. We can't keep broadcasting txs into the + // void. We have to give up. Print a bunch of errors and then report + // the redemption as confirmed so we'll stop following it. + if monitoredTx.errorsBroadcasted < 100 { + monitoredTx.errorsBroadcasted++ + return nil, fmt.Errorf("failed to redeem %s swap with secret hash %s twice. not trying again", + dex.BipIDSymbol(w.assetID), hex.EncodeToString(secretHash[:])) + } + const aTonOfFakeConfs = 1e3 + return confStatus(aTonOfFakeConfs, txHash), nil } if confirmations > 0 { return confStatus(confirmations, txHash), nil @@ -4637,10 +4661,9 @@ func getFileCredentials(chain, path string, net dex.Network) (seed []byte, provi } seed = p.Seed for _, uri := range p.Providers[chain][net.String()] { - if strings.HasPrefix(uri, "#") || strings.HasPrefix(uri, ";") { - continue + if !strings.HasPrefix(uri, "#") && !strings.HasPrefix(uri, ";") { + providers = append(providers, uri) } - providers = append(providers, uri) } if net == dex.Simnet && len(providers) == 0 { u, _ := user.Current() @@ -5319,7 +5342,7 @@ func getGasEstimates(ctx context.Context, cl, acl ethFetcher, c contractor, ac t copy(randomAddr[:], encode.RandomBytes(20)) transferTx, err := tc.transfer(txOpts, randomAddr, big.NewInt(1)) if err != nil { - return fmt.Errorf("error estimating transfer gas: %w", err) + return fmt.Errorf("transfer error: %w", err) } if err = waitForConfirmation(ctx, cl, transferTx.Hash()); err != nil { return fmt.Errorf("error waiting for transfer tx: %w", err) diff --git a/client/asset/polygon/polygon.go b/client/asset/polygon/polygon.go index cd78a5dc9a..809e0c3506 100644 --- a/client/asset/polygon/polygon.go +++ b/client/asset/polygon/polygon.go @@ -30,6 +30,8 @@ func init() { asset.Register(BipID, &Driver{}) registerToken(simnetTokenID, "A token wallet for the DEX test token. Used for testing DEX software.", dex.Simnet) registerToken(usdcTokenID, "The USDC Ethereum ERC20 token.", dex.Mainnet, dex.Testnet) + registerToken(wbtcTokenID, "Wrapped BTC.", dex.Mainnet) + registerToken(wethTokenID, "Wrapped ETH.", dex.Mainnet) } const ( @@ -43,6 +45,8 @@ const ( var ( simnetTokenID, _ = dex.BipSymbolID("dextt.polygon") usdcTokenID, _ = dex.BipSymbolID("usdc.polygon") + wethTokenID, _ = dex.BipSymbolID("weth.polygon") + wbtcTokenID, _ = dex.BipSymbolID("wbtc.polygon") // WalletInfo defines some general information about a Polygon Wallet(EVM // Compatible). diff --git a/client/webserver/site/src/html/bodybuilder.tmpl b/client/webserver/site/src/html/bodybuilder.tmpl index d50ce4f641..865f54d0e0 100644 --- a/client/webserver/site/src/html/bodybuilder.tmpl +++ b/client/webserver/site/src/html/bodybuilder.tmpl @@ -103,7 +103,7 @@ {{end}} {{define "bottom"}} - + {{end}} diff --git a/client/webserver/site/src/img/coins/wbtc.png b/client/webserver/site/src/img/coins/wbtc.png new file mode 100644 index 0000000000..e89565a932 Binary files /dev/null and b/client/webserver/site/src/img/coins/wbtc.png differ diff --git a/client/webserver/site/src/img/coins/wbtc.svg b/client/webserver/site/src/img/coins/wbtc.svg new file mode 100644 index 0000000000..aaa637fcff --- /dev/null +++ b/client/webserver/site/src/img/coins/wbtc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/webserver/site/src/img/coins/weth.png b/client/webserver/site/src/img/coins/weth.png new file mode 100644 index 0000000000..1824b08123 Binary files /dev/null and b/client/webserver/site/src/img/coins/weth.png differ diff --git a/client/webserver/site/src/img/coins/weth.svg b/client/webserver/site/src/img/coins/weth.svg new file mode 100644 index 0000000000..2f2b3c084d --- /dev/null +++ b/client/webserver/site/src/img/coins/weth.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/webserver/site/src/js/doc.ts b/client/webserver/site/src/js/doc.ts index dd7958ca4d..50fa30ee08 100644 --- a/client/webserver/site/src/js/doc.ts +++ b/client/webserver/site/src/js/doc.ts @@ -29,7 +29,9 @@ const BipIDs: Record = { 60000: 'dextt.eth', 60001: 'usdc.eth', 966000: 'dextt.polygon', - 966001: 'usdc.polygon' + 966001: 'usdc.polygon', + 966002: 'weth.polygon', + 966003: 'wbtc.polygon' } const BipSymbolIDs: Record = {}; diff --git a/dex/bip-id.go b/dex/bip-id.go index cbe60cd736..26b3ff1ef7 100644 --- a/dex/bip-id.go +++ b/dex/bip-id.go @@ -619,6 +619,8 @@ var bipIDs = map[uint32]string{ // Polygon reserved token range 966000-966999 966000: "dextt.polygon", 966001: "usdc.polygon", + 966002: "weth.polygon", + 966003: "wbtc.polygon", // END Polygon reserved token range 1171337: "ilt", 1313114: "etho", diff --git a/dex/networks/polygon/params.go b/dex/networks/polygon/params.go index 0693f7d92a..868da483a0 100644 --- a/dex/networks/polygon/params.go +++ b/dex/networks/polygon/params.go @@ -57,128 +57,239 @@ var ( testTokenID, _ = dex.BipSymbolID("dextt.polygon") usdcTokenID, _ = dex.BipSymbolID("usdc.polygon") + wethTokenID, _ = dex.BipSymbolID("weth.polygon") + wbtcTokenID, _ = dex.BipSymbolID("wbtc.polygon") Tokens = map[uint32]*dexeth.Token{ - testTokenID: { - Token: &dex.Token{ - ParentID: PolygonBipID, - Name: "DCRDEXTestToken", - UnitInfo: dex.UnitInfo{ - AtomicUnit: "Dextoshi", - Conventional: dex.Denomination{ - Unit: "DEXTT", - ConversionFactor: dexeth.GweiFactor, - }, + testTokenID: TestToken, + usdcTokenID: TokenUSDC, + wethTokenID: TokenWETH, + wbtcTokenID: TokenWBTC, + } + + // TestToken is the siment test token + TestToken = &dexeth.Token{ + Token: &dex.Token{ + ParentID: PolygonBipID, + Name: "DCRDEXTestToken", + UnitInfo: dex.UnitInfo{ + AtomicUnit: "Dextoshi", + Conventional: dex.Denomination{ + Unit: "DEXTT", + ConversionFactor: dexeth.GweiFactor, }, }, - NetTokens: map[dex.Network]*dexeth.NetToken{ - dex.Simnet: { - // ERC20 token contract address. The simnet harness writes this - // address to file. Live tests must populate this field. - Address: common.Address{}, - SwapContracts: map[uint32]*dexeth.SwapContract{ - 0: { - Address: common.Address{}, // Set in MaybeReadSimnetAddrs - Gas: dexeth.Gases{ - // First swap used 171664 gas Recommended Gases.Swap = 223163 - // 4 additional swaps averaged 112615 gas each. Recommended Gases.SwapAdd = 146399 - // [171664 284279 396882 509509 622124] - Swap: 223_163, - SwapAdd: 146_399, - // First redeem used 63170 gas. Recommended Gases.Redeem = 82121 - // 4 additional redeems averaged 31626 gas each. recommended Gases.RedeemAdd = 41113 - // [63170 94799 126416 158058 189675] - Redeem: 82_121, - RedeemAdd: 41_113, - // Average of 5 refunds: 48098. Recommended Gases.Refund = 62527 - // [48098 48098 48098 48098 48098] - Refund: 62_527, - // Average of 2 approvals: 44754. Recommended Gases.Approve = 58180 - // [44754 44754] - Approve: 58_180, - // Average of 1 transfers: 49646. Recommended Gases.Transfer = 64539 - // [49646] - Transfer: 64_539, - }, + }, + NetTokens: map[dex.Network]*dexeth.NetToken{ + dex.Simnet: { + // ERC20 token contract address. The simnet harness writes this + // address to file. Live tests must populate this field. + Address: common.Address{}, + SwapContracts: map[uint32]*dexeth.SwapContract{ + 0: { + Address: common.Address{}, // Set in MaybeReadSimnetAddrs + Gas: dexeth.Gases{ + // First swap used 171664 gas Recommended Gases.Swap = 223163 + // 4 additional swaps averaged 112615 gas each. Recommended Gases.SwapAdd = 146399 + // [171664 284279 396882 509509 622124] + Swap: 223_163, + SwapAdd: 146_399, + // First redeem used 63170 gas. Recommended Gases.Redeem = 82121 + // 4 additional redeems averaged 31626 gas each. recommended Gases.RedeemAdd = 41113 + // [63170 94799 126416 158058 189675] + Redeem: 82_121, + RedeemAdd: 41_113, + // Average of 5 refunds: 48098. Recommended Gases.Refund = 62527 + // [48098 48098 48098 48098 48098] + Refund: 62_527, + // Average of 2 approvals: 44754. Recommended Gases.Approve = 58180 + // [44754 44754] + Approve: 58_180, + // Average of 1 transfers: 49646. Recommended Gases.Transfer = 64539 + // [49646] + Transfer: 64_539, }, }, }, }, }, + } - usdcTokenID: { - EVMFactor: new(int64), - Token: &dex.Token{ - ParentID: PolygonBipID, - Name: "USDC", - UnitInfo: dex.UnitInfo{ - AtomicUnit: "microUSD", - Conventional: dex.Denomination{ - Unit: "USDC", - ConversionFactor: 1e6, + TokenUSDC = &dexeth.Token{ + EVMFactor: new(int64), + Token: &dex.Token{ + ParentID: PolygonBipID, + Name: "USDC", + UnitInfo: dex.UnitInfo{ + AtomicUnit: "microUSD", + Conventional: dex.Denomination{ + Unit: "USDC", + ConversionFactor: 1e6, + }, + }, + }, + NetTokens: map[dex.Network]*dexeth.NetToken{ + dex.Mainnet: { + Address: common.HexToAddress("0x2791bca1f2de4661ed88a30c99a7a9449aa84174"), // https://polygonscan.com/address/0x2791bca1f2de4661ed88a30c99a7a9449aa84174 + SwapContracts: map[uint32]*dexeth.SwapContract{ + 0: { + // deploy tx: https://polygonscan.com/tx/0xe5a22c2c5c9a216dd648f12d1654c0e3a4e8d541f62eefe2a938cfe015826ccb + // swap contract: https://polygonscan.com/address/0x73bc803A2604b2c58B8680c3CE1b14489842EF16 + Address: common.HexToAddress("0x73bc803A2604b2c58B8680c3CE1b14489842EF16"), + Gas: dexeth.Gases{ + // First swap used 187794 gas Recommended Gases.Swap = 244132 + // 4 additional swaps averaged 112591 gas each. Recommended Gases.SwapAdd = 146368 + // [187794 300385 412976 525567 638158] + Swap: 244_132, + SwapAdd: 146_368, + // First redeem used 77040 gas. Recommended Gases.Redeem = 100152 + // 4 additional redeems averaged 31629 gas each. recommended Gases.RedeemAdd = 41117 + // [77040 108669 140298 171928 203557] + // Observed 98,928 on mainnet. Bumping from + // recommendation. + Redeem: 125_152, + RedeemAdd: 41_117, + // Average of 5 refunds: 69474. Recommended Gases.Refund = 90316 + // [69474 69474 69474 69474 69474] + Refund: 90_316, + // Average of 2 approvals: 58446. Recommended Gases.Approve = 75979 + // [58446 58446] + Approve: 75_979, + // Average of 1 transfers: 63504. Recommended Gases.Transfer = 82555 + // [63504] + Transfer: 82_555, + }, + }, + }, + }, + dex.Testnet: { + Address: common.HexToAddress("0x0fa8781a83e46826621b3bc094ea2a0212e71b23"), // https://polygonscan.com/address/0x2791bca1f2de4661ed88a30c99a7a9449aa84174 + SwapContracts: map[uint32]*dexeth.SwapContract{ + 0: { + // deploy tx: https://polygonscan.com/tx/0xfc27a89e5befba05df5ebe64670d5df89f635957f3fbeb2d4240cd3f0e540022 + // swap contract: https://polygonscan.com/address/0x73bc803A2604b2c58B8680c3CE1b14489842EF16 + Address: common.HexToAddress("0x73bc803A2604b2c58B8680c3CE1b14489842EF16"), + Gas: dexeth.Gases{ + // First swap used 187982 gas Recommended Gases.Swap = 244376 + // 4 additional swaps averaged 112591 gas each. Recommended Gases.SwapAdd = 146368 + // [187982 300573 413152 525755 638346] + Swap: 244_376, + SwapAdd: 146_368, + // First redeem used 77229 gas. Recommended Gases.Redeem = 100397 + // 4 additional redeems averaged 31629 gas each. recommended Gases.RedeemAdd = 41117 + // [77229 108858 140475 172105 203746] + Redeem: 100_397, + RedeemAdd: 41_117, + // Average of 5 refunds: 69660. Recommended Gases.Refund = 90558 + // [69663 69663 69651 69663 69663] + Refund: 90_558, + // Average of 2 approvals: 58634. Recommended Gases.Approve = 76224 + // [58634 58634] + Approve: 76_224, + // Average of 1 transfers: 63705. Recommended Gases.Transfer = 82816 + // [63705] + Transfer: 82_816, + }, }, }, }, - NetTokens: map[dex.Network]*dexeth.NetToken{ - dex.Mainnet: { - Address: common.HexToAddress("0x2791bca1f2de4661ed88a30c99a7a9449aa84174"), // https://polygonscan.com/address/0x2791bca1f2de4661ed88a30c99a7a9449aa84174 - SwapContracts: map[uint32]*dexeth.SwapContract{ - 0: { - // deploy tx: https://polygonscan.com/tx/0xe5a22c2c5c9a216dd648f12d1654c0e3a4e8d541f62eefe2a938cfe015826ccb - // swap contract: https://polygonscan.com/address/0x73bc803A2604b2c58B8680c3CE1b14489842EF16 - Address: common.HexToAddress("0x73bc803A2604b2c58B8680c3CE1b14489842EF16"), - Gas: dexeth.Gases{ - // First swap used 187794 gas Recommended Gases.Swap = 244132 - // 4 additional swaps averaged 112591 gas each. Recommended Gases.SwapAdd = 146368 - // [187794 300385 412976 525567 638158] - Swap: 244_132, - SwapAdd: 146_368, - // First redeem used 77040 gas. Recommended Gases.Redeem = 100152 - // 4 additional redeems averaged 31629 gas each. recommended Gases.RedeemAdd = 41117 - // [77040 108669 140298 171928 203557] - Redeem: 100_152, - RedeemAdd: 41_117, - // Average of 5 refunds: 69474. Recommended Gases.Refund = 90316 - // [69474 69474 69474 69474 69474] - Refund: 90_316, - // Average of 2 approvals: 58446. Recommended Gases.Approve = 75979 - // [58446 58446] - Approve: 75_979, - // Average of 1 transfers: 63504. Recommended Gases.Transfer = 82555 - // [63504] - Transfer: 82_555, - }, + }, + } + + // TokenWETH is for Wrapped ETH. + TokenWETH = &dexeth.Token{ + Token: &dex.Token{ + ParentID: PolygonBipID, + Name: "Wrapped Ether", + UnitInfo: dex.UnitInfo{ + AtomicUnit: "gwei", + Conventional: dex.Denomination{ + Unit: "WETH", + ConversionFactor: 1e9, + }, + }, + }, + NetTokens: map[dex.Network]*dexeth.NetToken{ + dex.Mainnet: { + Address: common.HexToAddress("0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"), // https://polygonscan.com/token/0x7ceb23fd6bc0add59e62ac25578270cff1b9f619 + SwapContracts: map[uint32]*dexeth.SwapContract{ + 0: { + // deploy tx: https://polygonscan.com/tx/0xc569774add0a9f41eace3ff6289eafd4c17fbcaafcf8b7758e0a5c4d74dcf307 + // swap contract: https://polygonscan.com/address/0x878dF60d47Afa9C665dFaDCB6BF4e303C080032f + Address: common.HexToAddress("0x878dF60d47Afa9C665dFaDCB6BF4e303C080032f"), + Gas: dexeth.Gases{ + // First swap used 158846 gas Recommended Gases.Swap = 206499 + // 4 additional swaps averaged 112618 gas each. Recommended Gases.SwapAdd = 146403 + // [158846 271461 384064 496691 609318] + Swap: 206_499, + SwapAdd: 146_403, + // First redeem used 70222 gas. Recommended Gases.Redeem = 91288 + // 4 additional redeems averaged 31629 gas each. recommended Gases.RedeemAdd = 41117 + // [70222 101851 133468 165110 196739] + // Observed an 87,334 in the wild, so bumping this + // a bit. + Redeem: 104_800, + RedeemAdd: 41_117, + // Average of 5 refunds: 50354. Recommended Gases.Refund = 65460 + // [50350 50362 50338 50362 50362] + Refund: 65_460, + // [46712 26812] + Approve: 56_054, + // Average of 1 transfers: 51910. Recommended Gases.Transfer = 67483 + // [51910] + Transfer: 67_483, }, }, }, - dex.Testnet: { - Address: common.HexToAddress("0x0fa8781a83e46826621b3bc094ea2a0212e71b23"), // https://polygonscan.com/address/0x2791bca1f2de4661ed88a30c99a7a9449aa84174 - SwapContracts: map[uint32]*dexeth.SwapContract{ - 0: { - // deploy tx: https://polygonscan.com/tx/0xfc27a89e5befba05df5ebe64670d5df89f635957f3fbeb2d4240cd3f0e540022 - // swap contract: https://polygonscan.com/address/0x73bc803A2604b2c58B8680c3CE1b14489842EF16 - Address: common.HexToAddress("0x73bc803A2604b2c58B8680c3CE1b14489842EF16"), - Gas: dexeth.Gases{ - // First swap used 187982 gas Recommended Gases.Swap = 244376 - // 4 additional swaps averaged 112591 gas each. Recommended Gases.SwapAdd = 146368 - // [187982 300573 413152 525755 638346] - Swap: 244_376, - SwapAdd: 146_368, - // First redeem used 77229 gas. Recommended Gases.Redeem = 100397 - // 4 additional redeems averaged 31629 gas each. recommended Gases.RedeemAdd = 41117 - // [77229 108858 140475 172105 203746] - Redeem: 100_397, - RedeemAdd: 41_117, - // Average of 5 refunds: 69660. Recommended Gases.Refund = 90558 - // [69663 69663 69651 69663 69663] - Refund: 90_558, - // Average of 2 approvals: 58634. Recommended Gases.Approve = 76224 - // [58634 58634] - Approve: 76_224, - // Average of 1 transfers: 63705. Recommended Gases.Transfer = 82816 - // [63705] - Transfer: 82_816, - }, + }, + }, + } + + // TokenWBTC is for Wrapped BTC. + TokenWBTC = &dexeth.Token{ + EVMFactor: new(int64), + Token: &dex.Token{ + ParentID: PolygonBipID, + Name: "Wrapped Bitcoin", + UnitInfo: dex.UnitInfo{ + AtomicUnit: "Sats", + Conventional: dex.Denomination{ + Unit: "WBTC", + ConversionFactor: 1e8, + }, + }, + }, + NetTokens: map[dex.Network]*dexeth.NetToken{ + dex.Mainnet: { + Address: common.HexToAddress("0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"), // https://polygonscan.com/token/0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6 + SwapContracts: map[uint32]*dexeth.SwapContract{ + 0: { + // deploy tx: https://polygonscan.com/tx/0xcd84a1fa2f890d5fc1fcb0dde6c5a3bb50d9b25927ec5666b96b5ad3d6902b0a + // swap contract: https://polygonscan.com/address/0x625B7Ecd21B25b0808c4221dA281CD3A82f8b797 + Address: common.HexToAddress("0x625B7Ecd21B25b0808c4221dA281CD3A82f8b797"), + Gas: dexeth.Gases{ + // First swap used 181278 gas Recommended Gases.Swap = 235661 + // 4 additional swaps averaged 112591 gas each. Recommended Gases.SwapAdd = 146368 + // [181278 293857 406460 519039 631642] + Swap: 235_661, + SwapAdd: 146_368, + // First redeem used 70794 gas. Recommended Gases.Redeem = 92032 + // 4 additional redeems averaged 31629 gas each. recommended Gases.RedeemAdd = 41117 + // [70794 102399 134052 165646 197311] + // Values around 92k were observed in the wild, so + // this limit has been bumped up from the + // recommendation. + Redeem: 110_032, + RedeemAdd: 41_117, + // Average of 5 refunds: 63126. Recommended Gases.Refund = 82063 + // [63126 63126 63126 63126 63126] + Refund: 82_063, + // Average of 2 approvals: 52072. Recommended Gases.Approve = 67693 + // [52072 52072] + Approve: 67_693, + // Average of 1 transfers: 57270. Recommended Gases.Transfer = 74451 + // [57270] + Transfer: 74_451, }, }, }, diff --git a/server/asset/polygon/polygon.go b/server/asset/polygon/polygon.go index 485d35533d..9f8e3faf88 100644 --- a/server/asset/polygon/polygon.go +++ b/server/asset/polygon/polygon.go @@ -43,6 +43,8 @@ func init() { registerToken(testTokenID, 0) registerToken(usdcID, 0) + registerToken(wethTokenID, 0) + registerToken(wbtcTokenID, 0) if blockPollIntervalStr != "" { blockPollInterval, _ = time.ParseDuration(blockPollIntervalStr) @@ -61,6 +63,8 @@ const ( var ( testTokenID, _ = dex.BipSymbolID("dextt.polygon") usdcID, _ = dex.BipSymbolID("usdc.polygon") + wethTokenID, _ = dex.BipSymbolID("weth.polygon") + wbtcTokenID, _ = dex.BipSymbolID("wbtc.polygon") // blockPollInterval is the delay between calls to bestBlockHash to check // for new blocks. Modify at compile time via blockPollIntervalStr: