Website | Documentation | API Docs | Twitter
git clone https://github.com/openfort-xyz/openfort-contracts.git && cd openfort-contracts
yarn
yarn hardhat compile
Run e2e tests on a freshly created account deployed from a fresh factory (long setup time)
yarn hardhat test --network <zkSophonTestnet|zkTestnet|zkSyncLocal> --nonce <number>
Running tests with the zkSyncLocal
network requires a running local zkSync node: download and run era_test_node fork https://sepolia.era.zksync.dev
on another terminal before running the tests.
Run e2e tests directly, skip deployments
export ACCOUNT_ADDRESS=<DEPLOYED_AND_INITIALIZED_ACCOUNT>
yarn hardhat test --network <zkSophonTestnet|zkTestnet|zkSyncLocal> --skip-deployments
WALLET_PRIVATE_KEY= # account must have positive balance to deploy on zkTestnet (Sepolia) OR be whitelisted on Sophon Paymaster to deploy on Sophon testnet
SOPHON_TESTNET_PAYMASTER_ADDRESS= # only required to deploy on Sophon
yarn hardhat deploy-account --network <zkSophonTestnet|zkTestnet|zkSyncLocal>
# account is optional. script will deploy one if not provided.
yarn hardhat deploy-factory --account <DEPLOYED_ACCOUNT> --network <zkSophonTestnet|zkTestnet|zkSyncLocal>
Call createAccountWithNounce
factory function to deploy an account proxy and initialize it with the account implementation
yarn hardhat create-account --factory <FACTORY> --implementation <ACCOUNT_IMPLEMENTATION> --nonce <number> --network <zkSophonTestnet|zkTestnet|zkSyncLocal>
Compute the address of any account
yarn hardhat get-account --factory <FACTORY> --implementation <ACCOUNT_IMPLEMENTATION> --nonce <number>
ZKsync is a Zero-knowledge Rollup for Scalling Ethereum featuring its own zkEVM, which runs bytecode distinct from Ethereum's EVM. While 99% of Ethereum projects can redeploy on zkSync without needing to refactor or re-audit their code, Account Abstraction contracts fall into the remaining 1%.
zkSync natively supports Account Abstraction, eliminating the need for ERC-4337 and its EntryPoint contract.
Account features like session keys, guardians, and the upgradeability stratregy, MUST conform with openfort-contracts.