Agent

Ethereum 浏览链

0x3a93c17fc82cc33420d1809dda9fb715cc89dd37

Solidity v0.4.24+commit.e67f0147

🤖
通过你的 AI 查询此合约
引用: 0x3a93c17fc82cc33420d1809dda9fb715cc89dd37
示例提示词: "Tell me the current state of eth/0x3a93c17fc82cc33420d1809dda9fb715cc89dd37"
还没有接入 AI?→ mcp.smarts.md · 浏览链

管理与风险

谁能修改规则?

No admin risk controls detected from the verified ABI.

概览

读取函数
33
写入函数
12
事件
11

读取函数

Block #25,494,354 · just now
ADD_PROTECTED_TOKEN_ROLE() view → 0x6eb2a499556bfa2872f5aa15812b956cc4a71b4d64eb3553f7073c7e41415aaa

Return the role identifier used to grant or verify the protected token role.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 role identifier for the PROTECTED_TOKEN role used with AccessControl to grant or check permissions.✨ AI
supportsInterface(_interfaceId: bytes4) pure

Tells whether this contract supports a given ERC-165 interface

开发者: Implements conformance to ERC-165

参数

名称 类型 描述
_interfaceId bytes4 Interface bytes to check

返回值

名称 类型 描述
bool True if this contract supports the interface
hasInitialized() view → false

Indicates whether the contract has completed its one-time initialization.✨ AI

返回值

名称 类型 描述
bool Whether the contract has been initialized by the time of the current block
ERC1271_INTERFACE_ID() view → 0xfb855dc9

Returns the ERC-1271 interface identifier used to indicate the contract supports signature verification.✨ AI

返回值

名称 类型 描述
bytes4 bytes4: ERC-1271 interface identifier constant used to signal support for isValidSignature verification.✨ AI
isValidSignature(_hash: bytes32, _signature: bytes) view

Validate a signature for the provided data and return the ERC-1271 magic value.✨ AI

开发者: Function must be implemented by deriving contract

参数

名称 类型 描述
_hash bytes32 Arbitrary length data signed on the behalf of address(this)
_signature bytes Signature byte array associated with _data

返回值

名称 类型 描述
bytes4 A bytes4 magic value 0x20c13b0b if the signature check passes, 0x00000000 if not MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5) MUST allow external calls
ERC1271_RETURN_INVALID_SIGNATURE() view → 0x00000000

Returns the bytes4 indicator that the contract uses to represent an invalid ERC1271 signature.✨ AI

返回值

名称 类型 描述
bytes4 The bytes4 value used to indicate an invalid ERC1271 signature result.✨ AI
TRANSFER_ROLE() view → 0x8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c

Returns the role identifier used to authorize asset transfer operations.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 role identifier (hash) for TRANSFER_ROLE, used to check or grant transfer permissions.✨ AI
isValidSignature(_data: bytes, _signature: bytes) view

Validate a signature for the provided data and return the ERC-1271 magic value.✨ AI

开发者: Function must be implemented by deriving contract

参数

名称 类型 描述
_data bytes Message or data blob that was signed.✨ AI
_signature bytes Signature byte array associated with _data

返回值

名称 类型 描述
bytes4 A bytes4 magic value 0x20c13b0b if the signature check passes, 0x00000000 if not MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5) MUST allow external calls
getProtectedTokensLength() view reverted

Return the number of protected tokens tracked by the Agent contract.✨ AI

返回值

名称 类型 描述
uint256 Number of protected tokens stored in the contract.✨ AI
getEVMScriptExecutor(_script: bytes) view

Return the executor address responsible for running a given EVM script.✨ AI

参数

名称 类型 描述
_script bytes Serialized EVM script bytes used to determine the appropriate executor.✨ AI

返回值

名称 类型 描述
address Address of the executor contract that can run the provided script, or the zero address if no executor is registered.✨ AI
getRecoveryVault() view reverted

Returns the address of the contract's recovery vault.✨ AI

开发者: Get the recovery vault for the app

返回值

名称 类型 描述
address Recovery vault address for the app
RUN_SCRIPT_ROLE() view → 0xb421f7ad7646747f3051c50c0b8e2377839296cd4973e27f63821d73e390338f

Get the role identifier used to authorize execution of runScript operations.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 constant identifying the RUN_SCRIPT role used in access control checks.✨ AI
SAFE_EXECUTE_ROLE() view → 0x0a1ad7b87f5846153c6d5a1f761d71c7d0cfd122384f56066cd33239b7933694

Returns the bytes32 identifier for the SAFE_EXECUTE_ROLE role.✨ AI

返回值

名称 类型 描述
bytes32 Bytes32 role identifier used to grant or verify the SAFE_EXECUTE_ROLE.✨ AI
REMOVE_PROTECTED_TOKEN_ROLE() view → 0x71eee93d500f6f065e38b27d242a756466a00a52a1dbcd6b4260f01a8640402a

