Skip to main content

LSP0ERC725Account

Standard Specifications
Solidity implementation

Deployable Implementation of LSP-0-ERC725Account Standard.

A smart contract account including basic functionalities such as:

Public Methods​

Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally.

constructor​

References
constructor(address initialOwner);

Deploying a LSP0ERC725Account contract with owner set to address initialOwner.

Set initialOwner as the contract owner.

  • The constructor also allows funding the contract on deployment.

  • The initialOwner will then be allowed to call protected functions marked with the onlyOwner modifier.

Emitted events:

Parameters​

NameTypeDescription
initialOwneraddressThe owner of the contract.

fallback​

References
info

Whenever the call is associated with native tokens, the function will delegate the handling of native tokens internally to the universalReceiver function passing _TYPEID_LSP0_VALUE_RECEIVED as typeId and the calldata as received data, except when the native token will be sent directly to the extension.

fallback(bytes calldata callData) external payable returns (bytes memory);

The fallback function was called with the following amount of native tokens: msg.value; and the following calldata: callData.

Achieves the goal of LSP-17-ContractExtension standard by extending the contract to handle calls of functions that do not exist natively, forwarding the function call to the extension address mapped to the function being called. This function is executed when:

  • Sending data of length less than 4 bytes to the contract.

  • The first 4 bytes of the calldata do not match any publicly callable functions from the contract ABI.

  • Receiving native tokens with some calldata.

  1. If the data is equal or longer than 4 bytes, the ERC-725Y storage is queried with the following data key: _LSP17_EXTENSION_PREFIX + bytes4(msg.sig) (Check LSP-2-ERC725YJSONSchema for encoding the data key)
  • If there is no address stored under the following data key, revert with NoExtensionFoundForFunctionSelector(bytes4). The data key relative to bytes4(0) is an exception, where no reverts occurs if there is no extension address stored under. This exception is made to allow users to send random data (graffiti) to the account and to be able to react on it.

  • If there is an address, forward the msg.data to the extension using the CALL opcode, appending 52 bytes (20 bytes of msg.sender and 32 bytes of msg.value). Return what the calls returns, or revert if the call failed.

  1. If the data sent to this function is of length less than 4 bytes (not a function selector), return.

Emitted events:

  • UniversalReceiver event when receiving native tokens and extension function selector is not found or not payable.

receive​

References
info

This function internally delegates the handling of native tokens to the universalReceiver function passing _TYPEID_LSP0_VALUE_RECEIVED as typeId and an empty bytes array as received data.

receive() external payable;

Executed:

  • When receiving some native tokens without any additional data.

  • On empty calls to the contract.

Emitted events:

  • Emits a UniversalReceiver event when the universalReceiver logic is executed upon receiving native tokens.

RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY​

References
function RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY()
external
view
returns (uint256);

Returns​

NameTypeDescription
0uint256-

RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD​

References
function RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD()
external
view
returns (uint256);

Returns​

NameTypeDescription
0uint256-

VERSION​

References
function VERSION() external view returns (string);

Contract version.

Returns​

NameTypeDescription
0string-

acceptOwnership​

References
function acceptOwnership() external nonpayable;

msg.sender is accepting ownership of contract: address(this).

Transfer ownership of the contract from the current owner() to the pendingOwner(). Once this function is called:

Requirements:


batchCalls​

References
info

It's not possible to send value along the functions call due to the use of delegatecall.

function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);

Executing the following batch of abi-encoded function calls on the contract: data.

Allows a caller to batch different function calls in one call. Perform a delegatecall on self, to call different functions with preserving the context.

Parameters​

NameTypeDescription
databytes[]An array of ABI encoded function calls to be called on the contract.

Returns​

NameTypeDescription
resultsbytes[]An array of abi-encoded data returned by the functions executed.

execute​

References
function execute(
uint256 operationType,
address target,
uint256 value,
bytes data
) external payable returns (bytes);

Calling address target using operationType, transferring value wei and data: data.

Generic executor function to:

  • send native tokens to any address.

  • interact with any contract by passing an abi-encoded function call in the data parameter.

  • deploy a contract by providing its creation bytecode in the data parameter.

Requirements:

  • Can be only called by the owner or by an authorised address that pass the verification check performed on the owner.
  • If a value is provided, the contract must have at least this amount in its balance to execute successfully.
  • If the operation type is CREATE (1) or CREATE2 (2), target must be address(0).
  • If the operation type is STATICCALL (3) or DELEGATECALL (4), value transfer is disallowed and must be 0.

