@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
715 lines • 22.4 kB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ownerOf",
"outputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "bool",
"name": "_approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol",
"exportedSymbols": {
"IERC165": [
22864
],
"IERC721": [
13932
],
"IERC721Metadata": [
24897
]
},
"id": 24898,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 24872,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "112:23:9"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"file": "../IERC721.sol",
"id": 24873,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24898,
"sourceUnit": 13933,
"src": "137:24:9",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 24875,
"name": "IERC721",
"nodeType": "IdentifierPath",
"referencedDeclaration": 13932,
"src": "326:7:9"
},
"id": 24876,
"nodeType": "InheritanceSpecifier",
"src": "326:7:9"
}
],
"contractDependencies": [
13932,
22864
],
"contractKind": "interface",
"documentation": {
"id": 24874,
"nodeType": "StructuredDocumentation",
"src": "163:133:9",
"text": " @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n @dev See https://eips.ethereum.org/EIPS/eip-721"
},
"fullyImplemented": false,
"id": 24897,
"linearizedBaseContracts": [
24897,
13932,
22864
],
"name": "IERC721Metadata",
"nameLocation": "307:15:9",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 24877,
"nodeType": "StructuredDocumentation",
"src": "340:58:9",
"text": " @dev Returns the token collection name."
},
"functionSelector": "06fdde03",
"id": 24882,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "name",
"nameLocation": "412:4:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24878,
"nodeType": "ParameterList",
"parameters": [],
"src": "416:2:9"
},
"returnParameters": {
"id": 24881,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24880,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24882,
"src": "442:13:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 24879,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "442:6:9",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "441:15:9"
},
"scope": 24897,
"src": "403:54:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 24883,
"nodeType": "StructuredDocumentation",
"src": "463:60:9",
"text": " @dev Returns the token collection symbol."
},
"functionSelector": "95d89b41",
"id": 24888,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "symbol",
"nameLocation": "537:6:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24884,
"nodeType": "ParameterList",
"parameters": [],
"src": "543:2:9"
},
"returnParameters": {
"id": 24887,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24886,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24888,
"src": "569:13:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 24885,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "569:6:9",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "568:15:9"
},
"scope": 24897,
"src": "528:56:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 24889,
"nodeType": "StructuredDocumentation",
"src": "590:90:9",
"text": " @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token."
},
"functionSelector": "c87b56dd",
"id": 24896,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "tokenURI",
"nameLocation": "694:8:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24892,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24891,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "711:7:9",
"nodeType": "VariableDeclaration",
"scope": 24896,
"src": "703:15:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24890,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "703:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "702:17:9"
},
"returnParameters": {
"id": 24895,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24894,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24896,
"src": "743:13:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 24893,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "743:6:9",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "742:15:9"
},
"scope": 24897,
"src": "685:73:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 24898,
"src": "297:463:9"
}
],
"src": "112:649:9"
},
"bytecode": "",
"bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"compiler": {
"evm_version": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"version": "0.8.2+commit.661d1103"
},
"contractName": "IERC721Metadata",
"coverageMap": {
"branches": {},
"statements": {}
},
"dependencies": [
"OpenZeppelin/openzeppelin-contracts@4.7.3/IERC165",
"OpenZeppelin/openzeppelin-contracts@4.7.3/IERC721"
],
"deployedBytecode": "",
"deployedSourceMap": "",
"language": "Solidity",
"natspec": {
"details": "See https://eips.ethereum.org/EIPS/eip-721",
"kind": "dev",
"methods": {
"approve(address,uint256)": {
"details": "Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event."
},
"balanceOf(address)": {
"details": "Returns the number of tokens in ``owner``'s account."
},
"getApproved(uint256)": {
"details": "Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist."
},
"isApprovedForAll(address,address)": {
"details": "Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll}"
},
"name()": {
"details": "Returns the token collection name."
},
"ownerOf(uint256)": {
"details": "Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist."
},
"safeTransferFrom(address,address,uint256)": {
"details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
},
"safeTransferFrom(address,address,uint256,bytes)": {
"details": "Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
},
"setApprovalForAll(address,bool)": {
"details": "Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event."
},
"supportsInterface(bytes4)": {
"details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
},
"symbol()": {
"details": "Returns the token collection symbol."
},
"tokenURI(uint256)": {
"details": "Returns the Uniform Resource Identifier (URI) for `tokenId` token."
},
"transferFrom(address,address,uint256)": {
"details": "Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
}
},
"title": "ERC-721 Non-Fungible Token Standard, optional metadata extension",
"version": 1
},
"offset": [
297,
760
],
"opcodes": "",
"pcMap": {},
"sha1": "f2961c701500b017eb65f22ae6a5bc46486b959a",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n",
"sourceMap": "",
"sourcePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol",
"type": "interface"
}