Return the role identifier used to authorize removing protected tokens.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 role identifier constant for REMOVE_PROTECTED_TOKEN_ROLE✨ AI
isDepositable() view → false

Checks whether the agent currently accepts new deposits.✨ AI

返回值

名称 类型 描述
bool True if the contract currently accepts deposits; false otherwise.✨ AI
DESIGNATE_SIGNER_ROLE() view → 0x23ce341656c3f14df6692eebd4757791e33662b7dcf9970c8308303da5472b7c

Return the bytes32 role identifier used to grant or check designate-signer permissions.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 role identifier constant representing the DESIGNATE_SIGNER_ROLE.✨ AI
EXECUTE_ROLE() view → 0xcebf517aa4440d1d125e0355aae64401211d0848a23c02cc5d29a14822580ba4

Returns the role identifier required to execute agent actions.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 role identifier that grants permission to execute actions.✨ AI
allowRecoverability(address) view

Check whether the Agent allows recovering a specific token or ETH.✨ AI

开发者: By default deriving from AragonApp makes it recoverable

参数

名称 类型 描述
address

返回值

名称 类型 描述
bool bool whether the app allows the recovery
appId() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Returns the app identifier associated with this Agent.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 application identifier that uniquely identifies the Agent's application or protocol.✨ AI
protectedTokens(uint256) view

Return the address of a protected token at the specified index.✨ AI

参数

名称 类型 描述
uint256

返回值

名称 类型 描述
address Address of the protected token located at the provided index.✨ AI
getInitializationBlock() view → 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,935

Returns the block number when the contract was initialized.✨ AI

返回值

名称 类型 描述
uint256 Block number in which the contract was initialized
ERC1271_RETURN_VALID_SIGNATURE() view → 0x20c13b0b

Return the ERC-1271 magic value that indicates a valid contract signature.✨ AI

返回值

名称 类型 描述
bytes4 The 4-byte ERC-1271 value (magic return) used to signal a valid signature.✨ AI
canPerform(_sender: address, _role: bytes32, _params: uint256[]) view

Check whether a given sender is allowed to perform the specified role under the provided parameters.✨ AI

开发者: Check whether an action can be performed by a sender for a particular role on this app

参数

名称 类型 描述
_sender address Sender of the call
_role bytes32 Role on this app
_params uint256[] Permission params for the role

返回值

名称 类型 描述
bool Boolean indicating whether the sender has the permissions to perform the action. Always returns false if the app hasn't been initialized yet.
getEVMScriptRegistry() view reverted

Return the address of the contract registered as the EVM script registry.✨ AI

返回值

名称 类型 描述
address The address of the EVMScriptRegistry contract used to resolve and execute EVM scripts.✨ AI
designatedSigner() view → 0x0000000000000000000000000000000000000000

Returns the address designated as the contract's signer.✨ AI

返回值

名称 类型 描述
address The address currently configured as the designated signer for this Agent contract.✨ AI
PROTECTED_TOKENS_CAP() view → 10

Returns the cap on the number of protected tokens.✨ AI

返回值

名称 类型 描述
uint256 The cap value (uint256) representing the maximum number of protected tokens.✨ AI
ADD_PRESIGNED_HASH_ROLE() view → 0x0b29780bb523a130b3b01f231ef49ed2fa2781645591a0b0a44ca98f15a5994c

Returns the bytes32 identifier for the ADD_PRESIGNED_HASH_ROLE role.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 role identifier used to grant or check the ADD_PRESIGNED_HASH_ROLE permission.✨ AI
isPresigned(bytes32) view

Check whether a given 32-byte hash has been pre-signed by this agent.✨ AI

参数

名称 类型 描述
bytes32

返回值

名称 类型 描述
bool True if the provided hash corresponds to a recorded pre-signed authorization; otherwise false.✨ AI
canForward(_sender: address, _evmScript: bytes) view

Tells whether `_sender` can forward actions or not

开发者: IForwarder interface conformance

参数

名称 类型 描述
_sender address Address of the account intending to forward an action
_evmScript bytes

返回值

名称 类型 描述
bool True if the given address can run scripts, false otherwise
kernel() view → 0x0000000000000000000000000000000000000000

Return the address of the Kernel contract associated with this Agent.✨ AI

返回值

名称 类型 描述
address The address of the Kernel contract linked to this Agent.✨ AI
isPetrified() view → true

Return whether the Agent is currently petrified.✨ AI

返回值

名称 类型 描述
bool True if the Agent is petrified, false otherwise.✨ AI
balance(_token: address) view

Return the Agent's token balance for the specified token address.✨ AI

参数

名称 类型 描述
_token address The token contract address to query.✨ AI

