Skip to content

Instantly share code, notes, and snippets.

#!/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);
#!/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";
#!/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,