Emitted events:

  • Executed event for each call that uses under operationType: CALL (0), STATICCALL (3) and DELEGATECALL (4).
  • ContractCreated event, when a contract is created under operationType: CREATE (1) and CREATE2 (2).
  • UniversalReceiver event when receiving native tokens.

Parameters​

NameTypeDescription
operationTypeuint256The operation type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4
targetaddressThe address of the EOA or smart contract. (unused if a contract is created via operation type 1 or 2)
valueuint256The amount of native tokens to transfer (in Wei)
databytesThe call data, or the creation bytecode of the contract to deploy if operationType is 1 or 2.

Returns​

NameTypeDescription
0bytes-

executeBatch​

References
Warning
  • The msg.value should not be trusted for any method called within the batch with operationType: DELEGATECALL (4).
function executeBatch(
uint256[] operationsType,
address[] targets,
uint256[] values,
bytes[] datas
) external payable returns (bytes[]);

Calling multiple addresses targets using operationsType, transferring values wei and data: datas.

Batch executor function that behaves the same as execute but allowing multiple operations in the same transaction.

Requirements:

  • The length of the parameters provided must be equal.
  • Can be only called by the owner or by an authorised address that pass the verification check performed on the owner.
  • If a value is provided, the contract must have at least this amount in its balance to execute successfully.
  • If the operation type is CREATE (1) or CREATE2 (2), target must be address(0).
  • If the operation type is STATICCALL (3) or DELEGATECALL (4), value transfer is disallowed and must be 0.

Emitted events:

  • Executed event for each call that uses under operationType: CALL (0), STATICCALL (3) and DELEGATECALL (4). (each iteration)
  • ContractCreated event, when a contract is created under operationType: CREATE (1) and CREATE2 (2) (each iteration)
  • UniversalReceiver event when receiving native tokens.

Parameters​

NameTypeDescription
operationsTypeuint256[]The list of operations type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4
targetsaddress[]The list of addresses to call. targets will be unused if a contract is created (operation types 1 and 2).
valuesuint256[]The list of native token amounts to transfer (in Wei).
datasbytes[]The list of calldata, or the creation bytecode of the contract to deploy if operationType is 1 or 2.

Returns​

NameTypeDescription
0bytes[]-

getData​

References
function getData(bytes32 dataKey) external view returns (bytes dataValue);

Reading the ERC725Y storage for data key dataKey returned the following value: dataValue.

Get in the ERC725Y storage the bytes data stored at a specific data key dataKey.

Parameters​

NameTypeDescription
dataKeybytes32The data key for which to retrieve the value.

Returns​

NameTypeDescription
dataValuebytesThe bytes value stored under the specified data key.

getDataBatch​

References
function getDataBatch(
bytes32[] dataKeys
) external view returns (bytes[] dataValues);

Reading the ERC725Y storage for data keys dataKeys returned the following values: dataValues.

Get in the ERC725Y storage the bytes data stored at multiple data keys dataKeys.

Parameters​

NameTypeDescription
dataKeysbytes32[]The array of keys which values to retrieve

Returns​

NameTypeDescription
dataValuesbytes[]The array of data stored at multiple keys

isValidSignature​

References
Warning

This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP0ERC725Account and prevent signatures from the same EOA to be replayed across different LSP0ERC725Accounts.

function isValidSignature(
bytes32 dataHash,
bytes signature
) external view returns (bytes4 returnedStatus);

Achieves the goal of EIP-1271 by validating signatures of smart contracts according to their own logic.

Handles two cases:

  1. If the owner is an EOA, recovers an address from the hash and the signature provided:
  • Returns the _ERC1271_SUCCESSVALUE if the address recovered is the same as the owner, indicating that it was a valid signature.

  • If the address is different, it returns the _ERC1271_FAILVALUE indicating that the signature is not valid.

  1. If the owner is a smart contract, it forwards the call of isValidSignature() to the owner contract:
  • If the contract fails or returns the _ERC1271_FAILVALUE, the isValidSignature() on the account returns the _ERC1271_FAILVALUE, indicating that the signature is not valid.

  • If the isValidSignature() on the owner returned the _ERC1271_SUCCESSVALUE, the isValidSignature() on the account returns the _ERC1271_SUCCESSVALUE, indicating that it's a valid signature.

Parameters​

NameTypeDescription
dataHashbytes32The hash of the data to be validated.
signaturebytesA signature that can validate the previous parameter (Hash).

Returns​

NameTypeDescription
returnedStatusbytes4A bytes4 value that indicates if the signature is valid or not.

owner​

References
function owner() external view returns (address);

Returns the address of the current owner.

Returns​

NameTypeDescription
0address-

pendingOwner​

References
info

If no ownership transfer is in progress, the pendingOwner will be address(0)..

function pendingOwner() external view returns (address);

The address that ownership of the contract is transferred to. This address may use acceptOwnership() to gain ownership of the contract.

Returns​

NameTypeDescription
0address-

renounceOwnership​

References
danger

Leaves the contract without an owner. Once ownership of the contract has been renounced, any functions that are restricted to be called by the owner or an address allowed by the owner will be permanently inaccessible, making these functions not callable anymore and unusable.

function renounceOwnership() external nonpayable;

msg.sender is renouncing ownership of contract address(this).

Renounce ownership of the contract in a 2-step process.

  1. The first call will initiate the process of renouncing ownership.

  2. The second call is used as a confirmation and will leave the contract without an owner.

Requirements:

  • Can be only called by the owner or by an authorised address that pass the verification check performed on the owner.

setData​

References
function setData(bytes32 dataKey, bytes dataValue) external payable;

Setting the following data key value pair in the ERC725Y storage. Data key: dataKey, data value: dataValue.

Sets a single bytes value dataValue in the ERC725Y storage for a specific data key dataKey. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data.

Requirements:

  • Can be only called by the owner or by an authorised address that pass the verification check performed on the owner.

Emitted events:

Parameters​

NameTypeDescription
dataKeybytes32The data key for which to set a new value.
dataValuebytesThe new bytes value to set.

setDataBatch​

References
function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable;

Setting the following data key value pairs in the ERC725Y storage. Data keys: dataKeys, data values: dataValues.

Batch data setting function that behaves the same as setData but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction.

Requirements:

  • Can be only called by the owner or by an authorised address that pass the verification check performed on the owner.

Emitted events:

Parameters​

NameTypeDescription
dataKeysbytes32[]An array of data keys to set bytes values for.
dataValuesbytes[]An array of bytes values to set for each dataKeys.

supportsInterface​

References
function supportsInterface(bytes4 interfaceId) external view returns (bool);

Checking if this contract supports the interface defined by the bytes4 interface ID interfaceId.

Achieves the goal of ERC-165 to detect supported interfaces and LSP-17-ContractExtension by checking if the interfaceId being queried is supported on another linked extension. If the contract doesn't support the interfaceId, it forwards the call to the supportsInterface extension according to LSP-17-ContractExtension, and checks if the extension implements the interface defined by interfaceId.

Parameters​

NameTypeDescription
interfaceIdbytes4The interface ID to check if the contract supports it.

Returns​

NameTypeDescription
0booltrue if this contract implements the interface defined by interfaceId, false otherwise.

transferOwnership​

References
function transferOwnership(address pendingNewOwner) external nonpayable;

Transfer ownership initiated by newOwner.

Initiate the process of transferring ownership of the contract by setting the new owner as the pending owner. If the new owner is a contract that supports + implements LSP1, this will also attempt to notify the new owner that ownership has been transferred to them by calling the universalReceiver() function on the newOwner contract.

Requirements:

  • Can be only called by the owner or by an authorised address that pass the verification check performed on the owner.
  • When notifying the new owner via LSP1, the typeId used must be the keccak256(...) hash of LSP0OwnershipTransferStarted.
  • Pending owner cannot accept ownership in the same tx via the LSP1 hook.

Parameters​

NameTypeDescription
pendingNewOwneraddress-

universalReceiver​

References
function universalReceiver(
bytes32 typeId,
bytes receivedData
) external payable returns (bytes returnedValues);

Notifying the contract by calling its universalReceiver function with the following informations: typeId: typeId; data: data.

Achieves the goal of LSP-1-UniversalReceiver by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts (LSP1UniversalReceiverDelegate) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps:

  1. Query the ERC-725Y storage with the data key _LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY.
  • If there is an address stored under the data key, check if this address supports the LSP1 interfaceId.

  • If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of msg.sender and 32 bytes of msg.value. If not, continue the execution of the function.

  1. Query the ERC-725Y storage with the data key _LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX + bytes32(typeId). (Check LSP-2-ERC725YJSONSchema for encoding the data key)
  • If there is an address stored under the data key, check if this address supports the LSP1 interfaceId.

  • If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of msg.sender and 32 bytes of msg.value. If not, continue the execution of the function. This function delegates internally the handling of native tokens to the universalReceiver function itself passing _TYPEID_LSP0_VALUE_RECEIVED as typeId and the calldata as received data.

