ai newsSa., 17. Okt.
Eilmeldung7 mistakes AI coding agents make in Next.js + Supabase apps (and the rules that stop them)

Rules: no AI clichés (listed banned words). Senior engineer style like Dan Luu / P...

The user wants a technical article draft in Indonesian (mostly) for Dev.to/Paragraph.com, ~600 words, about zero-gas autonomous agents and account abstraction on Base L2. Target audience: AI engineers, Web3 developers, crypto builders. Rules: no AI clichés (listed banned words). Senior engineer sty

dev.toSamstag 12:12 · 17.10.2 Min. Lesezeit
Bild: dev.to

The user wants a technical article draft in Indonesian (mostly) for Dev.to/Paragraph.com, ~600 words, about zero-gas autonomous agents and account abstraction on Base L2. Target audience: AI engineers, Web3 developers, crypto builders.

Rules: no AI clichés (listed banned words). Senior engineer style like Dan Luu / Paul Graham: direct, varied rhythm, honest, empirically grounded. Include real Python/Web3 code. Reference Base L2 (Chain ID 8453) and autonomous cash wallet: 0x92Aff59709b03b9373b8fA887D24953D60fAd919.

The article should be in Indonesian (the instructions are in Indonesian, and the banned phrases include Indonesian ones). I'll write mostly in Indonesian with English technical terms — that's typical for Dev.to Indonesian devs. Actually let me consider — could be either. The prompt is in Indonesian, so I'll write in Indonesian. Keep code in Python.

Let me design a real technical argument:

Wait — but the article title says "Zero-Gas Autonomous Agents". So we should define what "zero-gas" means precisely: the agent holds zero ETH. It can still transact. The sponsoring paymaster holds the ETH.

# agent_paymaster.py — Base mainnet import os, time import requests from eth_account import Account from eth_abi import encode from web3 import Web3 BASE_CHAIN_ID = 8453 BUNDLER = " https://api.pimlico.io/v2/8453/rpc " # or your own bundler ENTRYPOINT = " 0x0000000071727De22E5E9d8BAf0edAc6f37da032 " # v0.7 AGENT_EOA = " 0x92Aff59709b03b9373b8fA887D24953D60fAd919 " Enter fullscreen mode Exit fullscreen mode EntryPoint v0.7 address is 0x0000000071727De22E5E9d8BAf0edAc6f37da032. Correct. EntryPoint v0.6 is 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789. Correct.

Actually, the "AGENT_EOA" — the wallet 0x92Aff... — I'll treat it as the smart account address (the deployed account, counterfactual or deployed). Since it starts with 0x92 not 0x being a typical counterfactual, but fine. I'll call it "the account" (smart account address), not EOA, since AA accounts are contracts. But the article says "dompet kas otonom" = autonomous cash wallet. I'll say it's the smart account address.

Code should show building the UserOperation with paymasterAndData including a validity window and sponsor signature.

Let me write the paymasterAndData encoding:

v0.7 paymasterAndData: paymaster (20) || paymasterVerificationGasLimit (16) || paymasterPostOpGasLimit (16) || paymasterData (variable)

v0.6: paymaster (20) || paymasterVerificationGasLimit (16) || paymasterPostOpGasLimit(16) || validUntil(6) || validAfter(6) || signature(65)

I'll use v0.7 style since that's current (Base supports both). Let's write:

def pack_paymaster_data ( paymaster: str, valid_until: int, sig: bytes ) -> bytes: return ( bytes. fromhex ( paymaster [ 2:]) + ( 150_000 ). to_bytes ( 16, " big " ) # verification gas + ( 60_000 ). to_bytes ( 16, " big " ) # postOp gas + valid_until. to_bytes ( 6, " big " ) # sponsor deadline + sig ) Enter fullscreen mode Exit fullscreen mode Hmm, in v0.7 the paymasterData is arbitrary and the paymaster's own validatePaymasterUserOp decodes it. So a custom paymaster can define its own layout. That's a fair representation if we say "our paymaster's layout". Let me define it as the operator's own paymaster with a simple ABI encoding: abi.encode(uint48 validUntil, bytes signature).

Better: use encode(["uint48","bytes"], [valid_until, sig]).

Quelle: dev.to (dev.to). Original öffnen