Skip to content

Commit

Permalink
updated paymaster examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vignesha22 committed Nov 7, 2023
1 parent 5cd1689 commit b733e14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/13-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dotenv.config();

const recipient = '0x80a1874E1046B1cc5deFdf4D3153838B72fF94Ac'; // recipient wallet address
const value = '0.01'; // transfer value
const api_key = '';

async function main() {
// initializating sdk...
Expand All @@ -34,7 +35,7 @@ async function main() {
console.log('balances: ', balance);

// estimate transactions added to the batch and get the fee data for the UserOp
const op = await primeSdk.estimate({ url: 'https://arka.etherspot.io/', api_key: '', context: { mode: 'sponsor' } });
const op = await primeSdk.estimate({ url: `https://arka.etherspot.io?api_key=${api_key}&chainId=${Number(process.env.CHAIN_ID)}`, context: { mode: 'sponsor' } });
console.log(`Estimate UserOp: ${await printOp(op)}`);

// sign the UserOp and sending to the bundler...
Expand Down

0 comments on commit b733e14

Please sign in to comment.