Emitted events:

  • UniversalReceiver when receiving native tokens.
  • UniversalReceiver event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.

Parameters​

NameTypeDescription
typeIdbytes32The type of call received.
receivedDatabytesThe data received.

Returns​

NameTypeDescription
returnedValuesbytesThe ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call.

Internal Methods​

Any method labeled as internal serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs.

Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities.

_checkOwner​

function _checkOwner() internal view;

Throws if the sender is not the owner.


_setOwner​

function _setOwner(address newOwner) internal nonpayable;

Changes the owner if newOwner and oldOwner are different This pattern is useful in inheritance.


_execute​

function _execute(
uint256 operationType,
address target,
uint256 value,
bytes data
) internal nonpayable returns (bytes);

check the operationType provided and perform the associated low-level opcode after checking for requirements (see execute).


_executeBatch​

function _executeBatch(
uint256[] operationsType,
address[] targets,
uint256[] values,
bytes[] datas
) internal nonpayable returns (bytes[]);

check each operationType provided in the batch and perform the associated low-level opcode after checking for requirements (see executeBatch).


_executeCall​

function _executeCall(
address target,
uint256 value,
bytes data
) internal nonpayable returns (bytes result);

Perform low-level call (operation type = 0)

Parameters​

NameTypeDescription
targetaddressThe address on which call is executed
valueuint256The value to be sent with the call
databytesThe data to be sent with the call

Returns​

NameTypeDescription
resultbytesThe data from the call

_executeStaticCall​

function _executeStaticCall(
address target,
bytes data
) internal nonpayable returns (bytes result);

Perform low-level staticcall (operation type = 3)

Parameters​

NameTypeDescription
targetaddressThe address on which staticcall is executed
databytesThe data to be sent with the staticcall

Returns​

NameTypeDescription
resultbytesThe data returned from the staticcall

_executeDelegateCall​

Warning

The msg.value should not be trusted for any method called with operationType: DELEGATECALL (4).

function _executeDelegateCall(
address target,
bytes data
) internal nonpayable returns (bytes result);

Perform low-level delegatecall (operation type = 4)

Parameters​

NameTypeDescription
targetaddressThe address on which delegatecall is executed
databytesThe data to be sent with the delegatecall

Returns​

NameTypeDescription
resultbytesThe data returned from the delegatecall

_deployCreate​

function _deployCreate(
uint256 value,
bytes creationCode
) internal nonpayable returns (bytes newContract);

Deploy a contract using the CREATE opcode (operation type = 1)

Parameters​

NameTypeDescription
valueuint256The value to be sent to the contract created
creationCodebytesThe contract creation bytecode to deploy appended with the constructor argument(s)

Returns​

NameTypeDescription
newContractbytesThe address of the contract created as bytes

_deployCreate2​

function _deployCreate2(
uint256 value,
bytes creationCode
) internal nonpayable returns (bytes newContract);

Deploy a contract using the CREATE2 opcode (operation type = 2)

Parameters​

NameTypeDescription
valueuint256The value to be sent to the contract created
creationCodebytesThe contract creation bytecode to deploy appended with the constructor argument(s) and a bytes32 salt

Returns​

NameTypeDescription
newContractbytesThe address of the contract created as bytes

_getData​

function _getData(bytes32 dataKey) internal view returns (bytes dataValue);

Read the value stored under a specific dataKey inside the underlying ERC725Y storage, represented as a mapping of bytes32 data keys mapped to their bytes data values.

mapping(bytes32 => bytes) _store

Parameters​

NameTypeDescription
dataKeybytes32A bytes32 data key to read the associated bytes value from the store.

Returns​

NameTypeDescription
dataValuebytesThe bytes value associated with the given dataKey in the ERC725Y storage.

_setData​

function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;

Write a dataValue to the underlying ERC725Y storage, represented as a mapping of bytes32 data keys mapped to their bytes data values.

mapping(bytes32 => bytes) _store

Emitted events:

  • DataChanged event emitted after a successful setData call.

Parameters​