返回值

名称 类型 描述
uint256 The token balance held by the Agent, expressed in the token's smallest unit (e.g., wei).✨ AI
isForwarder() pure → true

Tells whether the Agent app is a forwarder or not

开发者: IForwarder interface conformance

返回值

名称 类型 描述
bool Always true

写入函数

onERC721Received(_operator: address, _from: address, _tokenId: uint256, _data: bytes) nonpayable

Handle the receipt of an NFT

开发者: The ERC721 smart contract calls this function on the recipient after a {IERC721-safeTransferFrom}. This function MUST return the function selector, otherwise the caller will revert the transaction. The selector to be returned can be obtained as `this.onERC721Received.selector`. This function MAY throw to revert and reject the transfer. Note: the ERC721 contract address is always the message sender.

参数

名称 类型 描述
_operator address
_from address
_tokenId uint256
_data bytes

返回值

名称 类型 描述
bytes4 bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
deposit(_token: address, _value: uint256) payable

Deposit `_value` `_token` to the vault

参数

名称 类型 描述
_token address Address of the token being transferred
_value uint256 Amount of tokens being transferred
presignHash(_hash: bytes32) nonpayable

Pre-sign hash `_hash`

参数

名称 类型 描述
_hash bytes32 Hash that will be considered signed regardless of the signature checked with 'isValidSignature()'
removeProtectedToken(_token: address) nonpayable

Remove `_token.symbol(): string` from the list of protected tokens

参数

名称 类型 描述
_token address Address of the token to be unprotected
addProtectedToken(_token: address) nonpayable

Add `_token.symbol(): string` to the list of protected tokens

参数

名称 类型 描述
_token address Address of the token to be protected
initialize() nonpayable

Initialize Vault app

开发者: As an AragonApp it needs to be initialized in order for roles (`auth` and `authP`) to work
transferToVault(_token: address) nonpayable

Send funds to recovery Vault. This contract should never receive funds, but in case it does, this function allows one to recover them.

参数

名称 类型 描述
_token address Token balance to be sent to recovery vault.
setDesignatedSigner(_designatedSigner: address) nonpayable

Set `_designatedSigner` as the designated signer of the app, which will be able to sign messages on behalf of the app

参数

名称 类型 描述
_designatedSigner address Address that will be able to sign messages on behalf of the app
safeExecute(_target: address, _data: bytes) nonpayable

Execute '`@radspec(_target, _data)`' on `_target`, ensuring that protected tokens can't be spent

参数

名称 类型 描述
_target address Address where the action is being executed
_data bytes Calldata for the action
execute(_target: address, _ethValue: uint256, _data: bytes) nonpayable

Execute '`@radspec(_target, _data)`' on `_target``_ethValue == 0 ? '' : ' (Sending ' + @tokenAmount(0x0000000000000000000000000000000000000000, _ethValue) + ')'`

参数

名称 类型 描述
_target address Address where the action is being executed
_ethValue uint256 Amount of ETH from the contract that is sent with the action
_data bytes Calldata for the action
transfer(_token: address, _to: address, _value: uint256) nonpayable

参数

名称 类型 描述
_token address
_to address
_value uint256
forward(_evmScript: bytes) nonpayable

Execute the script as the Agent app

开发者: IForwarder interface conformance. Forwards any token holder action.

参数

名称 类型 描述
_evmScript bytes Script being executed

事件

SafeExecute(sender: address, target: address, data: bytes)
名称 类型 已索引 描述
sender address
target address
data bytes
Execute(sender: address, target: address, ethValue: uint256, data: bytes)
名称 类型 已索引 描述
sender address
target address
ethValue uint256
data bytes
AddProtectedToken(token: address)
名称 类型 已索引 描述
token address
RemoveProtectedToken(token: address)
名称 类型 已索引 描述
token address
PresignHash(sender: address, hash: bytes32)
名称 类型 已索引 描述
sender address
hash bytes32
SetDesignatedSigner(sender: address, oldSigner: address, newSigner: address)
名称 类型 已索引 描述
sender address
oldSigner address
newSigner address
ReceiveERC721(token: address, operator: address, from: address, tokenId: uint256, data: bytes)
名称 类型 已索引 描述
token address
operator address
from address
tokenId uint256
data bytes
VaultTransfer(token: address, to: address, amount: uint256)
名称 类型 已索引 描述
token address
to address
amount uint256
VaultDeposit(token: address, sender: address, amount: uint256)
名称 类型 已索引 描述
token address
sender address
amount uint256
ScriptResult(executor: address, script: bytes, input: bytes, returnData: bytes)
名称 类型 已索引 描述
executor address
script bytes
input bytes
returnData bytes
RecoverToVault(vault: address, token: address, amount: uint256)
名称 类型 已索引 描述
vault address
token address
amount uint256