ContractDeployer

Abstract

0x0000000000000000000000000000000000008006

Solidity v0.8.20+commit.a1b79de6

🤖
透過你的 AI 查詢此合約
參考: 0x0000000000000000000000000000000000008006
範例提示詞: "Tell me the current state of abstract/0x0000000000000000000000000000000000008006"
還沒有接入 AI?→ mcp.smarts.md
Abstract 在 Smarts 上是僅文件鏈:原始碼和 ABI 已索引,但目前不提供即時鏈上資料(狀態、最新事件、管理員概覽)。AI 代理仍可透過 MCP 呼叫 get_contract_info 和 get_contract_source。

概覽

讀取函式
4
寫入函式
8
事件
3

讀取函式

extendedAccountVersion(_address: address) view

Returns the account abstraction version if `_address` is a deployed contract. Returns the latest supported account abstraction version if `_address` is an EOA.

參數

名稱 類型 描述
_address address

回傳值

名稱 類型 描述
uint8
getAccountInfo(_address: address) view

Returns information about a certain account.

參數

名稱 類型 描述
_address address

回傳值

名稱 類型 描述
info tuple
getNewAddressCreate(_sender: address, _senderNonce: uint256) pure

Calculates the address of a deployed contract via create

參數

名稱 類型 描述
_sender address The account that deploys the contract.
_senderNonce uint256 The deploy nonce of the sender's account.

回傳值

名稱 類型 描述
newAddress address
getNewAddressCreate2(_sender: address, _bytecodeHash: bytes32, _salt: bytes32, _input: bytes) view

Calculates the address of a deployed contract via create2

參數

名稱 類型 描述
_sender address The account that deploys the contract.
_bytecodeHash bytes32 The correctly formatted hash of the bytecode.
_salt bytes32 The create2 salt.
_input bytes The constructor data.

回傳值

名稱 類型 描述
newAddress address newAddress The derived address of the account.

寫入函式

create(_salt: bytes32, _bytecodeHash: bytes32, _input: bytes) payable

Deploys a contract with similar address derivation rules to the EVM's `CREATE` opcode.

開發者: This method also accepts nonce as one of its parameters. It is not used anywhere and it needed simply for the consistency for the compiler Note: this method may be callable only in system mode, that is checked in the `createAccount` by `onlySystemCall` modifier.

參數

名稱 類型 描述
_salt bytes32
_bytecodeHash bytes32 The correctly formatted hash of the bytecode.
_input bytes The constructor calldata

回傳值

名稱 類型 描述
address
create2(_salt: bytes32, _bytecodeHash: bytes32, _input: bytes) payable

Deploys a contract with similar address derivation rules to the EVM's `CREATE2` opcode.

參數

名稱 類型 描述
_salt bytes32 The CREATE2 salt
_bytecodeHash bytes32 The correctly formatted hash of the bytecode.
_input bytes The constructor calldata

回傳值

名稱 類型 描述
address
create2Account(_salt: bytes32, _bytecodeHash: bytes32, _input: bytes, _aaVersion: uint8) payable

Deploys a contract account with similar address derivation rules to the EVM's `CREATE2` opcode.

參數

名稱 類型 描述
_salt bytes32 The CREATE2 salt
_bytecodeHash bytes32 The correctly formatted hash of the bytecode.
_input bytes The constructor calldata.
_aaVersion uint8 The account abstraction version to use. Note: this method may be callable only in system mode, that is checked in the `createAccount` by `onlySystemCall` modifier.

回傳值

名稱 類型 描述
address
createAccount(bytes32, _bytecodeHash: bytes32, _input: bytes, _aaVersion: uint8) payable

Deploys a contract account with similar address derivation rules to the EVM's `CREATE` opcode.

開發者: This method also accepts salt as one of its parameters. It is not used anywhere and it needed simply for the consistency for the compiler

參數

名稱 類型 描述
bytes32
_bytecodeHash bytes32 The correctly formatted hash of the bytecode.
_input bytes The constructor calldata.
_aaVersion uint8 The account abstraction version to use.

回傳值

名稱 類型 描述
address
forceDeployOnAddress(_deployment: tuple, _sender: address) payable

The method that can be used to forcefully deploy a contract.

參數

名稱 類型 描述
_deployment tuple Information about the forced deployment.
_sender address The `msg.sender` inside the constructor call.
forceDeployOnAddresses(_deployments: tuple[]) payable

This method is to be used only during an upgrade to set bytecodes on specific addresses.

開發者: We do not require `onlySystemCall` here, since the method is accessible only by `FORCE_DEPLOYER`.

參數

名稱 類型 描述
_deployments tuple[]
updateAccountVersion(_version: uint8) nonpayable

Update the used version of the account.

開發者: Note that it allows changes from account to non-account and vice versa.

參數

名稱 類型 描述
_version uint8 The new version of the AA protocol to use.
updateNonceOrdering(_nonceOrdering: uint8) nonpayable

Updates the nonce ordering of the account. Currently, it only allows changes from sequential to arbitrary ordering.

參數

名稱 類型 描述
_nonceOrdering uint8 The new nonce ordering to use.

事件

AccountNonceOrderingUpdated(accountAddress: address, nonceOrdering: uint8)
名稱 類型 已索引 描述
accountAddress address
nonceOrdering uint8
AccountVersionUpdated(accountAddress: address, aaVersion: uint8)
名稱 類型 已索引 描述
accountAddress address
aaVersion uint8
ContractDeployed(deployerAddress: address, bytecodeHash: bytes32, contractAddress: address)
名稱 類型 已索引 描述
deployerAddress address
bytecodeHash bytes32
contractAddress address