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