Skip to content

Instantly share code, notes, and snippets.

@cwhinfrey
Created March 13, 2020 21:53
Show Gist options
  • Save cwhinfrey/743a18169fcadfd9d76e1b3b6ab35caa to your computer and use it in GitHub Desktop.
Save cwhinfrey/743a18169fcadfd9d76e1b3b6ab35caa to your computer and use it in GitHub Desktop.
Full Authereum Interface
pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
contract IAuthereumAccount {
function () external payable;
// getters
function authereumVersion() external view returns(string memory);
function lastInitializedVersion() external view returns (uint256);
function authKeys(address _) external view returns(bool);
function nonce() external view returns (uint256);
function numAuthKeys() external view returns (uint256);
// public functions
function getChainId() external pure returns (uint256);
function addAuthKey(address _authKey) external;
function removeAuthKey(address _authKey) external;
function isValidAuthKeySignature(bytes calldata _data, bytes calldata _signature) external view returns (bytes4);
function isValidLoginKeySignature(bytes calldata _data, bytes calldata _signature) external view returns (bytes4);
function executeMultipleMetaTransactions(bytes[] calldata _transactions) external returns (bytes[] memory);
function executeMultipleAuthKeyMetaTransactions(
bytes[] calldata _transactions,
uint256 _gasPrice,
uint256 _gasOverhead,
address _feeTokenAddress,
uint256 _feeTokenRate,
bytes calldata _transactionMessageHashSignature
) external returns (bytes[] memory);
function executeMultipleLoginKeyMetaTransactions(
bytes[] calldata _transactions,
uint256 _gasPrice,
uint256 _gasOverhead,
bytes calldata _loginKeyRestrictionsData,
address _feeTokenAddress,
uint256 _feeTokenRate,
bytes calldata _transactionMessageHashSignature,
bytes calldata _loginKeyAttestationSignature
) external returns (bytes[] memory);
// ERC1271
function isValidSignature(
bytes memory _data,
bytes memory _signature
) public view returns (bytes4 magicValue);
// ERC721
function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4);
// ERC1155
function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);
function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external returns(bytes4);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment