Contract Call
Call any smart contract function without FLR gas. Stake tokens, mint NFTs, vote on governance, any on-chain action, fully gasless.
typescript
import { Zedkr } from "zedkr";
const client = await Zedkr.create({ provider });
const callData = iface.encodeFunctionData("stake", [ethers.parseUnits("100", 18)]);
const result = await client.call(signer, STAKING_CONTRACT, callData);
console.log(result.txHash);Encoding calldata
typescript
import { ethers } from "ethers";
const iface = new ethers.Interface(["function stake(uint256 amount)"]);
const callData = iface.encodeFunctionData("stake", [ethers.parseUnits("100", 18)]);
const result = await client.call(signer, "0xStakingContract", callData);Warning
The Zedkr router becomes
msg.sender when calling the target contract. Contracts that require msg.sender === EOA will not work.