NameTypeDescription
dataKeybytes32A bytes32 data key to write the associated bytes value to the store.
dataValuebytesThe bytes value to associate with the given dataKey in the ERC725Y storage.

_transferOwnership​

function _transferOwnership(address newOwner) internal nonpayable;

Set the pending owner of the contract and cancel any renounce ownership process that was previously started.

Requirements:

  • newOwner cannot be the address of the contract itself.

Parameters​

NameTypeDescription
newOwneraddressThe address of the new pending owner.

_acceptOwnership​

function _acceptOwnership() internal nonpayable;

Set the pending owner of the contract as the new owner.


_renounceOwnership​

function _renounceOwnership() internal nonpayable;

Initiate or confirm the process of renouncing ownership after a specific delay of blocks have passed.


_supportsInterfaceInERC165Extension​

function _supportsInterfaceInERC165Extension(
bytes4 interfaceId
) internal view returns (bool);

Returns whether the interfaceId being checked is supported in the extension of the supportsInterface selector. To be used by extendable contracts wishing to extend the ERC165 interfaceIds originally supported by reading whether the interfaceId queried is supported in the supportsInterface extension if the extension is set, if not it returns false.


_getExtensionAndForwardValue​

function _getExtensionAndForwardValue(
bytes4 functionSelector
) internal view returns (address, bool);

Returns the extension address and the boolean indicating whether to forward the value received to the extension, stored under the following data key:

  • _LSP17_EXTENSION_PREFIX + <bytes4> (Check [LSP2-ERC725YJSONSchema] for encoding the data key).

  • If no extension is stored, returns the address(0).

  • If the stored value is 20 bytes, return false for the boolean


_fallbackLSP17Extendable​

Hint

If you would like to forward the msg.value to the extension contract, you should store an additional 0x01 byte after the address of the extension under the corresponding LSP17 data key.

function _fallbackLSP17Extendable(
bytes callData
) internal nonpayable returns (bytes);

Forwards the call to an extension mapped to a function selector. Calls _getExtensionAndForwardValue to get the address of the extension mapped to the function selector being called on the account. If there is no extension, the address(0) will be returned. Forwards the value sent with the call to the extension if the function selector is mapped to a payable extension. Reverts if there is no extension for the function being called, except for the bytes4(0) function selector, which passes even if there is no extension for it. If there is an extension for the function selector being called, it calls the extension with the CALL opcode, passing the msg.data appended with the 20 bytes of the msg.sender and 32 bytes of the msg.value.


_verifyCall​

function _verifyCall(
address logicVerifier
) internal nonpayable returns (bool verifyAfter);

Calls lsp20VerifyCall function on the logicVerifier.


_verifyCallResult​

function _verifyCallResult(
address logicVerifier,
bytes callResult
) internal nonpayable;

Calls lsp20VerifyCallResult function on the logicVerifier.


_revertWithLSP20DefaultError​

function _revertWithLSP20DefaultError(
bool postCall,
bytes returnedData
) internal pure;

Events​

ContractCreated​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: ContractCreated(uint256,address,uint256,bytes32)
  • Event topic hash: 0xa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c3
event ContractCreated(
uint256 indexed operationType,
address indexed contractAddress,
uint256 value,
bytes32 indexed salt
);

Deployed new contract at address contractAddress and funded with value wei (deployed using opcode: operationType).

Emitted when a new contract was created and deployed.

Parameters​

NameTypeDescription
operationType indexeduint256The opcode used to deploy the contract (CREATE or CREATE2).
contractAddress indexedaddressThe created contract address.
valueuint256The amount of native tokens (in Wei) sent to fund the created contract on deployment.
salt indexedbytes32The salt used to deterministically deploy the contract (CREATE2 only). If CREATE opcode is used, the salt value will be bytes32(0).

DataChanged​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: DataChanged(bytes32,bytes)
  • Event topic hash: 0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2
event DataChanged(bytes32 indexed dataKey, bytes dataValue);

The following data key/value pair has been changed in the ERC725Y storage: Data key: dataKey, data value: dataValue.

Emitted when data at a specific dataKey was changed to a new value dataValue.

Parameters​

NameTypeDescription
dataKey indexedbytes32The data key for which a bytes value is set.
dataValuebytesThe value to set for the given data key.

Executed​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: Executed(uint256,address,uint256,bytes4)
  • Event topic hash: 0x4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e
event Executed(
uint256 indexed operationType,
address indexed target,
uint256 value,
bytes4 indexed selector
);

