-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hot_fix: make the relayer work after v0.50.0
- Loading branch information
Showing
8 changed files
with
120 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate"; | ||
import { QueryClient } from "@cosmjs/stargate"; | ||
import { Tendermint37Client } from "@cosmjs/tendermint-rpc"; | ||
import { parseWasmEvents } from "@oraichain/oraidex-common"; | ||
import { | ||
BridgeAdapter, | ||
getExistenceProofSnakeCell, | ||
getPacketProofs, | ||
} from "@oraichain/ton-bridge-contracts"; | ||
import { Network } from "@orbs-network/ton-access"; | ||
import { TransferPacket } from "../dtos/packets/TransferPacket"; | ||
import { BRIDGE_WASM_ACTION } from "../services"; | ||
import { createTonWallet, waitSeqno } from "../utils"; | ||
import { Address, toNano, TupleItemCell } from "@ton/core"; | ||
import { ExistenceProof } from "cosmjs-types/cosmos/ics23/v1/proofs"; | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
const argv = process.argv.slice(2); | ||
const provenHeight = parseInt(argv[0]); | ||
const packetTx = argv[1]; | ||
|
||
(async () => { | ||
const needProvenHeight = provenHeight + 1; | ||
const { client, walletContract, key } = await createTonWallet( | ||
process.env.TON_MNEMONIC!, | ||
process.env.NODE_ENV as Network | ||
); | ||
const bridgeAdapter = BridgeAdapter.createFromAddress( | ||
Address.parse(process.env.TON_BRIDGE!) | ||
); | ||
const bridgeAdapterContract = client.open(bridgeAdapter); | ||
const data = await bridgeAdapterContract.getBridgeData(); | ||
const lightClientMaster = (data.pop() as TupleItemCell).cell; | ||
console.log(lightClientMaster.beginParse().loadAddress()); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate"; | ||
import { QueryClient } from "@cosmjs/stargate"; | ||
import { Tendermint37Client } from "@cosmjs/tendermint-rpc"; | ||
import { parseWasmEvents } from "@oraichain/oraidex-common"; | ||
import { | ||
BridgeAdapter, | ||
getExistenceProofSnakeCell, | ||
getPacketProofs, | ||
LightClientMaster, | ||
} from "@oraichain/ton-bridge-contracts"; | ||
import { Network } from "@orbs-network/ton-access"; | ||
import { TransferPacket } from "../dtos/packets/TransferPacket"; | ||
import { BRIDGE_WASM_ACTION } from "../services"; | ||
import { createTonWallet, waitSeqno } from "../utils"; | ||
import { Address, toNano } from "@ton/core"; | ||
import { ExistenceProof } from "cosmjs-types/cosmos/ics23/v1/proofs"; | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
|
||
(async () => { | ||
const { client, walletContract, key } = await createTonWallet( | ||
process.env.TON_MNEMONIC!, | ||
process.env.NODE_ENV as Network | ||
); | ||
const lightClientMaster = LightClientMaster.createFromAddress( | ||
Address.parse(process.env.COSMOS_LIGHT_CLIENT_MASTER!) | ||
); | ||
const lightClientMasterContract = client.open(lightClientMaster); | ||
const cosmwasmClient = await CosmWasmClient.connect( | ||
process.env.COSMOS_RPC_URL! | ||
); | ||
|
||
console.log("Height", await lightClientMasterContract.getTrustedHeight()); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.