Skip to content

Latest commit

 

History

History
91 lines (81 loc) · 4.74 KB

Full-log.md

File metadata and controls

91 lines (81 loc) · 4.74 KB

Deploy initializable account logic

antonio@Antonios-MacBook-Pro proxy-accounts % npx hardhat deploy-zksync --script deploy-dummy-init-acc.ts
Running script on zkSyncSepoliaTestnet network InitAccount deployed to: 0xbE0e545504Eb4fA9Fa0de8D01CC227A4A3B8558D Your verification ID is: 22759 Contract successfully verified on ZKsync block explorer!

Deploy factory and create account

antonio@Antonios-MacBook-Pro proxy-accounts % npx hardhat deploy-zksync --script deploy-dummy-proxy-fac.ts Running script on zkSyncSepoliaTestnet network Generated bytecode hash... Factory deployed to: 0x1609b7C8318991228c71a0b3cC11bBF95c3c7A3F Verifying implementation: 0xbE0e545504Eb4fA9Fa0de8D01CC227A4A3B8558D ZkSyncVerifyPluginError: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.

  Possible causes are:
    - Contract code changed after the deployment was executed. This includes code for seemingly unrelated contracts.
    - A solidity file was added, moved, deleted or renamed after the deployment was executed. This includes files for seemingly unrelated contracts.
    - Solidity compiler settings were modified after the deployment was executed (like the optimizer, target EVM, etc.).
    - The given address is wrong.
    - The selected network is wrong.

Verifying beacon: 0x1609b7C8318991228c71a0b3cC11bBF95c3c7A3F server response 503 Service Unavailable (request={ }, response={ }, error=null, info={ "requestUrl": "https://sepolia.era.zksync.dev", "responseBody": "{"jsonrpc":"2.0","error":{"code":-32011,"message":"no backends available for method"},"id":2}\n", "responseStatus": "503 Service Unavailable" }, code=SERVER_ERROR, version=6.13.2) Deploying proxy account from factory... Transaction hash of creating account: 0x08c2d157f94877845b802ad7f23f595df2d0f9cb4558b47275f8e886e791e8ef Calculating address of the account... ADMIN_ADDR :>> 0x466ff3c5C76445823b49dF047d72663B8eAe9272 Account deployed on address 0x4944DECe0b3ae884edDd9B8C6b316b889DADEDD7

Fund the proxy account

Important: must fund from an account that is not the admin

antonio@Antonios-MacBook-Pro proxy-accounts % npx hardhat deploy-zksync --script fund-acc.ts Running script on zkSyncSepoliaTestnet network Funding account.... The balance of the account is: 0 Transaction hash of funding account: 0x952451c28a9b81ad71d4470a77a887c16a093b935d5021cd81f7cf8f657e7679 The balance of the account is: 30000000000000000

Send tx from proxy account

antonio@Antonios-MacBook-Pro proxy-accounts % npx hardhat deploy-zksync --script interact-from-proxyed-acc.ts Running script on zkSyncSepoliaTestnet network Running script to interact with contract 0x543A5fBE705d040EFD63D9095054558FB4498F88 The balance of the account is: 30000000000000000 The nonce of the account is: 0 Current message is: Hello from AA! It is 2024-08-14T10:59:25.483Z aaTx body :>> { to: '0x543A5fBE705d040EFD63D9095054558FB4498F88', data: '0xa41368620000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d48656c6c6f2066726f6d2041412120497420697320323032342d30382d31355431313a32373a32362e3238345a00000000000000000000000000000000000000', from: '0x4944DECe0b3ae884edDd9B8C6b316b889DADEDD7', gasLimit: 318616n, gasPrice: 25000000n, chainId: 300n, nonce: 0, type: 113, value: 0n, customData: { gasPerPubdata: 50000, customSignature: '0x1337' } } Transaction sent from DummyAcc with hash 0x632aae3f362c32dc070d12a8538ee4374e0f5b99bbdd1686994ab707cb894605 sentTx :>> TransactionResponse { provider: Provider { _contractAddresses: {} }, blockNumber: null, blockHash: null, index: undefined, hash: '0x632aae3f362c32dc070d12a8538ee4374e0f5b99bbdd1686994ab707cb894605', type: 113, to: '0x543A5fBE705d040EFD63D9095054558FB4498F88', from: '0x4944DECe0b3ae884edDd9B8C6b316b889DADEDD7', nonce: 0, gasLimit: 318616n, gasPrice: undefined, maxPriorityFeePerGas: 25000000n, maxFeePerGas: 25000000n, maxFeePerBlobGas: null, data: '0xa41368620000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d48656c6c6f2066726f6d2041412120497420697320323032342d30382d31355431313a32373a32362e3238345a00000000000000000000000000000000000000', value: 0n, chainId: 300n, signature: Signature { r: "0x0000000000000000000000000000000000000000000000000000000000000000", s: "0x0000000000000000000000000000000000000000000000000000000000000000", yParity: 0, networkV: null }, accessList: null, blobVersionedHashes: null, l1BatchNumber: undefined, l1BatchTxIndex: undefined } The message now is: Hello from AA! It is 2024-08-15T11:27:26.284Z The nonce of the account is: 1 The balance of the account is: 29997181875000000