Agent

Ethereum

0x40907540d8a6c65c637785e8f8b742ae6b0b9968

Proxy implementation: 0x3a93c17fc82cc33420d1809dda9fb715cc89dd37

Solidity v0.4.24+commit.e67f0147

🤖
Query this contract from your AI
Reference: 0x40907540d8a6c65c637785e8f8b742ae6b0b9968
Sample prompt: “Tell me the current state of eth/0x40907540d8a6c65c637785e8f8b742ae6b0b9968”
No AI wired up yet? → mcp.smarts.md

Admin & Risk

Who can change the rules?

Detected upgradeable controls from the verified ABI.

Upgradeable

Current controls

Implementation
0x3a93c17fc82cc33420d1809dda9fb715cc89dd37 ↗ Etherscan → smarts proxy

Overview

Read Functions
33
Write Functions
12
Events
11

Read Functions

Block #25,170,043 · just now
ADD_PROTECTED_TOKEN_ROLE() view → 0x6eb2a499556bfa2872f5aa15812b956cc4a71b4d64eb3553f7073c7e41415aaa

Returns

Name Type Description
bytes32
supportsInterface(_interfaceId: bytes4) pure

Tells whether this contract supports a given ERC-165 interface

dev: Implements conformance to ERC-165

Parameters

Name Type Description
_interfaceId bytes4 Interface bytes to check

Returns

Name Type Description
bool True if this contract supports the interface
hasInitialized() view → true

Returns

Name Type Description
bool Whether the contract has been initialized by the time of the current block
ERC1271_INTERFACE_ID() view → 0xfb855dc9

Returns

Name Type Description
bytes4
isValidSignature(_hash: bytes32, _signature: bytes) view
dev: Function must be implemented by deriving contract

Parameters

Name Type Description
_hash bytes32 Arbitrary length data signed on the behalf of address(this)
_signature bytes Signature byte array associated with _data

Returns

Name Type Description
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

Name Type Description
bytes4
TRANSFER_ROLE() view → 0x8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c

Returns

Name Type Description
bytes32
isValidSignature(_data: bytes, _signature: bytes) view
dev: Function must be implemented by deriving contract

Parameters

Name Type Description
_data bytes
_signature bytes Signature byte array associated with _data

Returns

Name Type Description
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 → 0

Returns

Name Type Description
uint256
getEVMScriptExecutor(_script: bytes) view

Parameters

Name Type Description
_script bytes

Returns

Name Type Description
address
getRecoveryVault() view → 0x0000000000000000000000000000000000000000
dev: Get the recovery vault for the app

Returns

Name Type Description
address Recovery vault address for the app
RUN_SCRIPT_ROLE() view → 0xb421f7ad7646747f3051c50c0b8e2377839296cd4973e27f63821d73e390338f

Returns

Name Type Description
bytes32
SAFE_EXECUTE_ROLE() view → 0x0a1ad7b87f5846153c6d5a1f761d71c7d0cfd122384f56066cd33239b7933694

Returns

Name Type Description
bytes32
REMOVE_PROTECTED_TOKEN_ROLE() view → 0x71eee93d500f6f065e38b27d242a756466a00a52a1dbcd6b4260f01a8640402a

Returns

Name Type Description
bytes32
isDepositable() view → true

Returns

Name Type Description
bool
DESIGNATE_SIGNER_ROLE() view → 0x23ce341656c3f14df6692eebd4757791e33662b7dcf9970c8308303da5472b7c

Returns

Name Type Description
bytes32
EXECUTE_ROLE() view → 0xcebf517aa4440d1d125e0355aae64401211d0848a23c02cc5d29a14822580ba4

Returns

Name Type Description
bytes32
allowRecoverability(address) view
dev: By default deriving from AragonApp makes it recoverable

Parameters

Name Type Description
address

Returns

Name Type Description
bool bool whether the app allows the recovery
appId() view → 0x9ac98dc5f995bf0211ed589ef022719d1487e5cb2bab505676f0d084c07cf89a

Returns

Name Type Description
bytes32
protectedTokens(uint256) view

Parameters

Name Type Description
uint256

Returns

Name Type Description
address
getInitializationBlock() view → 10,647,744

Returns

Name Type Description
uint256 Block number in which the contract was initialized
ERC1271_RETURN_VALID_SIGNATURE() view → 0x20c13b0b