Called address target using operationType with value wei and data.

Emitted when calling an address target (EOA or contract) with value.

Parameters​

NameTypeDescription
operationType indexeduint256The low-level call opcode used to call the target address (CALL, STATICALL or DELEGATECALL).
target indexedaddressThe address to call. target will be unused if a contract is created (operation types 1 and 2).
valueuint256The amount of native tokens transferred along the call (in Wei).
selector indexedbytes4The first 4 bytes (= function selector) of the data sent with the call.

OwnershipRenounced​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: OwnershipRenounced()
  • Event topic hash: 0xd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce
event OwnershipRenounced();

Successfully renounced ownership of the contract. This contract is now owned by anyone, it's owner is address(0).

Emitted when the ownership of the contract has been renounced.


OwnershipTransferStarted​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: OwnershipTransferStarted(address,address)
  • Event topic hash: 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700
event OwnershipTransferStarted(
address indexed previousOwner,
address indexed newOwner
);

The transfer of ownership of the contract was initiated. Pending new owner set to: newOwner.

Emitted when transferOwnership(..) was called and the first step of transferring ownership completed successfully which leads to pendingOwner being updated.

Parameters​

NameTypeDescription
previousOwner indexedaddressThe address of the previous owner.
newOwner indexedaddressThe address of the new owner.

OwnershipTransferred​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: OwnershipTransferred(address,address)
  • Event topic hash: 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);

Parameters​

NameTypeDescription
previousOwner indexedaddress-
newOwner indexedaddress-

RenounceOwnershipStarted​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: RenounceOwnershipStarted()
  • Event topic hash: 0x81b7f830f1f0084db6497c486cbe6974c86488dcc4e3738eab94ab6d6b1653e7
event RenounceOwnershipStarted();

Ownership renouncement initiated.

Emitted when starting the renounceOwnership(..) 2-step process.


UniversalReceiver​

References
  • Specification details: LSP-0-ERC725Account
  • Solidity implementation: LSP0ERC725Account.sol
  • Event signature: UniversalReceiver(address,uint256,bytes32,bytes,bytes)
  • Event topic hash: 0x9c3ba68eb5742b8e3961aea0afc7371a71bf433c8a67a831803b64c064a178c2
event UniversalReceiver(
address indexed from,
uint256 indexed value,
bytes32 indexed typeId,
bytes receivedData,
bytes returnedValue
);

*Address from called the universalReceiver(...) function while sending value LYX. Notification type (typeId): typeId

  • Data received: receivedData.*

Emitted when the universalReceiver function was called with a specific typeId and some receivedData

Parameters​

NameTypeDescription
from indexedaddressThe address of the EOA or smart contract that called the universalReceiver(...) function.
value indexeduint256The amount sent to the universalReceiver(...) function.
typeId indexedbytes32A bytes32 unique identifier (= "hook")that describe the type of notification, information or transaction received by the contract. Can be related to a specific standard or a hook.
receivedDatabytesAny arbitrary data that was sent to the universalReceiver(...) function.
returnedValuebytesThe value returned by the universalReceiver(...) function.

Errors​

ERC725X_ContractDeploymentFailed​

References
error ERC725X_ContractDeploymentFailed();

Reverts when contract deployment failed via execute or executeBatch functions, This error can occur using either operation type 1 (CREATE) or 2 (CREATE2).


ERC725X_CreateOperationsRequireEmptyRecipientAddress​

References
error ERC725X_CreateOperationsRequireEmptyRecipientAddress();

Reverts when passing a to address that is not address(0) (= address zero) while deploying a contract via execute or executeBatch functions. This error can occur using either operation type 1 (CREATE) or 2 (CREATE2).


ERC725X_ExecuteParametersEmptyArray​

References
error ERC725X_ExecuteParametersEmptyArray();

Reverts when one of the array parameter provided to the executeBatch function is an empty array.


ERC725X_ExecuteParametersLengthMismatch​

References
error ERC725X_ExecuteParametersLengthMismatch();

Reverts when there is not the same number of elements in the operationTypes, targets addresses, values, and datas array parameters provided when calling the executeBatch function.


ERC725X_InsufficientBalance​

References
error ERC725X_InsufficientBalance(uint256 balance, uint256 value);

Reverts when trying to send more native tokens value than available in current balance.

Parameters​

