Skip to content

Commit

Permalink
[THORChain]: Update chainId and rpc (#4167)
Browse files Browse the repository at this point in the history
* [THORChain]: Update `chainId` and default `rpc` url

* [THORChain]: Fix C++ tests

* [THORChain]: Fix C++ tests
  • Loading branch information
satoshiotomakan authored Dec 18, 2024
1 parent b73c884 commit 33dcac8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3186,7 +3186,7 @@
"publicKeyType": "secp256k1",
"hrp": "thor",
"addressHasher": "sha256ripemd",
"chainId": "thorchain-mainnet-v1",
"chainId": "thorchain-1",
"explorer": {
"url": "https://viewblock.io/thorchain",
"txPath": "/tx/",
Expand All @@ -3197,7 +3197,7 @@
"info": {
"url": "https://thorchain.org",
"source": "https://gitlab.com/thorchain/thornode",
"rpc": "https://seed.thorchain.info",
"rpc": "https://thornode.ninerealms.com",
"documentation": "https://docs.thorchain.org"
}
},
Expand Down
7 changes: 5 additions & 2 deletions tests/chains/Cosmos/THORChain/TWSwapTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ TEST(TWTHORChainSwap, SwapRuneDoge) {
// invoke swap
const auto outputTWData_ = WRAPD(TWTHORChainSwapBuildSwap(inputTWData_.get()));
const auto outputData = data(TWDataBytes(outputTWData_.get()), TWDataSize(outputTWData_.get()));
EXPECT_EQ(outputData.size(), 153ul);
EXPECT_EQ(outputData.size(), 144ul);
// parse result in proto
Proto::SwapOutput outputProto;
EXPECT_TRUE(outputProto.ParseFromArray(outputData.data(), static_cast<int>(outputData.size())));
Expand All @@ -322,6 +322,8 @@ TEST(TWTHORChainSwap, SwapRuneDoge) {
auto& fee = *txInput.mutable_fee();
fee.set_gas(50000000);

// Override the chainId as it has been after a hardfork recently.
txInput.set_chain_id("thorchain-mainnet-v1");
txInput.set_account_number(75247);
txInput.set_sequence(8);

Expand Down Expand Up @@ -367,7 +369,7 @@ TEST(TWTHORChainSwap, SwapRuneBnbStreamParams) {
// invoke swap
const auto outputTWData_ = WRAPD(TWTHORChainSwapBuildSwap(inputTWData_.get()));
const auto outputData = data(TWDataBytes(outputTWData_.get()), TWDataSize(outputTWData_.get()));
EXPECT_EQ(outputData.size(), 156ul);
EXPECT_EQ(outputData.size(), 147ul);
// parse result in proto
Proto::SwapOutput outputProto;
EXPECT_TRUE(outputProto.ParseFromArray(outputData.data(), static_cast<int>(outputData.size())));
Expand All @@ -382,6 +384,7 @@ TEST(TWTHORChainSwap, SwapRuneBnbStreamParams) {
auto& fee = *txInput.mutable_fee();
fee.set_gas(50000000);

txInput.set_chain_id("thorchain-mainnet-v1");
txInput.set_account_number(76456);
txInput.set_sequence(0);

Expand Down

0 comments on commit 33dcac8

Please sign in to comment.