Additional Queries
multichain extends its functionality beyond function calls to:
getTransactionReceipt
getTransactionReceipt
retrieves the receipt of a transaction, providing
critical details like status, gas used, and logs.
import { getTransactionReceipt } from "./getTransactionReceipt";
...
const receipt = await getTransactionReceipt(rpc, hash, sepolia)
.consolidatedValue;
if (receipt instanceof Error) throw "test getTransactionReceipt fail";
estimateGas
estimateGas
estimates the gas needed for a transaction before it's
executed on the blockchain.
import { estimateGas } from "./gasEstimate";
...
const gasAmount = estimateGas(
proxy,
rpc,
proxy.new("ethereum"),
proxy.new({
from: "0x...",
to: "0x..."
})
);
nativeBalance
nativeBalance
fetches the balance of an account at a given block number.
import { nativeBalance } from "./balance";
...
const bal = nativeBalance(proxy, rpc, addr, owner);
blockNumber
blockNumber
returns the number of the most recent block in the chain.
Our support for RPC methods will keep expanding: Keep an eye on our release notes and community channels for the latest updates and added query support.