SIGN IN SIGN UP

feat: put the Eth712 account stack on mainnet

Two scripts, no Cairo toolchain. fetch-class.mjs lifts a declared class off
Sepolia through starknet_getClass and starknet_getCompiledCasm and refuses to
write it unless the Sierra rehashes to the class hash asked for; re-declaring
the exact bytes beats a rebuild here, because account addresses derive from a
hard-coded PRIMER_CLASS_HASH that a compiler bump would silently move.

deploy-eth712-factory.mjs declares the STRK20-compatible account class and the
factory, then deploys one factory pointed straight at that class - which
removes the separate self-upgrade transaction Sepolia needed. Every step skips
itself when already on chain, so a rerun after a failure only pays for what is
left.

Primer is already declared on mainnet by StarkWare, so it is not ours to
deploy. Mainnet quotes 73.67 and 77.70 STRK for the two declares, unpadded and
agreed by two RPCs - almost all of it L2 gas for compiling a ~7,000-felt Sierra
program.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
S
ssadkov committed
decf0aa8865c71809ef7ea0556ef7dbd27c202e0
Parent: b96faeb