diff --git a/README.md b/README.md index 8d5f0c9..a773a38 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ All channels support transfers in both directions. | ------------------ | --------- | | acala | INTR IBTC | | astar | INTR IBTC | +| bifrost | VDOT | | parallel | INTR IBTC | | polkadot | DOT | | polkadot asset hub | USDT | diff --git a/package.json b/package.json index 762f716..86857cb 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@polkadot/api": "^10.9.1", "@polkadot/apps-config": "^0.132.1", "@polkadot/types": "^10.9.1", - "axios": "^0.27.2", + "axios": "^1.6.2", "lodash": "^4.17.20" }, "devDependencies": { diff --git a/scripts/chopsticks-test.ts b/scripts/chopsticks-test.ts index 5c8ed53..696e2d6 100644 --- a/scripts/chopsticks-test.ts +++ b/scripts/chopsticks-test.ts @@ -136,7 +136,20 @@ async function checkTransfer(fromChain: ChainName, toChain: ChainName, token: st // check existential deposit by sending exactly `actualFee + ed + [1 planck]`. The function // will throw an error if the ed is set too low. - let amountToSend = actualFee.add(expectedEd).add(FN.fromInner("1", actualFee.getPrecision())); + const dust = FN.fromInner("1", actualFee.getPrecision()); + let amountToSend = actualFee.add(expectedEd).add(dust); + + if (toChain === "hydra") { + // bump fees in amount to send by a few percent for XCM to HydraDX + // token/HDX price pair changes can make this fail due to pair changes from previous tx increasing fee required + const bumpRate = new FN(1.1); + const bumpedFee = actualFee.mul(bumpRate); + amountToSend = bumpedFee.add(expectedEd).add(dust); + ret = { + message: `Modified ED check for ${token} to ${toChain} - price changes in ${token}/HDX can cause false negatives. Bumped assumed fees by ${bumpRate.minus(FN.ONE).toNumber() * 100}%`, + result: ResultCode.OK + }; + } await sendTx(fromChain, toChain, token, bridge, amountToSend, TestCase.ExistentialDeposit); return ret; @@ -260,8 +273,11 @@ export async function runTestCasesAndExit( process.stdout.write(`Testing ${token} transfer from ${from} to ${to}... `); const result = await retryCheckTransfer(from, to, token, bridge, 2); console.log(ResultCode[result.result]); - if (result.result != ResultCode.OK) { + if (result.message?.length > 0) { console.log(iconOf(result.result), result.message); + } + + if (result.result != ResultCode.OK) { problematicTestCases.push({from: from as ChainName, to: to as ChainName, token, icon: iconOf(result.result), message: result.message}); if (aggregateTestResult == ResultCode.OK || (aggregateTestResult == ResultCode.WARN && result.result == ResultCode.FAIL)) { // only 'increase' the aggregate error diff --git a/scripts/configs/kusama.yml b/scripts/configs/kusama.yml index 9841be9..f069bb1 100644 --- a/scripts/configs/kusama.yml +++ b/scripts/configs/kusama.yml @@ -1,6 +1,6 @@ endpoint: - - wss://kusama-rpc.polkadot.io - wss://kusama-rpc.dwellir.com + - wss://kusama-rpc.polkadot.io - wss://rpc-kusama.luckyfriday.io - wss://kusama-rpc-tn.dwellir.com mock-signature-host: true diff --git a/scripts/configs/polkadot.yml b/scripts/configs/polkadot.yml index 4a5d975..e3b4b6d 100644 --- a/scripts/configs/polkadot.yml +++ b/scripts/configs/polkadot.yml @@ -1,8 +1,8 @@ endpoint: - - wss://rpc.polkadot.io - wss://polkadot-rpc.dwellir.com - - wss://polkadot-rpc-tn.dwellir.com - wss://rpc-polkadot.luckyfriday.io + - wss://rpc.polkadot.io + - wss://polkadot-rpc-tn.dwellir.com mock-signature-host: true block: ${env.POLKADOT_BLOCK_NUMBER} db: ./db.sqlite diff --git a/yarn.lock b/yarn.lock index 99ec483..cfc08b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4978,13 +4978,14 @@ axios@^0.24.0: dependencies: follow-redirects "^1.14.4" -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== +axios@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" + integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== dependencies: - follow-redirects "^1.14.9" + follow-redirects "^1.15.0" form-data "^4.0.0" + proxy-from-env "^1.1.0" babel-jest@^27.5.1: version "27.5.1" @@ -6838,10 +6839,10 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -follow-redirects@^1.14.4, follow-redirects@^1.14.9: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.14.4, follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== for-each@^0.3.3: version "0.3.3" @@ -9799,6 +9800,11 @@ propagate@^2.0.0: resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"