Returns

Name Type Description
bytes4
canPerform(_sender: address, _role: bytes32, _params: uint256[]) view
dev: Check whether an action can be performed by a sender for a particular role on this app

Parameters

Name Type Description
_sender address Sender of the call
_role bytes32 Role on this app
_params uint256[] Permission params for the role

Returns

Name Type Description
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 → 0x1b13e8e7b85b2f92ca4436f98f88ce169f63d567

Returns

Name Type Description
address
designatedSigner() view → 0x0000000000000000000000000000000000000000

Returns

Name Type Description
address
PROTECTED_TOKENS_CAP() view → 10

Returns

Name Type Description
uint256
ADD_PRESIGNED_HASH_ROLE() view → 0x0b29780bb523a130b3b01f231ef49ed2fa2781645591a0b0a44ca98f15a5994c

Returns

Name Type Description
bytes32
isPresigned(bytes32) view

Parameters

Name Type Description
bytes32

Returns

Name Type Description
bool
canForward(_sender: address, _evmScript: bytes) view

Tells whether `_sender` can forward actions or not

dev: IForwarder interface conformance

Parameters

Name Type Description
_sender address Address of the account intending to forward an action
_evmScript bytes

Returns

Name Type Description
bool True if the given address can run scripts, false otherwise
kernel() view → 0xad06868167bc5ac5cfcbef2cafa82bc76961d72d

Returns

Name Type Description
address
isPetrified() view → false

Returns

Name Type Description
bool
balance(_token: address) view

Parameters

Name Type Description
_token address

Returns

Name Type Description
uint256
isForwarder() pure → true

Tells whether the Agent app is a forwarder or not

dev: IForwarder interface conformance

Returns

Name Type Description
bool Always true

Write Functions

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

Handle the receipt of an NFT

dev: 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.

Parameters

Name Type Description
_operator address
_from address
_tokenId uint256
_data bytes

Returns

Name Type Description
bytes4 bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
deposit(_token: address, _value: uint256) payable

Deposit `_value` `_token` to the vault

Parameters

Name Type Description
_token address Address of the token being transferred
_value uint256 Amount of tokens being transferred
presignHash(_hash: bytes32) nonpayable

Pre-sign hash `_hash`

Parameters

Name Type Description
_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

Parameters

Name Type Description
_token address Address of the token to be unprotected
addProtectedToken(_token: address) nonpayable

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

Parameters

Name Type Description
_token address Address of the token to be protected
initialize() nonpayable

Initialize Vault app

dev: 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.

Parameters

Name Type Description
_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

Parameters

Name Type Description
_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

Parameters

Name Type Description
_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) + ')'`

Parameters

Name Type Description
_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

Parameters

Name Type Description
_token address
_to address
_value uint256
forward(_evmScript: bytes) nonpayable

Execute the script as the Agent app

dev: IForwarder interface conformance. Forwards any token holder action.

Parameters

Name Type Description
_evmScript bytes Script being executed

Events

SafeExecute(sender: address, target: address, data: bytes)
Name Type Indexed Description
sender address
target address
data bytes
Execute(sender: address, target: address, ethValue: uint256, data: bytes)
Name Type Indexed Description
sender address
target address
ethValue uint256
data bytes
AddProtectedToken(token: address)
Name Type Indexed Description
token address
RemoveProtectedToken(token: address)
Name Type Indexed Description
token address
PresignHash(sender: address, hash: bytes32)
Name Type Indexed Description
sender address
hash bytes32
SetDesignatedSigner(sender: address, oldSigner: address, newSigner: address)
Name Type Indexed Description
sender address
oldSigner address
newSigner address
ReceiveERC721(token: address, operator: address, from: address, tokenId: uint256, data: bytes)
Name Type Indexed Description
token address
operator address
from address
tokenId uint256
data bytes
VaultTransfer(token: address, to: address, amount: uint256)
Name Type Indexed Description
token address
to address
amount uint256
VaultDeposit(token: address, sender: address, amount: uint256)
Name Type Indexed Description
token address
sender address
amount uint256
ScriptResult(executor: address, script: bytes, input: bytes, returnData: bytes)
Name Type Indexed Description
executor address
script bytes
input bytes
returnData bytes
RecoverToVault(vault: address, token: address, amount: uint256)
Name Type Indexed Description
vault address
token address
amount uint256