NameTypeDescription
balanceuint256The balance of native tokens of the ERC725X smart contract.
valueuint256The amount of native tokens sent via ERC725X.execute(...)/ERC725X.executeBatch(...) that is greater than the contract's balance.

ERC725X_MsgValueDisallowedInDelegateCall​

References
error ERC725X_MsgValueDisallowedInDelegateCall();

Reverts when trying to send native tokens (value / values[] parameter of execute or executeBatch functions) while making a delegatecall (operationType == 4). Sending native tokens via staticcall is not allowed because msg.value is persisting.


ERC725X_MsgValueDisallowedInStaticCall​

References
error ERC725X_MsgValueDisallowedInStaticCall();

Reverts when trying to send native tokens (value / values[] parameter of execute or executeBatch functions) while making a staticcall (operationType == 3). Sending native tokens via staticcall is not allowed because it is a state changing operation.


ERC725X_NoContractBytecodeProvided​

References
error ERC725X_NoContractBytecodeProvided();

Reverts when no contract bytecode was provided as parameter when trying to deploy a contract via execute or executeBatch. This error can occur using either operation type 1 (CREATE) or 2 (CREATE2).


ERC725X_UnknownOperationType​

References
error ERC725X_UnknownOperationType(uint256 operationTypeProvided);

Reverts when the operationTypeProvided is none of the default operation types available. (CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4)

Parameters​

NameTypeDescription
operationTypeProvideduint256The unrecognised operation type number provided to ERC725X.execute(...)/ERC725X.executeBatch(...).

ERC725Y_DataKeysValuesEmptyArray​

References
error ERC725Y_DataKeysValuesEmptyArray();

Reverts when one of the array parameter provided to setDataBatch function is an empty array.


ERC725Y_DataKeysValuesLengthMismatch​

References
error ERC725Y_DataKeysValuesLengthMismatch();

Reverts when there is not the same number of elements in the datakeys and dataValues array parameters provided when calling the setDataBatch function.


LSP14CallerNotPendingOwner​

References
error LSP14CallerNotPendingOwner(address caller);

Reverts when the caller that is trying to accept ownership of the contract is not the pending owner.

Parameters​

NameTypeDescription
calleraddressThe address that tried to accept ownership.

LSP14CannotTransferOwnershipToSelf​

References
error LSP14CannotTransferOwnershipToSelf();

Cannot transfer ownership to the address of the contract itself.

Reverts when trying to transfer ownership to the address(this).


LSP14MustAcceptOwnershipInSeparateTransaction​

References
error LSP14MustAcceptOwnershipInSeparateTransaction();

Cannot accept ownership in the same transaction with transferOwnership(...).

Reverts when pending owner accept ownership in the same transaction of transferring ownership.


LSP14NotInRenounceOwnershipInterval​

References
error LSP14NotInRenounceOwnershipInterval(
uint256 renounceOwnershipStart,
uint256 renounceOwnershipEnd
);

Cannot confirm ownership renouncement yet. The ownership renouncement is allowed from: renounceOwnershipStart until: renounceOwnershipEnd.

Reverts when trying to renounce ownership before the initial confirmation delay.

Parameters​

NameTypeDescription
renounceOwnershipStartuint256The start timestamp when one can confirm the renouncement of ownership.
renounceOwnershipEnduint256The end timestamp when one can confirm the renouncement of ownership.

LSP20CallVerificationFailed​

References
error LSP20CallVerificationFailed(bool postCall, bytes4 returnedStatus);

reverts when the call to the owner does not return the LSP20 success value

Parameters​

NameTypeDescription
postCallboolTrue if the execution call was done, False otherwise
returnedStatusbytes4The bytes4 decoded data returned by the logic verifier.

LSP20CallingVerifierFailed​

References
error LSP20CallingVerifierFailed(bool postCall);

reverts when the call to the owner fail with no revert reason

Parameters​

NameTypeDescription
postCallboolTrue if the execution call was done, False otherwise

LSP20EOACannotVerifyCall​

References
error LSP20EOACannotVerifyCall(address logicVerifier);

Reverts when the logic verifier is an Externally Owned Account (EOA) that cannot return the LSP20 success value.

Parameters​

NameTypeDescription
logicVerifieraddressThe address of the logic verifier

NoExtensionFoundForFunctionSelector​

References
error NoExtensionFoundForFunctionSelector(bytes4 functionSelector);

reverts when there is no extension for the function selector being called with

Parameters​

NameTypeDescription
functionSelectorbytes4-