This file contains hidden or 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
#!/usr/bin/env -S deno run --allow-env --allow-read --allow-write --allow-net | |
import { xxhashAsHex } from "npm:@polkadot/util-crypto"; | |
import { BN } from "npm:@polkadot/util"; | |
const feeStorageKey = xxhashAsHex(":BridgeHubEthereumBaseFeeV2:", 128, true); | |
const leFee = new BN( | |
"00ca9a3b000000000000000000000000", | |
"hex", | |
"le", | |
); | |
console.log('Key:', feeStorageKey); |
This file contains hidden or 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
#!/usr/bin/env -S deno run --allow-net --allow-env --allow-read | |
import { IGateway, IGateway__factory, IERC20__factory } from "npm:@snowbridge/contract-types"; | |
import { decodeAddress } from "npm:@polkadot/util-crypto"; | |
import { | |
ethers, | |
hexlify, | |
isHexString, | |
JsonRpcProvider, | |
} from "npm:ethers"; |
This file contains hidden or 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
#!/usr/bin/env -S deno run --allow-net --allow-env --allow-read | |
import { | |
AssetTransferApi, | |
constructApiPromise, | |
} from "npm:@substrate/asset-transfer-api"; | |
import { | |
blake2AsHex, | |
decodeAddress, | |
xxhashAsHex, |