├── .deps ├── npm │ └── @openzeppelin │ │ └── contracts │ │ ├── access │ │ ├── Ownable.sol │ │ └── artifacts │ │ │ ├── Ownable.json │ │ │ ├── Ownable_metadata.json │ │ │ └── build-info │ │ │ └── 1785f0e73bed74f973c836cecb58c385.json │ │ ├── interfaces │ │ ├── IERC5267.sol │ │ ├── artifacts │ │ │ ├── IERC1155Errors.json │ │ │ ├── IERC1155Errors_metadata.json │ │ │ ├── IERC20Errors.json │ │ │ ├── IERC20Errors_metadata.json │ │ │ ├── IERC721Errors.json │ │ │ ├── IERC721Errors_metadata.json │ │ │ └── build-info │ │ │ │ └── 7dd0c58102681f3d0a5ef1de2097401e.json │ │ └── draft-IERC6093.sol │ │ ├── token │ │ └── ERC20 │ │ │ ├── ERC20.sol │ │ │ ├── IERC20.sol │ │ │ ├── artifacts │ │ │ ├── ERC20.json │ │ │ ├── ERC20_metadata.json │ │ │ ├── IERC20.json │ │ │ ├── IERC20_metadata.json │ │ │ └── build-info │ │ │ │ └── 91034427c33a656122ed82fdc8c93566.json │ │ │ └── extensions │ │ │ ├── ERC20Permit.sol │ │ │ ├── IERC20Metadata.sol │ │ │ ├── IERC20Permit.sol │ │ │ └── artifacts │ │ │ ├── IERC20Metadata.json │ │ │ ├── IERC20Metadata_metadata.json │ │ │ └── build-info │ │ │ └── 49d554318966d7b040913774c789a9c9.json │ │ └── utils │ │ ├── Context.sol │ │ ├── Nonces.sol │ │ ├── ShortStrings.sol │ │ ├── StorageSlot.sol │ │ ├── Strings.sol │ │ ├── artifacts │ │ ├── Context.json │ │ ├── Context_metadata.json │ │ └── build-info │ │ │ └── fbaeb5e28d1e77b930eededfb49468c9.json │ │ ├── cryptography │ │ ├── ECDSA.sol │ │ ├── EIP712.sol │ │ └── MessageHashUtils.sol │ │ └── math │ │ ├── Math.sol │ │ └── SignedMath.sol └── remix-tests │ ├── artifacts │ ├── Assert.json │ ├── Assert_metadata.json │ ├── TestsAccounts.json │ ├── TestsAccounts_metadata.json │ └── build-info │ │ ├── 38970187beec235af9ba1abf3cbfa8b1.json │ │ └── 84ef4b0439b5e314442784275d0ffed6.json │ ├── remix_accounts.sol │ └── remix_tests.sol ├── .prettierrc.json ├── .states └── vm-cancun │ └── state.json ├── LICENSE ├── README.md └── contracts ├── artifacts ├── Bank.json ├── Bank_metadata.json ├── JVCToken.json ├── JVCToken_metadata.json └── build-info │ └── 6f366dbf97e985b12f72be84c67408a9.json ├── bank.sol └── token.sol /.deps/npm/@openzeppelin/contracts/access/Ownable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {Context} from "../utils/Context.sol"; 7 | 8 | /** 9 | * @dev Contract module which provides a basic access control mechanism, where 10 | * there is an account (an owner) that can be granted exclusive access to 11 | * specific functions. 12 | * 13 | * The initial owner is set to the address provided by the deployer. This can 14 | * later be changed with {transferOwnership}. 15 | * 16 | * This module is used through inheritance. It will make available the modifier 17 | * `onlyOwner`, which can be applied to your functions to restrict their use to 18 | * the owner. 19 | */ 20 | abstract contract Ownable is Context { 21 | address private _owner; 22 | 23 | /** 24 | * @dev The caller account is not authorized to perform an operation. 25 | */ 26 | error OwnableUnauthorizedAccount(address account); 27 | 28 | /** 29 | * @dev The owner is not a valid owner account. (eg. `address(0)`) 30 | */ 31 | error OwnableInvalidOwner(address owner); 32 | 33 | event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); 34 | 35 | /** 36 | * @dev Initializes the contract setting the address provided by the deployer as the initial owner. 37 | */ 38 | constructor(address initialOwner) { 39 | if (initialOwner == address(0)) { 40 | revert OwnableInvalidOwner(address(0)); 41 | } 42 | _transferOwnership(initialOwner); 43 | } 44 | 45 | /** 46 | * @dev Throws if called by any account other than the owner. 47 | */ 48 | modifier onlyOwner() { 49 | _checkOwner(); 50 | _; 51 | } 52 | 53 | /** 54 | * @dev Returns the address of the current owner. 55 | */ 56 | function owner() public view virtual returns (address) { 57 | return _owner; 58 | } 59 | 60 | /** 61 | * @dev Throws if the sender is not the owner. 62 | */ 63 | function _checkOwner() internal view virtual { 64 | if (owner() != _msgSender()) { 65 | revert OwnableUnauthorizedAccount(_msgSender()); 66 | } 67 | } 68 | 69 | /** 70 | * @dev Leaves the contract without owner. It will not be possible to call 71 | * `onlyOwner` functions. Can only be called by the current owner. 72 | * 73 | * NOTE: Renouncing ownership will leave the contract without an owner, 74 | * thereby disabling any functionality that is only available to the owner. 75 | */ 76 | // function renounceOwnership() public virtual onlyOwner { 77 | // _transferOwnership(address(0)); 78 | // } 79 | 80 | /** 81 | * @dev Transfers ownership of the contract to a new account (`newOwner`). 82 | * Can only be called by the current owner. 83 | */ 84 | function transferOwnership(address newOwner) public virtual onlyOwner { 85 | if (newOwner == address(0)) { 86 | revert OwnableInvalidOwner(address(0)); 87 | } 88 | _transferOwnership(newOwner); 89 | } 90 | 91 | /** 92 | * @dev Transfers ownership of the contract to a new account (`newOwner`). 93 | * Internal function without access restriction. 94 | */ 95 | function _transferOwnership(address newOwner) internal virtual { 96 | address oldOwner = _owner; 97 | _owner = newOwner; 98 | emit OwnershipTransferred(oldOwner, newOwner); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/access/artifacts/Ownable.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": { 52 | "owner()": "8da5cb5b", 53 | "transferOwnership(address)": "f2fde38b" 54 | } 55 | }, 56 | "abi": [ 57 | { 58 | "inputs": [ 59 | { 60 | "internalType": "address", 61 | "name": "owner", 62 | "type": "address" 63 | } 64 | ], 65 | "name": "OwnableInvalidOwner", 66 | "type": "error" 67 | }, 68 | { 69 | "inputs": [ 70 | { 71 | "internalType": "address", 72 | "name": "account", 73 | "type": "address" 74 | } 75 | ], 76 | "name": "OwnableUnauthorizedAccount", 77 | "type": "error" 78 | }, 79 | { 80 | "anonymous": false, 81 | "inputs": [ 82 | { 83 | "indexed": true, 84 | "internalType": "address", 85 | "name": "previousOwner", 86 | "type": "address" 87 | }, 88 | { 89 | "indexed": true, 90 | "internalType": "address", 91 | "name": "newOwner", 92 | "type": "address" 93 | } 94 | ], 95 | "name": "OwnershipTransferred", 96 | "type": "event" 97 | }, 98 | { 99 | "inputs": [], 100 | "name": "owner", 101 | "outputs": [ 102 | { 103 | "internalType": "address", 104 | "name": "", 105 | "type": "address" 106 | } 107 | ], 108 | "stateMutability": "view", 109 | "type": "function" 110 | }, 111 | { 112 | "inputs": [ 113 | { 114 | "internalType": "address", 115 | "name": "newOwner", 116 | "type": "address" 117 | } 118 | ], 119 | "name": "transferOwnership", 120 | "outputs": [], 121 | "stateMutability": "nonpayable", 122 | "type": "function" 123 | } 124 | ] 125 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/access/artifacts/Ownable_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "address", 12 | "name": "owner", 13 | "type": "address" 14 | } 15 | ], 16 | "name": "OwnableInvalidOwner", 17 | "type": "error" 18 | }, 19 | { 20 | "inputs": [ 21 | { 22 | "internalType": "address", 23 | "name": "account", 24 | "type": "address" 25 | } 26 | ], 27 | "name": "OwnableUnauthorizedAccount", 28 | "type": "error" 29 | }, 30 | { 31 | "anonymous": false, 32 | "inputs": [ 33 | { 34 | "indexed": true, 35 | "internalType": "address", 36 | "name": "previousOwner", 37 | "type": "address" 38 | }, 39 | { 40 | "indexed": true, 41 | "internalType": "address", 42 | "name": "newOwner", 43 | "type": "address" 44 | } 45 | ], 46 | "name": "OwnershipTransferred", 47 | "type": "event" 48 | }, 49 | { 50 | "inputs": [], 51 | "name": "owner", 52 | "outputs": [ 53 | { 54 | "internalType": "address", 55 | "name": "", 56 | "type": "address" 57 | } 58 | ], 59 | "stateMutability": "view", 60 | "type": "function" 61 | }, 62 | { 63 | "inputs": [ 64 | { 65 | "internalType": "address", 66 | "name": "newOwner", 67 | "type": "address" 68 | } 69 | ], 70 | "name": "transferOwnership", 71 | "outputs": [], 72 | "stateMutability": "nonpayable", 73 | "type": "function" 74 | } 75 | ], 76 | "devdoc": { 77 | "details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.", 78 | "errors": { 79 | "OwnableInvalidOwner(address)": [ 80 | { 81 | "details": "The owner is not a valid owner account. (eg. `address(0)`)" 82 | } 83 | ], 84 | "OwnableUnauthorizedAccount(address)": [ 85 | { 86 | "details": "The caller account is not authorized to perform an operation." 87 | } 88 | ] 89 | }, 90 | "kind": "dev", 91 | "methods": { 92 | "constructor": { 93 | "details": "Initializes the contract setting the address provided by the deployer as the initial owner." 94 | }, 95 | "owner()": { 96 | "details": "Returns the address of the current owner." 97 | }, 98 | "transferOwnership(address)": { 99 | "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." 100 | } 101 | }, 102 | "version": 1 103 | }, 104 | "userdoc": { 105 | "kind": "user", 106 | "methods": {}, 107 | "version": 1 108 | } 109 | }, 110 | "settings": { 111 | "compilationTarget": { 112 | ".deps/npm/@openzeppelin/contracts/access/Ownable.sol": "Ownable" 113 | }, 114 | "evmVersion": "cancun", 115 | "libraries": {}, 116 | "metadata": { 117 | "bytecodeHash": "ipfs" 118 | }, 119 | "optimizer": { 120 | "enabled": true, 121 | "runs": 200 122 | }, 123 | "remappings": [] 124 | }, 125 | "sources": { 126 | ".deps/npm/@openzeppelin/contracts/access/Ownable.sol": { 127 | "keccak256": "0x9152d3446ffd9d8ddf6b0c57edc36ac6a565de127bda10ff8094f0e1ea3f6553", 128 | "license": "MIT", 129 | "urls": [ 130 | "bzz-raw://25f37c975e92fc0bc2fe94ec0d8cad2eaae8f9214521685eb3b9a32d025fe284", 131 | "dweb:/ipfs/QmRogodSGXv581gm2LoeimVj5aLKGAzp8G1uW3M6J6rFVG" 132 | ] 133 | }, 134 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": { 135 | "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", 136 | "license": "MIT", 137 | "urls": [ 138 | "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", 139 | "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" 140 | ] 141 | } 142 | }, 143 | "version": 1 144 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/IERC5267.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | interface IERC5267 { 7 | /** 8 | * @dev MAY be emitted to signal that the domain could have changed. 9 | */ 10 | event EIP712DomainChanged(); 11 | 12 | /** 13 | * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 14 | * signature. 15 | */ 16 | function eip712Domain() 17 | external 18 | view 19 | returns ( 20 | bytes1 fields, 21 | string memory name, 22 | string memory version, 23 | uint256 chainId, 24 | address verifyingContract, 25 | bytes32 salt, 26 | uint256[] memory extensions 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/artifacts/IERC1155Errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": {} 52 | }, 53 | "abi": [ 54 | { 55 | "inputs": [ 56 | { 57 | "internalType": "address", 58 | "name": "sender", 59 | "type": "address" 60 | }, 61 | { 62 | "internalType": "uint256", 63 | "name": "balance", 64 | "type": "uint256" 65 | }, 66 | { 67 | "internalType": "uint256", 68 | "name": "needed", 69 | "type": "uint256" 70 | }, 71 | { 72 | "internalType": "uint256", 73 | "name": "tokenId", 74 | "type": "uint256" 75 | } 76 | ], 77 | "name": "ERC1155InsufficientBalance", 78 | "type": "error" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "address", 84 | "name": "approver", 85 | "type": "address" 86 | } 87 | ], 88 | "name": "ERC1155InvalidApprover", 89 | "type": "error" 90 | }, 91 | { 92 | "inputs": [ 93 | { 94 | "internalType": "uint256", 95 | "name": "idsLength", 96 | "type": "uint256" 97 | }, 98 | { 99 | "internalType": "uint256", 100 | "name": "valuesLength", 101 | "type": "uint256" 102 | } 103 | ], 104 | "name": "ERC1155InvalidArrayLength", 105 | "type": "error" 106 | }, 107 | { 108 | "inputs": [ 109 | { 110 | "internalType": "address", 111 | "name": "operator", 112 | "type": "address" 113 | } 114 | ], 115 | "name": "ERC1155InvalidOperator", 116 | "type": "error" 117 | }, 118 | { 119 | "inputs": [ 120 | { 121 | "internalType": "address", 122 | "name": "receiver", 123 | "type": "address" 124 | } 125 | ], 126 | "name": "ERC1155InvalidReceiver", 127 | "type": "error" 128 | }, 129 | { 130 | "inputs": [ 131 | { 132 | "internalType": "address", 133 | "name": "sender", 134 | "type": "address" 135 | } 136 | ], 137 | "name": "ERC1155InvalidSender", 138 | "type": "error" 139 | }, 140 | { 141 | "inputs": [ 142 | { 143 | "internalType": "address", 144 | "name": "operator", 145 | "type": "address" 146 | }, 147 | { 148 | "internalType": "address", 149 | "name": "owner", 150 | "type": "address" 151 | } 152 | ], 153 | "name": "ERC1155MissingApprovalForAll", 154 | "type": "error" 155 | } 156 | ] 157 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/artifacts/IERC1155Errors_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "address", 12 | "name": "sender", 13 | "type": "address" 14 | }, 15 | { 16 | "internalType": "uint256", 17 | "name": "balance", 18 | "type": "uint256" 19 | }, 20 | { 21 | "internalType": "uint256", 22 | "name": "needed", 23 | "type": "uint256" 24 | }, 25 | { 26 | "internalType": "uint256", 27 | "name": "tokenId", 28 | "type": "uint256" 29 | } 30 | ], 31 | "name": "ERC1155InsufficientBalance", 32 | "type": "error" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "address", 38 | "name": "approver", 39 | "type": "address" 40 | } 41 | ], 42 | "name": "ERC1155InvalidApprover", 43 | "type": "error" 44 | }, 45 | { 46 | "inputs": [ 47 | { 48 | "internalType": "uint256", 49 | "name": "idsLength", 50 | "type": "uint256" 51 | }, 52 | { 53 | "internalType": "uint256", 54 | "name": "valuesLength", 55 | "type": "uint256" 56 | } 57 | ], 58 | "name": "ERC1155InvalidArrayLength", 59 | "type": "error" 60 | }, 61 | { 62 | "inputs": [ 63 | { 64 | "internalType": "address", 65 | "name": "operator", 66 | "type": "address" 67 | } 68 | ], 69 | "name": "ERC1155InvalidOperator", 70 | "type": "error" 71 | }, 72 | { 73 | "inputs": [ 74 | { 75 | "internalType": "address", 76 | "name": "receiver", 77 | "type": "address" 78 | } 79 | ], 80 | "name": "ERC1155InvalidReceiver", 81 | "type": "error" 82 | }, 83 | { 84 | "inputs": [ 85 | { 86 | "internalType": "address", 87 | "name": "sender", 88 | "type": "address" 89 | } 90 | ], 91 | "name": "ERC1155InvalidSender", 92 | "type": "error" 93 | }, 94 | { 95 | "inputs": [ 96 | { 97 | "internalType": "address", 98 | "name": "operator", 99 | "type": "address" 100 | }, 101 | { 102 | "internalType": "address", 103 | "name": "owner", 104 | "type": "address" 105 | } 106 | ], 107 | "name": "ERC1155MissingApprovalForAll", 108 | "type": "error" 109 | } 110 | ], 111 | "devdoc": { 112 | "details": "Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.", 113 | "errors": { 114 | "ERC1155InsufficientBalance(address,uint256,uint256,uint256)": [ 115 | { 116 | "details": "Indicates an error related to the current `balance` of a `sender`. Used in transfers.", 117 | "params": { 118 | "balance": "Current balance for the interacting account.", 119 | "needed": "Minimum amount required to perform a transfer.", 120 | "sender": "Address whose tokens are being transferred.", 121 | "tokenId": "Identifier number of a token." 122 | } 123 | } 124 | ], 125 | "ERC1155InvalidApprover(address)": [ 126 | { 127 | "details": "Indicates a failure with the `approver` of a token to be approved. Used in approvals.", 128 | "params": { 129 | "approver": "Address initiating an approval operation." 130 | } 131 | } 132 | ], 133 | "ERC1155InvalidArrayLength(uint256,uint256)": [ 134 | { 135 | "details": "Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. Used in batch transfers.", 136 | "params": { 137 | "idsLength": "Length of the array of token identifiers", 138 | "valuesLength": "Length of the array of token amounts" 139 | } 140 | } 141 | ], 142 | "ERC1155InvalidOperator(address)": [ 143 | { 144 | "details": "Indicates a failure with the `operator` to be approved. Used in approvals.", 145 | "params": { 146 | "operator": "Address that may be allowed to operate on tokens without being their owner." 147 | } 148 | } 149 | ], 150 | "ERC1155InvalidReceiver(address)": [ 151 | { 152 | "details": "Indicates a failure with the token `receiver`. Used in transfers.", 153 | "params": { 154 | "receiver": "Address to which tokens are being transferred." 155 | } 156 | } 157 | ], 158 | "ERC1155InvalidSender(address)": [ 159 | { 160 | "details": "Indicates a failure with the token `sender`. Used in transfers.", 161 | "params": { 162 | "sender": "Address whose tokens are being transferred." 163 | } 164 | } 165 | ], 166 | "ERC1155MissingApprovalForAll(address,address)": [ 167 | { 168 | "details": "Indicates a failure with the `operator`’s approval. Used in transfers.", 169 | "params": { 170 | "operator": "Address that may be allowed to operate on tokens without being their owner.", 171 | "owner": "Address of the current owner of a token." 172 | } 173 | } 174 | ] 175 | }, 176 | "kind": "dev", 177 | "methods": {}, 178 | "version": 1 179 | }, 180 | "userdoc": { 181 | "kind": "user", 182 | "methods": {}, 183 | "version": 1 184 | } 185 | }, 186 | "settings": { 187 | "compilationTarget": { 188 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": "IERC1155Errors" 189 | }, 190 | "evmVersion": "cancun", 191 | "libraries": {}, 192 | "metadata": { 193 | "bytecodeHash": "ipfs" 194 | }, 195 | "optimizer": { 196 | "enabled": true, 197 | "runs": 200 198 | }, 199 | "remappings": [] 200 | }, 201 | "sources": { 202 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { 203 | "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", 204 | "license": "MIT", 205 | "urls": [ 206 | "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", 207 | "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" 208 | ] 209 | } 210 | }, 211 | "version": 1 212 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/artifacts/IERC20Errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": {} 52 | }, 53 | "abi": [ 54 | { 55 | "inputs": [ 56 | { 57 | "internalType": "address", 58 | "name": "spender", 59 | "type": "address" 60 | }, 61 | { 62 | "internalType": "uint256", 63 | "name": "allowance", 64 | "type": "uint256" 65 | }, 66 | { 67 | "internalType": "uint256", 68 | "name": "needed", 69 | "type": "uint256" 70 | } 71 | ], 72 | "name": "ERC20InsufficientAllowance", 73 | "type": "error" 74 | }, 75 | { 76 | "inputs": [ 77 | { 78 | "internalType": "address", 79 | "name": "sender", 80 | "type": "address" 81 | }, 82 | { 83 | "internalType": "uint256", 84 | "name": "balance", 85 | "type": "uint256" 86 | }, 87 | { 88 | "internalType": "uint256", 89 | "name": "needed", 90 | "type": "uint256" 91 | } 92 | ], 93 | "name": "ERC20InsufficientBalance", 94 | "type": "error" 95 | }, 96 | { 97 | "inputs": [ 98 | { 99 | "internalType": "address", 100 | "name": "approver", 101 | "type": "address" 102 | } 103 | ], 104 | "name": "ERC20InvalidApprover", 105 | "type": "error" 106 | }, 107 | { 108 | "inputs": [ 109 | { 110 | "internalType": "address", 111 | "name": "receiver", 112 | "type": "address" 113 | } 114 | ], 115 | "name": "ERC20InvalidReceiver", 116 | "type": "error" 117 | }, 118 | { 119 | "inputs": [ 120 | { 121 | "internalType": "address", 122 | "name": "sender", 123 | "type": "address" 124 | } 125 | ], 126 | "name": "ERC20InvalidSender", 127 | "type": "error" 128 | }, 129 | { 130 | "inputs": [ 131 | { 132 | "internalType": "address", 133 | "name": "spender", 134 | "type": "address" 135 | } 136 | ], 137 | "name": "ERC20InvalidSpender", 138 | "type": "error" 139 | } 140 | ] 141 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/artifacts/IERC20Errors_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "address", 12 | "name": "spender", 13 | "type": "address" 14 | }, 15 | { 16 | "internalType": "uint256", 17 | "name": "allowance", 18 | "type": "uint256" 19 | }, 20 | { 21 | "internalType": "uint256", 22 | "name": "needed", 23 | "type": "uint256" 24 | } 25 | ], 26 | "name": "ERC20InsufficientAllowance", 27 | "type": "error" 28 | }, 29 | { 30 | "inputs": [ 31 | { 32 | "internalType": "address", 33 | "name": "sender", 34 | "type": "address" 35 | }, 36 | { 37 | "internalType": "uint256", 38 | "name": "balance", 39 | "type": "uint256" 40 | }, 41 | { 42 | "internalType": "uint256", 43 | "name": "needed", 44 | "type": "uint256" 45 | } 46 | ], 47 | "name": "ERC20InsufficientBalance", 48 | "type": "error" 49 | }, 50 | { 51 | "inputs": [ 52 | { 53 | "internalType": "address", 54 | "name": "approver", 55 | "type": "address" 56 | } 57 | ], 58 | "name": "ERC20InvalidApprover", 59 | "type": "error" 60 | }, 61 | { 62 | "inputs": [ 63 | { 64 | "internalType": "address", 65 | "name": "receiver", 66 | "type": "address" 67 | } 68 | ], 69 | "name": "ERC20InvalidReceiver", 70 | "type": "error" 71 | }, 72 | { 73 | "inputs": [ 74 | { 75 | "internalType": "address", 76 | "name": "sender", 77 | "type": "address" 78 | } 79 | ], 80 | "name": "ERC20InvalidSender", 81 | "type": "error" 82 | }, 83 | { 84 | "inputs": [ 85 | { 86 | "internalType": "address", 87 | "name": "spender", 88 | "type": "address" 89 | } 90 | ], 91 | "name": "ERC20InvalidSpender", 92 | "type": "error" 93 | } 94 | ], 95 | "devdoc": { 96 | "details": "Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.", 97 | "errors": { 98 | "ERC20InsufficientAllowance(address,uint256,uint256)": [ 99 | { 100 | "details": "Indicates a failure with the `spender`’s `allowance`. Used in transfers.", 101 | "params": { 102 | "allowance": "Amount of tokens a `spender` is allowed to operate with.", 103 | "needed": "Minimum amount required to perform a transfer.", 104 | "spender": "Address that may be allowed to operate on tokens without being their owner." 105 | } 106 | } 107 | ], 108 | "ERC20InsufficientBalance(address,uint256,uint256)": [ 109 | { 110 | "details": "Indicates an error related to the current `balance` of a `sender`. Used in transfers.", 111 | "params": { 112 | "balance": "Current balance for the interacting account.", 113 | "needed": "Minimum amount required to perform a transfer.", 114 | "sender": "Address whose tokens are being transferred." 115 | } 116 | } 117 | ], 118 | "ERC20InvalidApprover(address)": [ 119 | { 120 | "details": "Indicates a failure with the `approver` of a token to be approved. Used in approvals.", 121 | "params": { 122 | "approver": "Address initiating an approval operation." 123 | } 124 | } 125 | ], 126 | "ERC20InvalidReceiver(address)": [ 127 | { 128 | "details": "Indicates a failure with the token `receiver`. Used in transfers.", 129 | "params": { 130 | "receiver": "Address to which tokens are being transferred." 131 | } 132 | } 133 | ], 134 | "ERC20InvalidSender(address)": [ 135 | { 136 | "details": "Indicates a failure with the token `sender`. Used in transfers.", 137 | "params": { 138 | "sender": "Address whose tokens are being transferred." 139 | } 140 | } 141 | ], 142 | "ERC20InvalidSpender(address)": [ 143 | { 144 | "details": "Indicates a failure with the `spender` to be approved. Used in approvals.", 145 | "params": { 146 | "spender": "Address that may be allowed to operate on tokens without being their owner." 147 | } 148 | } 149 | ] 150 | }, 151 | "kind": "dev", 152 | "methods": {}, 153 | "version": 1 154 | }, 155 | "userdoc": { 156 | "kind": "user", 157 | "methods": {}, 158 | "version": 1 159 | } 160 | }, 161 | "settings": { 162 | "compilationTarget": { 163 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": "IERC20Errors" 164 | }, 165 | "evmVersion": "cancun", 166 | "libraries": {}, 167 | "metadata": { 168 | "bytecodeHash": "ipfs" 169 | }, 170 | "optimizer": { 171 | "enabled": true, 172 | "runs": 200 173 | }, 174 | "remappings": [] 175 | }, 176 | "sources": { 177 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { 178 | "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", 179 | "license": "MIT", 180 | "urls": [ 181 | "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", 182 | "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" 183 | ] 184 | } 185 | }, 186 | "version": 1 187 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/artifacts/IERC721Errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": {} 52 | }, 53 | "abi": [ 54 | { 55 | "inputs": [ 56 | { 57 | "internalType": "address", 58 | "name": "sender", 59 | "type": "address" 60 | }, 61 | { 62 | "internalType": "uint256", 63 | "name": "tokenId", 64 | "type": "uint256" 65 | }, 66 | { 67 | "internalType": "address", 68 | "name": "owner", 69 | "type": "address" 70 | } 71 | ], 72 | "name": "ERC721IncorrectOwner", 73 | "type": "error" 74 | }, 75 | { 76 | "inputs": [ 77 | { 78 | "internalType": "address", 79 | "name": "operator", 80 | "type": "address" 81 | }, 82 | { 83 | "internalType": "uint256", 84 | "name": "tokenId", 85 | "type": "uint256" 86 | } 87 | ], 88 | "name": "ERC721InsufficientApproval", 89 | "type": "error" 90 | }, 91 | { 92 | "inputs": [ 93 | { 94 | "internalType": "address", 95 | "name": "approver", 96 | "type": "address" 97 | } 98 | ], 99 | "name": "ERC721InvalidApprover", 100 | "type": "error" 101 | }, 102 | { 103 | "inputs": [ 104 | { 105 | "internalType": "address", 106 | "name": "operator", 107 | "type": "address" 108 | } 109 | ], 110 | "name": "ERC721InvalidOperator", 111 | "type": "error" 112 | }, 113 | { 114 | "inputs": [ 115 | { 116 | "internalType": "address", 117 | "name": "owner", 118 | "type": "address" 119 | } 120 | ], 121 | "name": "ERC721InvalidOwner", 122 | "type": "error" 123 | }, 124 | { 125 | "inputs": [ 126 | { 127 | "internalType": "address", 128 | "name": "receiver", 129 | "type": "address" 130 | } 131 | ], 132 | "name": "ERC721InvalidReceiver", 133 | "type": "error" 134 | }, 135 | { 136 | "inputs": [ 137 | { 138 | "internalType": "address", 139 | "name": "sender", 140 | "type": "address" 141 | } 142 | ], 143 | "name": "ERC721InvalidSender", 144 | "type": "error" 145 | }, 146 | { 147 | "inputs": [ 148 | { 149 | "internalType": "uint256", 150 | "name": "tokenId", 151 | "type": "uint256" 152 | } 153 | ], 154 | "name": "ERC721NonexistentToken", 155 | "type": "error" 156 | } 157 | ] 158 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/artifacts/IERC721Errors_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "address", 12 | "name": "sender", 13 | "type": "address" 14 | }, 15 | { 16 | "internalType": "uint256", 17 | "name": "tokenId", 18 | "type": "uint256" 19 | }, 20 | { 21 | "internalType": "address", 22 | "name": "owner", 23 | "type": "address" 24 | } 25 | ], 26 | "name": "ERC721IncorrectOwner", 27 | "type": "error" 28 | }, 29 | { 30 | "inputs": [ 31 | { 32 | "internalType": "address", 33 | "name": "operator", 34 | "type": "address" 35 | }, 36 | { 37 | "internalType": "uint256", 38 | "name": "tokenId", 39 | "type": "uint256" 40 | } 41 | ], 42 | "name": "ERC721InsufficientApproval", 43 | "type": "error" 44 | }, 45 | { 46 | "inputs": [ 47 | { 48 | "internalType": "address", 49 | "name": "approver", 50 | "type": "address" 51 | } 52 | ], 53 | "name": "ERC721InvalidApprover", 54 | "type": "error" 55 | }, 56 | { 57 | "inputs": [ 58 | { 59 | "internalType": "address", 60 | "name": "operator", 61 | "type": "address" 62 | } 63 | ], 64 | "name": "ERC721InvalidOperator", 65 | "type": "error" 66 | }, 67 | { 68 | "inputs": [ 69 | { 70 | "internalType": "address", 71 | "name": "owner", 72 | "type": "address" 73 | } 74 | ], 75 | "name": "ERC721InvalidOwner", 76 | "type": "error" 77 | }, 78 | { 79 | "inputs": [ 80 | { 81 | "internalType": "address", 82 | "name": "receiver", 83 | "type": "address" 84 | } 85 | ], 86 | "name": "ERC721InvalidReceiver", 87 | "type": "error" 88 | }, 89 | { 90 | "inputs": [ 91 | { 92 | "internalType": "address", 93 | "name": "sender", 94 | "type": "address" 95 | } 96 | ], 97 | "name": "ERC721InvalidSender", 98 | "type": "error" 99 | }, 100 | { 101 | "inputs": [ 102 | { 103 | "internalType": "uint256", 104 | "name": "tokenId", 105 | "type": "uint256" 106 | } 107 | ], 108 | "name": "ERC721NonexistentToken", 109 | "type": "error" 110 | } 111 | ], 112 | "devdoc": { 113 | "details": "Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.", 114 | "errors": { 115 | "ERC721IncorrectOwner(address,uint256,address)": [ 116 | { 117 | "details": "Indicates an error related to the ownership over a particular token. Used in transfers.", 118 | "params": { 119 | "owner": "Address of the current owner of a token.", 120 | "sender": "Address whose tokens are being transferred.", 121 | "tokenId": "Identifier number of a token." 122 | } 123 | } 124 | ], 125 | "ERC721InsufficientApproval(address,uint256)": [ 126 | { 127 | "details": "Indicates a failure with the `operator`’s approval. Used in transfers.", 128 | "params": { 129 | "operator": "Address that may be allowed to operate on tokens without being their owner.", 130 | "tokenId": "Identifier number of a token." 131 | } 132 | } 133 | ], 134 | "ERC721InvalidApprover(address)": [ 135 | { 136 | "details": "Indicates a failure with the `approver` of a token to be approved. Used in approvals.", 137 | "params": { 138 | "approver": "Address initiating an approval operation." 139 | } 140 | } 141 | ], 142 | "ERC721InvalidOperator(address)": [ 143 | { 144 | "details": "Indicates a failure with the `operator` to be approved. Used in approvals.", 145 | "params": { 146 | "operator": "Address that may be allowed to operate on tokens without being their owner." 147 | } 148 | } 149 | ], 150 | "ERC721InvalidOwner(address)": [ 151 | { 152 | "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.", 153 | "params": { 154 | "owner": "Address of the current owner of a token." 155 | } 156 | } 157 | ], 158 | "ERC721InvalidReceiver(address)": [ 159 | { 160 | "details": "Indicates a failure with the token `receiver`. Used in transfers.", 161 | "params": { 162 | "receiver": "Address to which tokens are being transferred." 163 | } 164 | } 165 | ], 166 | "ERC721InvalidSender(address)": [ 167 | { 168 | "details": "Indicates a failure with the token `sender`. Used in transfers.", 169 | "params": { 170 | "sender": "Address whose tokens are being transferred." 171 | } 172 | } 173 | ], 174 | "ERC721NonexistentToken(uint256)": [ 175 | { 176 | "details": "Indicates a `tokenId` whose `owner` is the zero address.", 177 | "params": { 178 | "tokenId": "Identifier number of a token." 179 | } 180 | } 181 | ] 182 | }, 183 | "kind": "dev", 184 | "methods": {}, 185 | "version": 1 186 | }, 187 | "userdoc": { 188 | "kind": "user", 189 | "methods": {}, 190 | "version": 1 191 | } 192 | }, 193 | "settings": { 194 | "compilationTarget": { 195 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": "IERC721Errors" 196 | }, 197 | "evmVersion": "cancun", 198 | "libraries": {}, 199 | "metadata": { 200 | "bytecodeHash": "ipfs" 201 | }, 202 | "optimizer": { 203 | "enabled": true, 204 | "runs": 200 205 | }, 206 | "remappings": [] 207 | }, 208 | "sources": { 209 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { 210 | "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", 211 | "license": "MIT", 212 | "urls": [ 213 | "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", 214 | "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" 215 | ] 216 | } 217 | }, 218 | "version": 1 219 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) 3 | pragma solidity ^0.8.20; 4 | 5 | /** 6 | * @dev Standard ERC20 Errors 7 | * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. 8 | */ 9 | interface IERC20Errors { 10 | /** 11 | * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. 12 | * @param sender Address whose tokens are being transferred. 13 | * @param balance Current balance for the interacting account. 14 | * @param needed Minimum amount required to perform a transfer. 15 | */ 16 | error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); 17 | 18 | /** 19 | * @dev Indicates a failure with the token `sender`. Used in transfers. 20 | * @param sender Address whose tokens are being transferred. 21 | */ 22 | error ERC20InvalidSender(address sender); 23 | 24 | /** 25 | * @dev Indicates a failure with the token `receiver`. Used in transfers. 26 | * @param receiver Address to which tokens are being transferred. 27 | */ 28 | error ERC20InvalidReceiver(address receiver); 29 | 30 | /** 31 | * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. 32 | * @param spender Address that may be allowed to operate on tokens without being their owner. 33 | * @param allowance Amount of tokens a `spender` is allowed to operate with. 34 | * @param needed Minimum amount required to perform a transfer. 35 | */ 36 | error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); 37 | 38 | /** 39 | * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. 40 | * @param approver Address initiating an approval operation. 41 | */ 42 | error ERC20InvalidApprover(address approver); 43 | 44 | /** 45 | * @dev Indicates a failure with the `spender` to be approved. Used in approvals. 46 | * @param spender Address that may be allowed to operate on tokens without being their owner. 47 | */ 48 | error ERC20InvalidSpender(address spender); 49 | } 50 | 51 | /** 52 | * @dev Standard ERC721 Errors 53 | * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. 54 | */ 55 | interface IERC721Errors { 56 | /** 57 | * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. 58 | * Used in balance queries. 59 | * @param owner Address of the current owner of a token. 60 | */ 61 | error ERC721InvalidOwner(address owner); 62 | 63 | /** 64 | * @dev Indicates a `tokenId` whose `owner` is the zero address. 65 | * @param tokenId Identifier number of a token. 66 | */ 67 | error ERC721NonexistentToken(uint256 tokenId); 68 | 69 | /** 70 | * @dev Indicates an error related to the ownership over a particular token. Used in transfers. 71 | * @param sender Address whose tokens are being transferred. 72 | * @param tokenId Identifier number of a token. 73 | * @param owner Address of the current owner of a token. 74 | */ 75 | error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); 76 | 77 | /** 78 | * @dev Indicates a failure with the token `sender`. Used in transfers. 79 | * @param sender Address whose tokens are being transferred. 80 | */ 81 | error ERC721InvalidSender(address sender); 82 | 83 | /** 84 | * @dev Indicates a failure with the token `receiver`. Used in transfers. 85 | * @param receiver Address to which tokens are being transferred. 86 | */ 87 | error ERC721InvalidReceiver(address receiver); 88 | 89 | /** 90 | * @dev Indicates a failure with the `operator`’s approval. Used in transfers. 91 | * @param operator Address that may be allowed to operate on tokens without being their owner. 92 | * @param tokenId Identifier number of a token. 93 | */ 94 | error ERC721InsufficientApproval(address operator, uint256 tokenId); 95 | 96 | /** 97 | * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. 98 | * @param approver Address initiating an approval operation. 99 | */ 100 | error ERC721InvalidApprover(address approver); 101 | 102 | /** 103 | * @dev Indicates a failure with the `operator` to be approved. Used in approvals. 104 | * @param operator Address that may be allowed to operate on tokens without being their owner. 105 | */ 106 | error ERC721InvalidOperator(address operator); 107 | } 108 | 109 | /** 110 | * @dev Standard ERC1155 Errors 111 | * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. 112 | */ 113 | interface IERC1155Errors { 114 | /** 115 | * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. 116 | * @param sender Address whose tokens are being transferred. 117 | * @param balance Current balance for the interacting account. 118 | * @param needed Minimum amount required to perform a transfer. 119 | * @param tokenId Identifier number of a token. 120 | */ 121 | error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); 122 | 123 | /** 124 | * @dev Indicates a failure with the token `sender`. Used in transfers. 125 | * @param sender Address whose tokens are being transferred. 126 | */ 127 | error ERC1155InvalidSender(address sender); 128 | 129 | /** 130 | * @dev Indicates a failure with the token `receiver`. Used in transfers. 131 | * @param receiver Address to which tokens are being transferred. 132 | */ 133 | error ERC1155InvalidReceiver(address receiver); 134 | 135 | /** 136 | * @dev Indicates a failure with the `operator`’s approval. Used in transfers. 137 | * @param operator Address that may be allowed to operate on tokens without being their owner. 138 | * @param owner Address of the current owner of a token. 139 | */ 140 | error ERC1155MissingApprovalForAll(address operator, address owner); 141 | 142 | /** 143 | * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. 144 | * @param approver Address initiating an approval operation. 145 | */ 146 | error ERC1155InvalidApprover(address approver); 147 | 148 | /** 149 | * @dev Indicates a failure with the `operator` to be approved. Used in approvals. 150 | * @param operator Address that may be allowed to operate on tokens without being their owner. 151 | */ 152 | error ERC1155InvalidOperator(address operator); 153 | 154 | /** 155 | * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. 156 | * Used in batch transfers. 157 | * @param idsLength Length of the array of token identifiers 158 | * @param valuesLength Length of the array of token amounts 159 | */ 160 | error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); 161 | } 162 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20} from "./IERC20.sol"; 7 | import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; 8 | import {Context} from "../../utils/Context.sol"; 9 | import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; 10 | 11 | /** 12 | * @dev Implementation of the {IERC20} interface. 13 | * 14 | * This implementation is agnostic to the way tokens are created. This means 15 | * that a supply mechanism has to be added in a derived contract using {_mint}. 16 | * 17 | * TIP: For a detailed writeup see our guide 18 | * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How 19 | * to implement supply mechanisms]. 20 | * 21 | * The default value of {decimals} is 18. To change this, you should override 22 | * this function so it returns a different value. 23 | * 24 | * We have followed general OpenZeppelin Contracts guidelines: functions revert 25 | * instead returning `false` on failure. This behavior is nonetheless 26 | * conventional and does not conflict with the expectations of ERC20 27 | * applications. 28 | * 29 | * Additionally, an {Approval} event is emitted on calls to {transferFrom}. 30 | * This allows applications to reconstruct the allowance for all accounts just 31 | * by listening to said events. Other implementations of the EIP may not emit 32 | * these events, as it isn't required by the specification. 33 | */ 34 | abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { 35 | mapping(address => uint256) private _balances; 36 | 37 | mapping(address => mapping(address => uint256)) private _allowances; 38 | 39 | uint256 private _totalSupply; 40 | 41 | string private _name; 42 | string private _symbol; 43 | 44 | /** 45 | * @dev Sets the values for {name} and {symbol}. 46 | * 47 | * All two of these values are immutable: they can only be set once during 48 | * construction. 49 | */ 50 | constructor(string memory name_, string memory symbol_) { 51 | _name = name_; 52 | _symbol = symbol_; 53 | } 54 | 55 | /** 56 | * @dev Returns the name of the token. 57 | */ 58 | function name() public view virtual returns (string memory) { 59 | return _name; 60 | } 61 | 62 | /** 63 | * @dev Returns the symbol of the token, usually a shorter version of the 64 | * name. 65 | */ 66 | function symbol() public view virtual returns (string memory) { 67 | return _symbol; 68 | } 69 | 70 | /** 71 | * @dev Returns the number of decimals used to get its user representation. 72 | * For example, if `decimals` equals `2`, a balance of `505` tokens should 73 | * be displayed to a user as `5.05` (`505 / 10 ** 2`). 74 | * 75 | * Tokens usually opt for a value of 18, imitating the relationship between 76 | * Ether and Wei. This is the default value returned by this function, unless 77 | * it's overridden. 78 | * 79 | * NOTE: This information is only used for _display_ purposes: it in 80 | * no way affects any of the arithmetic of the contract, including 81 | * {IERC20-balanceOf} and {IERC20-transfer}. 82 | */ 83 | function decimals() public view virtual returns (uint8) { 84 | return 18; 85 | } 86 | 87 | /** 88 | * @dev See {IERC20-totalSupply}. 89 | */ 90 | function totalSupply() public view virtual returns (uint256) { 91 | return _totalSupply; 92 | } 93 | 94 | /** 95 | * @dev See {IERC20-balanceOf}. 96 | */ 97 | function balanceOf(address account) public view virtual returns (uint256) { 98 | return _balances[account]; 99 | } 100 | 101 | /** 102 | * @dev See {IERC20-transfer}. 103 | * 104 | * Requirements: 105 | * 106 | * - `to` cannot be the zero address. 107 | * - the caller must have a balance of at least `value`. 108 | */ 109 | function transfer(address to, uint256 value) public virtual returns (bool) { 110 | address owner = _msgSender(); 111 | _transfer(owner, to, value); 112 | return true; 113 | } 114 | 115 | /** 116 | * @dev See {IERC20-allowance}. 117 | */ 118 | function allowance(address owner, address spender) public view virtual returns (uint256) { 119 | return _allowances[owner][spender]; 120 | } 121 | 122 | /** 123 | * @dev See {IERC20-approve}. 124 | * 125 | * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on 126 | * `transferFrom`. This is semantically equivalent to an infinite approval. 127 | * 128 | * Requirements: 129 | * 130 | * - `spender` cannot be the zero address. 131 | */ 132 | function approve(address spender, uint256 value) public virtual returns (bool) { 133 | address owner = _msgSender(); 134 | _approve(owner, spender, value); 135 | return true; 136 | } 137 | 138 | /** 139 | * @dev See {IERC20-transferFrom}. 140 | * 141 | * Emits an {Approval} event indicating the updated allowance. This is not 142 | * required by the EIP. See the note at the beginning of {ERC20}. 143 | * 144 | * NOTE: Does not update the allowance if the current allowance 145 | * is the maximum `uint256`. 146 | * 147 | * Requirements: 148 | * 149 | * - `from` and `to` cannot be the zero address. 150 | * - `from` must have a balance of at least `value`. 151 | * - the caller must have allowance for ``from``'s tokens of at least 152 | * `value`. 153 | */ 154 | function transferFrom( 155 | address from, 156 | address to, 157 | uint256 value 158 | ) public virtual returns (bool) { 159 | address spender = _msgSender(); 160 | _spendAllowance(from, spender, value); 161 | _transfer(from, to, value); 162 | return true; 163 | } 164 | 165 | /** 166 | * @dev Moves a `value` amount of tokens from `from` to `to`. 167 | * 168 | * This internal function is equivalent to {transfer}, and can be used to 169 | * e.g. implement automatic token fees, slashing mechanisms, etc. 170 | * 171 | * Emits a {Transfer} event. 172 | * 173 | * NOTE: This function is not virtual, {_update} should be overridden instead. 174 | */ 175 | function _transfer( 176 | address from, 177 | address to, 178 | uint256 value 179 | ) internal { 180 | if (from == address(0)) { 181 | revert ERC20InvalidSender(address(0)); 182 | } 183 | if (to == address(0)) { 184 | revert ERC20InvalidReceiver(address(0)); 185 | } 186 | _update(from, to, value); 187 | } 188 | 189 | /** 190 | * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` 191 | * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding 192 | * this function. 193 | * 194 | * Emits a {Transfer} event. 195 | */ 196 | function _update( 197 | address from, 198 | address to, 199 | uint256 value 200 | ) internal virtual { 201 | if (from == address(0)) { 202 | // Overflow check required: The rest of the code assumes that totalSupply never overflows 203 | _totalSupply += value; 204 | } else { 205 | uint256 fromBalance = _balances[from]; 206 | if (fromBalance < value) { 207 | revert ERC20InsufficientBalance(from, fromBalance, value); 208 | } 209 | unchecked { 210 | // Overflow not possible: value <= fromBalance <= totalSupply. 211 | _balances[from] = fromBalance - value; 212 | } 213 | } 214 | 215 | if (to == address(0)) { 216 | unchecked { 217 | // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. 218 | _totalSupply -= value; 219 | } 220 | } else { 221 | unchecked { 222 | // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. 223 | _balances[to] += value; 224 | } 225 | } 226 | 227 | emit Transfer(from, to, value); 228 | } 229 | 230 | /** 231 | * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). 232 | * Relies on the `_update` mechanism 233 | * 234 | * Emits a {Transfer} event with `from` set to the zero address. 235 | * 236 | * NOTE: This function is not virtual, {_update} should be overridden instead. 237 | */ 238 | function _mint(address account, uint256 value) internal { 239 | if (account == address(0)) { 240 | revert ERC20InvalidReceiver(address(0)); 241 | } 242 | _update(address(0), account, value); 243 | } 244 | 245 | /** 246 | * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. 247 | * Relies on the `_update` mechanism. 248 | * 249 | * Emits a {Transfer} event with `to` set to the zero address. 250 | * 251 | * NOTE: This function is not virtual, {_update} should be overridden instead 252 | */ 253 | function _burn(address account, uint256 value) internal { 254 | if (account == address(0)) { 255 | revert ERC20InvalidSender(address(0)); 256 | } 257 | _update(account, address(0), value); 258 | } 259 | 260 | /** 261 | * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. 262 | * 263 | * This internal function is equivalent to `approve`, and can be used to 264 | * e.g. set automatic allowances for certain subsystems, etc. 265 | * 266 | * Emits an {Approval} event. 267 | * 268 | * Requirements: 269 | * 270 | * - `owner` cannot be the zero address. 271 | * - `spender` cannot be the zero address. 272 | * 273 | * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. 274 | */ 275 | function _approve( 276 | address owner, 277 | address spender, 278 | uint256 value 279 | ) internal { 280 | _approve(owner, spender, value, true); 281 | } 282 | 283 | /** 284 | * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. 285 | * 286 | * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by 287 | * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any 288 | * `Approval` event during `transferFrom` operations. 289 | * 290 | * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to 291 | * true using the following override: 292 | * ``` 293 | * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { 294 | * super._approve(owner, spender, value, true); 295 | * } 296 | * ``` 297 | * 298 | * Requirements are the same as {_approve}. 299 | */ 300 | function _approve( 301 | address owner, 302 | address spender, 303 | uint256 value, 304 | bool emitEvent 305 | ) internal virtual { 306 | if (owner == address(0)) { 307 | revert ERC20InvalidApprover(address(0)); 308 | } 309 | if (spender == address(0)) { 310 | revert ERC20InvalidSpender(address(0)); 311 | } 312 | _allowances[owner][spender] = value; 313 | if (emitEvent) { 314 | emit Approval(owner, spender, value); 315 | } 316 | } 317 | 318 | /** 319 | * @dev Updates `owner` s allowance for `spender` based on spent `value`. 320 | * 321 | * Does not update the allowance value in case of infinite allowance. 322 | * Revert if not enough allowance is available. 323 | * 324 | * Does not emit an {Approval} event. 325 | */ 326 | function _spendAllowance( 327 | address owner, 328 | address spender, 329 | uint256 value 330 | ) internal virtual { 331 | uint256 currentAllowance = allowance(owner, spender); 332 | if (currentAllowance != type(uint256).max) { 333 | if (currentAllowance < value) { 334 | revert ERC20InsufficientAllowance(spender, currentAllowance, value); 335 | } 336 | unchecked { 337 | _approve(owner, spender, currentAllowance - value, false); 338 | } 339 | } 340 | } 341 | } 342 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/IERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Interface of the ERC20 standard as defined in the EIP. 8 | */ 9 | interface IERC20 { 10 | /** 11 | * @dev Emitted when `value` tokens are moved from one account (`from`) to 12 | * another (`to`). 13 | * 14 | * Note that `value` may be zero. 15 | */ 16 | event Transfer(address indexed from, address indexed to, uint256 value); 17 | 18 | /** 19 | * @dev Emitted when the allowance of a `spender` for an `owner` is set by 20 | * a call to {approve}. `value` is the new allowance. 21 | */ 22 | event Approval(address indexed owner, address indexed spender, uint256 value); 23 | 24 | /** 25 | * @dev Returns the value of tokens in existence. 26 | */ 27 | function totalSupply() external view returns (uint256); 28 | 29 | /** 30 | * @dev Returns the value of tokens owned by `account`. 31 | */ 32 | function balanceOf(address account) external view returns (uint256); 33 | 34 | /** 35 | * @dev Moves a `value` amount of tokens from the caller's account to `to`. 36 | * 37 | * Returns a boolean value indicating whether the operation succeeded. 38 | * 39 | * Emits a {Transfer} event. 40 | */ 41 | function transfer(address to, uint256 value) external returns (bool); 42 | 43 | /** 44 | * @dev Returns the remaining number of tokens that `spender` will be 45 | * allowed to spend on behalf of `owner` through {transferFrom}. This is 46 | * zero by default. 47 | * 48 | * This value changes when {approve} or {transferFrom} are called. 49 | */ 50 | function allowance(address owner, address spender) external view returns (uint256); 51 | 52 | /** 53 | * @dev Sets a `value` amount of tokens as the allowance of `spender` over the 54 | * caller's tokens. 55 | * 56 | * Returns a boolean value indicating whether the operation succeeded. 57 | * 58 | * IMPORTANT: Beware that changing an allowance with this method brings the risk 59 | * that someone may use both the old and the new allowance by unfortunate 60 | * transaction ordering. One possible solution to mitigate this race 61 | * condition is to first reduce the spender's allowance to 0 and set the 62 | * desired value afterwards: 63 | * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 64 | * 65 | * Emits an {Approval} event. 66 | */ 67 | function approve(address spender, uint256 value) external returns (bool); 68 | 69 | /** 70 | * @dev Moves a `value` amount of tokens from `from` to `to` using the 71 | * allowance mechanism. `value` is then deducted from the caller's 72 | * allowance. 73 | * 74 | * Returns a boolean value indicating whether the operation succeeded. 75 | * 76 | * Emits a {Transfer} event. 77 | */ 78 | function transferFrom(address from, address to, uint256 value) external returns (bool); 79 | } 80 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/artifacts/ERC20.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": { 52 | "allowance(address,address)": "dd62ed3e", 53 | "approve(address,uint256)": "095ea7b3", 54 | "balanceOf(address)": "70a08231", 55 | "decimals()": "313ce567", 56 | "name()": "06fdde03", 57 | "symbol()": "95d89b41", 58 | "totalSupply()": "18160ddd", 59 | "transfer(address,uint256)": "a9059cbb", 60 | "transferFrom(address,address,uint256)": "23b872dd" 61 | } 62 | }, 63 | "abi": [ 64 | { 65 | "inputs": [ 66 | { 67 | "internalType": "address", 68 | "name": "spender", 69 | "type": "address" 70 | }, 71 | { 72 | "internalType": "uint256", 73 | "name": "allowance", 74 | "type": "uint256" 75 | }, 76 | { 77 | "internalType": "uint256", 78 | "name": "needed", 79 | "type": "uint256" 80 | } 81 | ], 82 | "name": "ERC20InsufficientAllowance", 83 | "type": "error" 84 | }, 85 | { 86 | "inputs": [ 87 | { 88 | "internalType": "address", 89 | "name": "sender", 90 | "type": "address" 91 | }, 92 | { 93 | "internalType": "uint256", 94 | "name": "balance", 95 | "type": "uint256" 96 | }, 97 | { 98 | "internalType": "uint256", 99 | "name": "needed", 100 | "type": "uint256" 101 | } 102 | ], 103 | "name": "ERC20InsufficientBalance", 104 | "type": "error" 105 | }, 106 | { 107 | "inputs": [ 108 | { 109 | "internalType": "address", 110 | "name": "approver", 111 | "type": "address" 112 | } 113 | ], 114 | "name": "ERC20InvalidApprover", 115 | "type": "error" 116 | }, 117 | { 118 | "inputs": [ 119 | { 120 | "internalType": "address", 121 | "name": "receiver", 122 | "type": "address" 123 | } 124 | ], 125 | "name": "ERC20InvalidReceiver", 126 | "type": "error" 127 | }, 128 | { 129 | "inputs": [ 130 | { 131 | "internalType": "address", 132 | "name": "sender", 133 | "type": "address" 134 | } 135 | ], 136 | "name": "ERC20InvalidSender", 137 | "type": "error" 138 | }, 139 | { 140 | "inputs": [ 141 | { 142 | "internalType": "address", 143 | "name": "spender", 144 | "type": "address" 145 | } 146 | ], 147 | "name": "ERC20InvalidSpender", 148 | "type": "error" 149 | }, 150 | { 151 | "anonymous": false, 152 | "inputs": [ 153 | { 154 | "indexed": true, 155 | "internalType": "address", 156 | "name": "owner", 157 | "type": "address" 158 | }, 159 | { 160 | "indexed": true, 161 | "internalType": "address", 162 | "name": "spender", 163 | "type": "address" 164 | }, 165 | { 166 | "indexed": false, 167 | "internalType": "uint256", 168 | "name": "value", 169 | "type": "uint256" 170 | } 171 | ], 172 | "name": "Approval", 173 | "type": "event" 174 | }, 175 | { 176 | "anonymous": false, 177 | "inputs": [ 178 | { 179 | "indexed": true, 180 | "internalType": "address", 181 | "name": "from", 182 | "type": "address" 183 | }, 184 | { 185 | "indexed": true, 186 | "internalType": "address", 187 | "name": "to", 188 | "type": "address" 189 | }, 190 | { 191 | "indexed": false, 192 | "internalType": "uint256", 193 | "name": "value", 194 | "type": "uint256" 195 | } 196 | ], 197 | "name": "Transfer", 198 | "type": "event" 199 | }, 200 | { 201 | "inputs": [ 202 | { 203 | "internalType": "address", 204 | "name": "owner", 205 | "type": "address" 206 | }, 207 | { 208 | "internalType": "address", 209 | "name": "spender", 210 | "type": "address" 211 | } 212 | ], 213 | "name": "allowance", 214 | "outputs": [ 215 | { 216 | "internalType": "uint256", 217 | "name": "", 218 | "type": "uint256" 219 | } 220 | ], 221 | "stateMutability": "view", 222 | "type": "function" 223 | }, 224 | { 225 | "inputs": [ 226 | { 227 | "internalType": "address", 228 | "name": "spender", 229 | "type": "address" 230 | }, 231 | { 232 | "internalType": "uint256", 233 | "name": "value", 234 | "type": "uint256" 235 | } 236 | ], 237 | "name": "approve", 238 | "outputs": [ 239 | { 240 | "internalType": "bool", 241 | "name": "", 242 | "type": "bool" 243 | } 244 | ], 245 | "stateMutability": "nonpayable", 246 | "type": "function" 247 | }, 248 | { 249 | "inputs": [ 250 | { 251 | "internalType": "address", 252 | "name": "account", 253 | "type": "address" 254 | } 255 | ], 256 | "name": "balanceOf", 257 | "outputs": [ 258 | { 259 | "internalType": "uint256", 260 | "name": "", 261 | "type": "uint256" 262 | } 263 | ], 264 | "stateMutability": "view", 265 | "type": "function" 266 | }, 267 | { 268 | "inputs": [], 269 | "name": "decimals", 270 | "outputs": [ 271 | { 272 | "internalType": "uint8", 273 | "name": "", 274 | "type": "uint8" 275 | } 276 | ], 277 | "stateMutability": "view", 278 | "type": "function" 279 | }, 280 | { 281 | "inputs": [], 282 | "name": "name", 283 | "outputs": [ 284 | { 285 | "internalType": "string", 286 | "name": "", 287 | "type": "string" 288 | } 289 | ], 290 | "stateMutability": "view", 291 | "type": "function" 292 | }, 293 | { 294 | "inputs": [], 295 | "name": "symbol", 296 | "outputs": [ 297 | { 298 | "internalType": "string", 299 | "name": "", 300 | "type": "string" 301 | } 302 | ], 303 | "stateMutability": "view", 304 | "type": "function" 305 | }, 306 | { 307 | "inputs": [], 308 | "name": "totalSupply", 309 | "outputs": [ 310 | { 311 | "internalType": "uint256", 312 | "name": "", 313 | "type": "uint256" 314 | } 315 | ], 316 | "stateMutability": "view", 317 | "type": "function" 318 | }, 319 | { 320 | "inputs": [ 321 | { 322 | "internalType": "address", 323 | "name": "to", 324 | "type": "address" 325 | }, 326 | { 327 | "internalType": "uint256", 328 | "name": "value", 329 | "type": "uint256" 330 | } 331 | ], 332 | "name": "transfer", 333 | "outputs": [ 334 | { 335 | "internalType": "bool", 336 | "name": "", 337 | "type": "bool" 338 | } 339 | ], 340 | "stateMutability": "nonpayable", 341 | "type": "function" 342 | }, 343 | { 344 | "inputs": [ 345 | { 346 | "internalType": "address", 347 | "name": "from", 348 | "type": "address" 349 | }, 350 | { 351 | "internalType": "address", 352 | "name": "to", 353 | "type": "address" 354 | }, 355 | { 356 | "internalType": "uint256", 357 | "name": "value", 358 | "type": "uint256" 359 | } 360 | ], 361 | "name": "transferFrom", 362 | "outputs": [ 363 | { 364 | "internalType": "bool", 365 | "name": "", 366 | "type": "bool" 367 | } 368 | ], 369 | "stateMutability": "nonpayable", 370 | "type": "function" 371 | } 372 | ] 373 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/artifacts/ERC20_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "address", 12 | "name": "spender", 13 | "type": "address" 14 | }, 15 | { 16 | "internalType": "uint256", 17 | "name": "allowance", 18 | "type": "uint256" 19 | }, 20 | { 21 | "internalType": "uint256", 22 | "name": "needed", 23 | "type": "uint256" 24 | } 25 | ], 26 | "name": "ERC20InsufficientAllowance", 27 | "type": "error" 28 | }, 29 | { 30 | "inputs": [ 31 | { 32 | "internalType": "address", 33 | "name": "sender", 34 | "type": "address" 35 | }, 36 | { 37 | "internalType": "uint256", 38 | "name": "balance", 39 | "type": "uint256" 40 | }, 41 | { 42 | "internalType": "uint256", 43 | "name": "needed", 44 | "type": "uint256" 45 | } 46 | ], 47 | "name": "ERC20InsufficientBalance", 48 | "type": "error" 49 | }, 50 | { 51 | "inputs": [ 52 | { 53 | "internalType": "address", 54 | "name": "approver", 55 | "type": "address" 56 | } 57 | ], 58 | "name": "ERC20InvalidApprover", 59 | "type": "error" 60 | }, 61 | { 62 | "inputs": [ 63 | { 64 | "internalType": "address", 65 | "name": "receiver", 66 | "type": "address" 67 | } 68 | ], 69 | "name": "ERC20InvalidReceiver", 70 | "type": "error" 71 | }, 72 | { 73 | "inputs": [ 74 | { 75 | "internalType": "address", 76 | "name": "sender", 77 | "type": "address" 78 | } 79 | ], 80 | "name": "ERC20InvalidSender", 81 | "type": "error" 82 | }, 83 | { 84 | "inputs": [ 85 | { 86 | "internalType": "address", 87 | "name": "spender", 88 | "type": "address" 89 | } 90 | ], 91 | "name": "ERC20InvalidSpender", 92 | "type": "error" 93 | }, 94 | { 95 | "anonymous": false, 96 | "inputs": [ 97 | { 98 | "indexed": true, 99 | "internalType": "address", 100 | "name": "owner", 101 | "type": "address" 102 | }, 103 | { 104 | "indexed": true, 105 | "internalType": "address", 106 | "name": "spender", 107 | "type": "address" 108 | }, 109 | { 110 | "indexed": false, 111 | "internalType": "uint256", 112 | "name": "value", 113 | "type": "uint256" 114 | } 115 | ], 116 | "name": "Approval", 117 | "type": "event" 118 | }, 119 | { 120 | "anonymous": false, 121 | "inputs": [ 122 | { 123 | "indexed": true, 124 | "internalType": "address", 125 | "name": "from", 126 | "type": "address" 127 | }, 128 | { 129 | "indexed": true, 130 | "internalType": "address", 131 | "name": "to", 132 | "type": "address" 133 | }, 134 | { 135 | "indexed": false, 136 | "internalType": "uint256", 137 | "name": "value", 138 | "type": "uint256" 139 | } 140 | ], 141 | "name": "Transfer", 142 | "type": "event" 143 | }, 144 | { 145 | "inputs": [ 146 | { 147 | "internalType": "address", 148 | "name": "owner", 149 | "type": "address" 150 | }, 151 | { 152 | "internalType": "address", 153 | "name": "spender", 154 | "type": "address" 155 | } 156 | ], 157 | "name": "allowance", 158 | "outputs": [ 159 | { 160 | "internalType": "uint256", 161 | "name": "", 162 | "type": "uint256" 163 | } 164 | ], 165 | "stateMutability": "view", 166 | "type": "function" 167 | }, 168 | { 169 | "inputs": [ 170 | { 171 | "internalType": "address", 172 | "name": "spender", 173 | "type": "address" 174 | }, 175 | { 176 | "internalType": "uint256", 177 | "name": "value", 178 | "type": "uint256" 179 | } 180 | ], 181 | "name": "approve", 182 | "outputs": [ 183 | { 184 | "internalType": "bool", 185 | "name": "", 186 | "type": "bool" 187 | } 188 | ], 189 | "stateMutability": "nonpayable", 190 | "type": "function" 191 | }, 192 | { 193 | "inputs": [ 194 | { 195 | "internalType": "address", 196 | "name": "account", 197 | "type": "address" 198 | } 199 | ], 200 | "name": "balanceOf", 201 | "outputs": [ 202 | { 203 | "internalType": "uint256", 204 | "name": "", 205 | "type": "uint256" 206 | } 207 | ], 208 | "stateMutability": "view", 209 | "type": "function" 210 | }, 211 | { 212 | "inputs": [], 213 | "name": "decimals", 214 | "outputs": [ 215 | { 216 | "internalType": "uint8", 217 | "name": "", 218 | "type": "uint8" 219 | } 220 | ], 221 | "stateMutability": "view", 222 | "type": "function" 223 | }, 224 | { 225 | "inputs": [], 226 | "name": "name", 227 | "outputs": [ 228 | { 229 | "internalType": "string", 230 | "name": "", 231 | "type": "string" 232 | } 233 | ], 234 | "stateMutability": "view", 235 | "type": "function" 236 | }, 237 | { 238 | "inputs": [], 239 | "name": "symbol", 240 | "outputs": [ 241 | { 242 | "internalType": "string", 243 | "name": "", 244 | "type": "string" 245 | } 246 | ], 247 | "stateMutability": "view", 248 | "type": "function" 249 | }, 250 | { 251 | "inputs": [], 252 | "name": "totalSupply", 253 | "outputs": [ 254 | { 255 | "internalType": "uint256", 256 | "name": "", 257 | "type": "uint256" 258 | } 259 | ], 260 | "stateMutability": "view", 261 | "type": "function" 262 | }, 263 | { 264 | "inputs": [ 265 | { 266 | "internalType": "address", 267 | "name": "to", 268 | "type": "address" 269 | }, 270 | { 271 | "internalType": "uint256", 272 | "name": "value", 273 | "type": "uint256" 274 | } 275 | ], 276 | "name": "transfer", 277 | "outputs": [ 278 | { 279 | "internalType": "bool", 280 | "name": "", 281 | "type": "bool" 282 | } 283 | ], 284 | "stateMutability": "nonpayable", 285 | "type": "function" 286 | }, 287 | { 288 | "inputs": [ 289 | { 290 | "internalType": "address", 291 | "name": "from", 292 | "type": "address" 293 | }, 294 | { 295 | "internalType": "address", 296 | "name": "to", 297 | "type": "address" 298 | }, 299 | { 300 | "internalType": "uint256", 301 | "name": "value", 302 | "type": "uint256" 303 | } 304 | ], 305 | "name": "transferFrom", 306 | "outputs": [ 307 | { 308 | "internalType": "bool", 309 | "name": "", 310 | "type": "bool" 311 | } 312 | ], 313 | "stateMutability": "nonpayable", 314 | "type": "function" 315 | } 316 | ], 317 | "devdoc": { 318 | "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.", 319 | "errors": { 320 | "ERC20InsufficientAllowance(address,uint256,uint256)": [ 321 | { 322 | "details": "Indicates a failure with the `spender`’s `allowance`. Used in transfers.", 323 | "params": { 324 | "allowance": "Amount of tokens a `spender` is allowed to operate with.", 325 | "needed": "Minimum amount required to perform a transfer.", 326 | "spender": "Address that may be allowed to operate on tokens without being their owner." 327 | } 328 | } 329 | ], 330 | "ERC20InsufficientBalance(address,uint256,uint256)": [ 331 | { 332 | "details": "Indicates an error related to the current `balance` of a `sender`. Used in transfers.", 333 | "params": { 334 | "balance": "Current balance for the interacting account.", 335 | "needed": "Minimum amount required to perform a transfer.", 336 | "sender": "Address whose tokens are being transferred." 337 | } 338 | } 339 | ], 340 | "ERC20InvalidApprover(address)": [ 341 | { 342 | "details": "Indicates a failure with the `approver` of a token to be approved. Used in approvals.", 343 | "params": { 344 | "approver": "Address initiating an approval operation." 345 | } 346 | } 347 | ], 348 | "ERC20InvalidReceiver(address)": [ 349 | { 350 | "details": "Indicates a failure with the token `receiver`. Used in transfers.", 351 | "params": { 352 | "receiver": "Address to which tokens are being transferred." 353 | } 354 | } 355 | ], 356 | "ERC20InvalidSender(address)": [ 357 | { 358 | "details": "Indicates a failure with the token `sender`. Used in transfers.", 359 | "params": { 360 | "sender": "Address whose tokens are being transferred." 361 | } 362 | } 363 | ], 364 | "ERC20InvalidSpender(address)": [ 365 | { 366 | "details": "Indicates a failure with the `spender` to be approved. Used in approvals.", 367 | "params": { 368 | "spender": "Address that may be allowed to operate on tokens without being their owner." 369 | } 370 | } 371 | ] 372 | }, 373 | "events": { 374 | "Approval(address,address,uint256)": { 375 | "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." 376 | }, 377 | "Transfer(address,address,uint256)": { 378 | "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." 379 | } 380 | }, 381 | "kind": "dev", 382 | "methods": { 383 | "allowance(address,address)": { 384 | "details": "See {IERC20-allowance}." 385 | }, 386 | "approve(address,uint256)": { 387 | "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." 388 | }, 389 | "balanceOf(address)": { 390 | "details": "See {IERC20-balanceOf}." 391 | }, 392 | "constructor": { 393 | "details": "Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction." 394 | }, 395 | "decimals()": { 396 | "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." 397 | }, 398 | "name()": { 399 | "details": "Returns the name of the token." 400 | }, 401 | "symbol()": { 402 | "details": "Returns the symbol of the token, usually a shorter version of the name." 403 | }, 404 | "totalSupply()": { 405 | "details": "See {IERC20-totalSupply}." 406 | }, 407 | "transfer(address,uint256)": { 408 | "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`." 409 | }, 410 | "transferFrom(address,address,uint256)": { 411 | "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`." 412 | } 413 | }, 414 | "version": 1 415 | }, 416 | "userdoc": { 417 | "kind": "user", 418 | "methods": {}, 419 | "version": 1 420 | } 421 | }, 422 | "settings": { 423 | "compilationTarget": { 424 | ".deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol": "ERC20" 425 | }, 426 | "evmVersion": "cancun", 427 | "libraries": {}, 428 | "metadata": { 429 | "bytecodeHash": "ipfs" 430 | }, 431 | "optimizer": { 432 | "enabled": true, 433 | "runs": 200 434 | }, 435 | "remappings": [] 436 | }, 437 | "sources": { 438 | ".deps/npm/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { 439 | "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", 440 | "license": "MIT", 441 | "urls": [ 442 | "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", 443 | "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" 444 | ] 445 | }, 446 | ".deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol": { 447 | "keccak256": "0x25f171f3ce41d53a1186c9280e29a312524b79fe7dd6660c5d5f0473544a7799", 448 | "license": "MIT", 449 | "urls": [ 450 | "bzz-raw://efb6fc13f2961ad71c6b263e48582124b0c7430038ddf58b76fbebf2d19804a3", 451 | "dweb:/ipfs/QmQoYLHBFcVbYNiLYsbdSQYuS76vsR986hTdhy8EhfX1SX" 452 | ] 453 | }, 454 | ".deps/npm/@openzeppelin/contracts/token/ERC20/IERC20.sol": { 455 | "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", 456 | "license": "MIT", 457 | "urls": [ 458 | "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", 459 | "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" 460 | ] 461 | }, 462 | ".deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { 463 | "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", 464 | "license": "MIT", 465 | "urls": [ 466 | "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", 467 | "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" 468 | ] 469 | }, 470 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": { 471 | "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", 472 | "license": "MIT", 473 | "urls": [ 474 | "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", 475 | "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" 476 | ] 477 | } 478 | }, 479 | "version": 1 480 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/artifacts/IERC20.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": { 52 | "allowance(address,address)": "dd62ed3e", 53 | "approve(address,uint256)": "095ea7b3", 54 | "balanceOf(address)": "70a08231", 55 | "totalSupply()": "18160ddd", 56 | "transfer(address,uint256)": "a9059cbb", 57 | "transferFrom(address,address,uint256)": "23b872dd" 58 | } 59 | }, 60 | "abi": [ 61 | { 62 | "anonymous": false, 63 | "inputs": [ 64 | { 65 | "indexed": true, 66 | "internalType": "address", 67 | "name": "owner", 68 | "type": "address" 69 | }, 70 | { 71 | "indexed": true, 72 | "internalType": "address", 73 | "name": "spender", 74 | "type": "address" 75 | }, 76 | { 77 | "indexed": false, 78 | "internalType": "uint256", 79 | "name": "value", 80 | "type": "uint256" 81 | } 82 | ], 83 | "name": "Approval", 84 | "type": "event" 85 | }, 86 | { 87 | "anonymous": false, 88 | "inputs": [ 89 | { 90 | "indexed": true, 91 | "internalType": "address", 92 | "name": "from", 93 | "type": "address" 94 | }, 95 | { 96 | "indexed": true, 97 | "internalType": "address", 98 | "name": "to", 99 | "type": "address" 100 | }, 101 | { 102 | "indexed": false, 103 | "internalType": "uint256", 104 | "name": "value", 105 | "type": "uint256" 106 | } 107 | ], 108 | "name": "Transfer", 109 | "type": "event" 110 | }, 111 | { 112 | "inputs": [ 113 | { 114 | "internalType": "address", 115 | "name": "owner", 116 | "type": "address" 117 | }, 118 | { 119 | "internalType": "address", 120 | "name": "spender", 121 | "type": "address" 122 | } 123 | ], 124 | "name": "allowance", 125 | "outputs": [ 126 | { 127 | "internalType": "uint256", 128 | "name": "", 129 | "type": "uint256" 130 | } 131 | ], 132 | "stateMutability": "view", 133 | "type": "function" 134 | }, 135 | { 136 | "inputs": [ 137 | { 138 | "internalType": "address", 139 | "name": "spender", 140 | "type": "address" 141 | }, 142 | { 143 | "internalType": "uint256", 144 | "name": "value", 145 | "type": "uint256" 146 | } 147 | ], 148 | "name": "approve", 149 | "outputs": [ 150 | { 151 | "internalType": "bool", 152 | "name": "", 153 | "type": "bool" 154 | } 155 | ], 156 | "stateMutability": "nonpayable", 157 | "type": "function" 158 | }, 159 | { 160 | "inputs": [ 161 | { 162 | "internalType": "address", 163 | "name": "account", 164 | "type": "address" 165 | } 166 | ], 167 | "name": "balanceOf", 168 | "outputs": [ 169 | { 170 | "internalType": "uint256", 171 | "name": "", 172 | "type": "uint256" 173 | } 174 | ], 175 | "stateMutability": "view", 176 | "type": "function" 177 | }, 178 | { 179 | "inputs": [], 180 | "name": "totalSupply", 181 | "outputs": [ 182 | { 183 | "internalType": "uint256", 184 | "name": "", 185 | "type": "uint256" 186 | } 187 | ], 188 | "stateMutability": "view", 189 | "type": "function" 190 | }, 191 | { 192 | "inputs": [ 193 | { 194 | "internalType": "address", 195 | "name": "to", 196 | "type": "address" 197 | }, 198 | { 199 | "internalType": "uint256", 200 | "name": "value", 201 | "type": "uint256" 202 | } 203 | ], 204 | "name": "transfer", 205 | "outputs": [ 206 | { 207 | "internalType": "bool", 208 | "name": "", 209 | "type": "bool" 210 | } 211 | ], 212 | "stateMutability": "nonpayable", 213 | "type": "function" 214 | }, 215 | { 216 | "inputs": [ 217 | { 218 | "internalType": "address", 219 | "name": "from", 220 | "type": "address" 221 | }, 222 | { 223 | "internalType": "address", 224 | "name": "to", 225 | "type": "address" 226 | }, 227 | { 228 | "internalType": "uint256", 229 | "name": "value", 230 | "type": "uint256" 231 | } 232 | ], 233 | "name": "transferFrom", 234 | "outputs": [ 235 | { 236 | "internalType": "bool", 237 | "name": "", 238 | "type": "bool" 239 | } 240 | ], 241 | "stateMutability": "nonpayable", 242 | "type": "function" 243 | } 244 | ] 245 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/artifacts/IERC20_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "anonymous": false, 10 | "inputs": [ 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "owner", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "address", 20 | "name": "spender", 21 | "type": "address" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "uint256", 26 | "name": "value", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "Approval", 31 | "type": "event" 32 | }, 33 | { 34 | "anonymous": false, 35 | "inputs": [ 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "from", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "address", 45 | "name": "to", 46 | "type": "address" 47 | }, 48 | { 49 | "indexed": false, 50 | "internalType": "uint256", 51 | "name": "value", 52 | "type": "uint256" 53 | } 54 | ], 55 | "name": "Transfer", 56 | "type": "event" 57 | }, 58 | { 59 | "inputs": [ 60 | { 61 | "internalType": "address", 62 | "name": "owner", 63 | "type": "address" 64 | }, 65 | { 66 | "internalType": "address", 67 | "name": "spender", 68 | "type": "address" 69 | } 70 | ], 71 | "name": "allowance", 72 | "outputs": [ 73 | { 74 | "internalType": "uint256", 75 | "name": "", 76 | "type": "uint256" 77 | } 78 | ], 79 | "stateMutability": "view", 80 | "type": "function" 81 | }, 82 | { 83 | "inputs": [ 84 | { 85 | "internalType": "address", 86 | "name": "spender", 87 | "type": "address" 88 | }, 89 | { 90 | "internalType": "uint256", 91 | "name": "value", 92 | "type": "uint256" 93 | } 94 | ], 95 | "name": "approve", 96 | "outputs": [ 97 | { 98 | "internalType": "bool", 99 | "name": "", 100 | "type": "bool" 101 | } 102 | ], 103 | "stateMutability": "nonpayable", 104 | "type": "function" 105 | }, 106 | { 107 | "inputs": [ 108 | { 109 | "internalType": "address", 110 | "name": "account", 111 | "type": "address" 112 | } 113 | ], 114 | "name": "balanceOf", 115 | "outputs": [ 116 | { 117 | "internalType": "uint256", 118 | "name": "", 119 | "type": "uint256" 120 | } 121 | ], 122 | "stateMutability": "view", 123 | "type": "function" 124 | }, 125 | { 126 | "inputs": [], 127 | "name": "totalSupply", 128 | "outputs": [ 129 | { 130 | "internalType": "uint256", 131 | "name": "", 132 | "type": "uint256" 133 | } 134 | ], 135 | "stateMutability": "view", 136 | "type": "function" 137 | }, 138 | { 139 | "inputs": [ 140 | { 141 | "internalType": "address", 142 | "name": "to", 143 | "type": "address" 144 | }, 145 | { 146 | "internalType": "uint256", 147 | "name": "value", 148 | "type": "uint256" 149 | } 150 | ], 151 | "name": "transfer", 152 | "outputs": [ 153 | { 154 | "internalType": "bool", 155 | "name": "", 156 | "type": "bool" 157 | } 158 | ], 159 | "stateMutability": "nonpayable", 160 | "type": "function" 161 | }, 162 | { 163 | "inputs": [ 164 | { 165 | "internalType": "address", 166 | "name": "from", 167 | "type": "address" 168 | }, 169 | { 170 | "internalType": "address", 171 | "name": "to", 172 | "type": "address" 173 | }, 174 | { 175 | "internalType": "uint256", 176 | "name": "value", 177 | "type": "uint256" 178 | } 179 | ], 180 | "name": "transferFrom", 181 | "outputs": [ 182 | { 183 | "internalType": "bool", 184 | "name": "", 185 | "type": "bool" 186 | } 187 | ], 188 | "stateMutability": "nonpayable", 189 | "type": "function" 190 | } 191 | ], 192 | "devdoc": { 193 | "details": "Interface of the ERC20 standard as defined in the EIP.", 194 | "events": { 195 | "Approval(address,address,uint256)": { 196 | "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." 197 | }, 198 | "Transfer(address,address,uint256)": { 199 | "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." 200 | } 201 | }, 202 | "kind": "dev", 203 | "methods": { 204 | "allowance(address,address)": { 205 | "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." 206 | }, 207 | "approve(address,uint256)": { 208 | "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event." 209 | }, 210 | "balanceOf(address)": { 211 | "details": "Returns the value of tokens owned by `account`." 212 | }, 213 | "totalSupply()": { 214 | "details": "Returns the value of tokens in existence." 215 | }, 216 | "transfer(address,uint256)": { 217 | "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." 218 | }, 219 | "transferFrom(address,address,uint256)": { 220 | "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." 221 | } 222 | }, 223 | "version": 1 224 | }, 225 | "userdoc": { 226 | "kind": "user", 227 | "methods": {}, 228 | "version": 1 229 | } 230 | }, 231 | "settings": { 232 | "compilationTarget": { 233 | ".deps/npm/@openzeppelin/contracts/token/ERC20/IERC20.sol": "IERC20" 234 | }, 235 | "evmVersion": "cancun", 236 | "libraries": {}, 237 | "metadata": { 238 | "bytecodeHash": "ipfs" 239 | }, 240 | "optimizer": { 241 | "enabled": true, 242 | "runs": 200 243 | }, 244 | "remappings": [] 245 | }, 246 | "sources": { 247 | ".deps/npm/@openzeppelin/contracts/token/ERC20/IERC20.sol": { 248 | "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", 249 | "license": "MIT", 250 | "urls": [ 251 | "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", 252 | "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" 253 | ] 254 | } 255 | }, 256 | "version": 1 257 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Permit} from "./IERC20Permit.sol"; 7 | import {ERC20} from "../ERC20.sol"; 8 | import {ECDSA} from "../../../utils/cryptography/ECDSA.sol"; 9 | import {EIP712} from "../../../utils/cryptography/EIP712.sol"; 10 | import {Nonces} from "../../../utils/Nonces.sol"; 11 | 12 | /** 13 | * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in 14 | * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. 15 | * 16 | * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by 17 | * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't 18 | * need to send a transaction, and thus is not required to hold Ether at all. 19 | */ 20 | abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { 21 | bytes32 private constant PERMIT_TYPEHASH = 22 | keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); 23 | 24 | /** 25 | * @dev Permit deadline has expired. 26 | */ 27 | error ERC2612ExpiredSignature(uint256 deadline); 28 | 29 | /** 30 | * @dev Mismatched signature. 31 | */ 32 | error ERC2612InvalidSigner(address signer, address owner); 33 | 34 | /** 35 | * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. 36 | * 37 | * It's a good idea to use the same `name` that is defined as the ERC20 token name. 38 | */ 39 | constructor(string memory name) EIP712(name, "1") {} 40 | 41 | /** 42 | * @inheritdoc IERC20Permit 43 | */ 44 | function permit( 45 | address owner, 46 | address spender, 47 | uint256 value, 48 | uint256 deadline, 49 | uint8 v, 50 | bytes32 r, 51 | bytes32 s 52 | ) public virtual { 53 | if (block.timestamp > deadline) { 54 | revert ERC2612ExpiredSignature(deadline); 55 | } 56 | 57 | bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); 58 | 59 | bytes32 hash = _hashTypedDataV4(structHash); 60 | 61 | address signer = ECDSA.recover(hash, v, r, s); 62 | if (signer != owner) { 63 | revert ERC2612InvalidSigner(signer, owner); 64 | } 65 | 66 | _approve(owner, spender, value); 67 | } 68 | 69 | /** 70 | * @inheritdoc IERC20Permit 71 | */ 72 | function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { 73 | return super.nonces(owner); 74 | } 75 | 76 | /** 77 | * @inheritdoc IERC20Permit 78 | */ 79 | // solhint-disable-next-line func-name-mixedcase 80 | function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { 81 | return _domainSeparatorV4(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20} from "../IERC20.sol"; 7 | 8 | /** 9 | * @dev Interface for the optional metadata functions from the ERC20 standard. 10 | */ 11 | interface IERC20Metadata is IERC20 { 12 | /** 13 | * @dev Returns the name of the token. 14 | */ 15 | function name() external view returns (string memory); 16 | 17 | /** 18 | * @dev Returns the symbol of the token. 19 | */ 20 | function symbol() external view returns (string memory); 21 | 22 | /** 23 | * @dev Returns the decimals places of the token. 24 | */ 25 | function decimals() external view returns (uint8); 26 | } 27 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in 8 | * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. 9 | * 10 | * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by 11 | * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't 12 | * need to send a transaction, and thus is not required to hold Ether at all. 13 | * 14 | * ==== Security Considerations 15 | * 16 | * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature 17 | * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be 18 | * considered as an intention to spend the allowance in any specific way. The second is that because permits have 19 | * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should 20 | * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be 21 | * generally recommended is: 22 | * 23 | * ```solidity 24 | * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { 25 | * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} 26 | * doThing(..., value); 27 | * } 28 | * 29 | * function doThing(..., uint256 value) public { 30 | * token.safeTransferFrom(msg.sender, address(this), value); 31 | * ... 32 | * } 33 | * ``` 34 | * 35 | * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of 36 | * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also 37 | * {SafeERC20-safeTransferFrom}). 38 | * 39 | * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so 40 | * contracts should have entry points that don't rely on permit. 41 | */ 42 | interface IERC20Permit { 43 | /** 44 | * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, 45 | * given ``owner``'s signed approval. 46 | * 47 | * IMPORTANT: The same issues {IERC20-approve} has related to transaction 48 | * ordering also apply here. 49 | * 50 | * Emits an {Approval} event. 51 | * 52 | * Requirements: 53 | * 54 | * - `spender` cannot be the zero address. 55 | * - `deadline` must be a timestamp in the future. 56 | * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` 57 | * over the EIP712-formatted function arguments. 58 | * - the signature must use ``owner``'s current nonce (see {nonces}). 59 | * 60 | * For more information on the signature format, see the 61 | * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP 62 | * section]. 63 | * 64 | * CAUTION: See Security Considerations above. 65 | */ 66 | function permit( 67 | address owner, 68 | address spender, 69 | uint256 value, 70 | uint256 deadline, 71 | uint8 v, 72 | bytes32 r, 73 | bytes32 s 74 | ) external; 75 | 76 | /** 77 | * @dev Returns the current nonce for `owner`. This value must be 78 | * included whenever a signature is generated for {permit}. 79 | * 80 | * Every successful call to {permit} increases ``owner``'s nonce by one. This 81 | * prevents a signature from being used multiple times. 82 | */ 83 | function nonces(address owner) external view returns (uint256); 84 | 85 | /** 86 | * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. 87 | */ 88 | // solhint-disable-next-line func-name-mixedcase 89 | function DOMAIN_SEPARATOR() external view returns (bytes32); 90 | } 91 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/artifacts/IERC20Metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": { 52 | "allowance(address,address)": "dd62ed3e", 53 | "approve(address,uint256)": "095ea7b3", 54 | "balanceOf(address)": "70a08231", 55 | "decimals()": "313ce567", 56 | "name()": "06fdde03", 57 | "symbol()": "95d89b41", 58 | "totalSupply()": "18160ddd", 59 | "transfer(address,uint256)": "a9059cbb", 60 | "transferFrom(address,address,uint256)": "23b872dd" 61 | } 62 | }, 63 | "abi": [ 64 | { 65 | "anonymous": false, 66 | "inputs": [ 67 | { 68 | "indexed": true, 69 | "internalType": "address", 70 | "name": "owner", 71 | "type": "address" 72 | }, 73 | { 74 | "indexed": true, 75 | "internalType": "address", 76 | "name": "spender", 77 | "type": "address" 78 | }, 79 | { 80 | "indexed": false, 81 | "internalType": "uint256", 82 | "name": "value", 83 | "type": "uint256" 84 | } 85 | ], 86 | "name": "Approval", 87 | "type": "event" 88 | }, 89 | { 90 | "anonymous": false, 91 | "inputs": [ 92 | { 93 | "indexed": true, 94 | "internalType": "address", 95 | "name": "from", 96 | "type": "address" 97 | }, 98 | { 99 | "indexed": true, 100 | "internalType": "address", 101 | "name": "to", 102 | "type": "address" 103 | }, 104 | { 105 | "indexed": false, 106 | "internalType": "uint256", 107 | "name": "value", 108 | "type": "uint256" 109 | } 110 | ], 111 | "name": "Transfer", 112 | "type": "event" 113 | }, 114 | { 115 | "inputs": [ 116 | { 117 | "internalType": "address", 118 | "name": "owner", 119 | "type": "address" 120 | }, 121 | { 122 | "internalType": "address", 123 | "name": "spender", 124 | "type": "address" 125 | } 126 | ], 127 | "name": "allowance", 128 | "outputs": [ 129 | { 130 | "internalType": "uint256", 131 | "name": "", 132 | "type": "uint256" 133 | } 134 | ], 135 | "stateMutability": "view", 136 | "type": "function" 137 | }, 138 | { 139 | "inputs": [ 140 | { 141 | "internalType": "address", 142 | "name": "spender", 143 | "type": "address" 144 | }, 145 | { 146 | "internalType": "uint256", 147 | "name": "value", 148 | "type": "uint256" 149 | } 150 | ], 151 | "name": "approve", 152 | "outputs": [ 153 | { 154 | "internalType": "bool", 155 | "name": "", 156 | "type": "bool" 157 | } 158 | ], 159 | "stateMutability": "nonpayable", 160 | "type": "function" 161 | }, 162 | { 163 | "inputs": [ 164 | { 165 | "internalType": "address", 166 | "name": "account", 167 | "type": "address" 168 | } 169 | ], 170 | "name": "balanceOf", 171 | "outputs": [ 172 | { 173 | "internalType": "uint256", 174 | "name": "", 175 | "type": "uint256" 176 | } 177 | ], 178 | "stateMutability": "view", 179 | "type": "function" 180 | }, 181 | { 182 | "inputs": [], 183 | "name": "decimals", 184 | "outputs": [ 185 | { 186 | "internalType": "uint8", 187 | "name": "", 188 | "type": "uint8" 189 | } 190 | ], 191 | "stateMutability": "view", 192 | "type": "function" 193 | }, 194 | { 195 | "inputs": [], 196 | "name": "name", 197 | "outputs": [ 198 | { 199 | "internalType": "string", 200 | "name": "", 201 | "type": "string" 202 | } 203 | ], 204 | "stateMutability": "view", 205 | "type": "function" 206 | }, 207 | { 208 | "inputs": [], 209 | "name": "symbol", 210 | "outputs": [ 211 | { 212 | "internalType": "string", 213 | "name": "", 214 | "type": "string" 215 | } 216 | ], 217 | "stateMutability": "view", 218 | "type": "function" 219 | }, 220 | { 221 | "inputs": [], 222 | "name": "totalSupply", 223 | "outputs": [ 224 | { 225 | "internalType": "uint256", 226 | "name": "", 227 | "type": "uint256" 228 | } 229 | ], 230 | "stateMutability": "view", 231 | "type": "function" 232 | }, 233 | { 234 | "inputs": [ 235 | { 236 | "internalType": "address", 237 | "name": "to", 238 | "type": "address" 239 | }, 240 | { 241 | "internalType": "uint256", 242 | "name": "value", 243 | "type": "uint256" 244 | } 245 | ], 246 | "name": "transfer", 247 | "outputs": [ 248 | { 249 | "internalType": "bool", 250 | "name": "", 251 | "type": "bool" 252 | } 253 | ], 254 | "stateMutability": "nonpayable", 255 | "type": "function" 256 | }, 257 | { 258 | "inputs": [ 259 | { 260 | "internalType": "address", 261 | "name": "from", 262 | "type": "address" 263 | }, 264 | { 265 | "internalType": "address", 266 | "name": "to", 267 | "type": "address" 268 | }, 269 | { 270 | "internalType": "uint256", 271 | "name": "value", 272 | "type": "uint256" 273 | } 274 | ], 275 | "name": "transferFrom", 276 | "outputs": [ 277 | { 278 | "internalType": "bool", 279 | "name": "", 280 | "type": "bool" 281 | } 282 | ], 283 | "stateMutability": "nonpayable", 284 | "type": "function" 285 | } 286 | ] 287 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/artifacts/IERC20Metadata_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "anonymous": false, 10 | "inputs": [ 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "owner", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "address", 20 | "name": "spender", 21 | "type": "address" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "uint256", 26 | "name": "value", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "Approval", 31 | "type": "event" 32 | }, 33 | { 34 | "anonymous": false, 35 | "inputs": [ 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "from", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "address", 45 | "name": "to", 46 | "type": "address" 47 | }, 48 | { 49 | "indexed": false, 50 | "internalType": "uint256", 51 | "name": "value", 52 | "type": "uint256" 53 | } 54 | ], 55 | "name": "Transfer", 56 | "type": "event" 57 | }, 58 | { 59 | "inputs": [ 60 | { 61 | "internalType": "address", 62 | "name": "owner", 63 | "type": "address" 64 | }, 65 | { 66 | "internalType": "address", 67 | "name": "spender", 68 | "type": "address" 69 | } 70 | ], 71 | "name": "allowance", 72 | "outputs": [ 73 | { 74 | "internalType": "uint256", 75 | "name": "", 76 | "type": "uint256" 77 | } 78 | ], 79 | "stateMutability": "view", 80 | "type": "function" 81 | }, 82 | { 83 | "inputs": [ 84 | { 85 | "internalType": "address", 86 | "name": "spender", 87 | "type": "address" 88 | }, 89 | { 90 | "internalType": "uint256", 91 | "name": "value", 92 | "type": "uint256" 93 | } 94 | ], 95 | "name": "approve", 96 | "outputs": [ 97 | { 98 | "internalType": "bool", 99 | "name": "", 100 | "type": "bool" 101 | } 102 | ], 103 | "stateMutability": "nonpayable", 104 | "type": "function" 105 | }, 106 | { 107 | "inputs": [ 108 | { 109 | "internalType": "address", 110 | "name": "account", 111 | "type": "address" 112 | } 113 | ], 114 | "name": "balanceOf", 115 | "outputs": [ 116 | { 117 | "internalType": "uint256", 118 | "name": "", 119 | "type": "uint256" 120 | } 121 | ], 122 | "stateMutability": "view", 123 | "type": "function" 124 | }, 125 | { 126 | "inputs": [], 127 | "name": "decimals", 128 | "outputs": [ 129 | { 130 | "internalType": "uint8", 131 | "name": "", 132 | "type": "uint8" 133 | } 134 | ], 135 | "stateMutability": "view", 136 | "type": "function" 137 | }, 138 | { 139 | "inputs": [], 140 | "name": "name", 141 | "outputs": [ 142 | { 143 | "internalType": "string", 144 | "name": "", 145 | "type": "string" 146 | } 147 | ], 148 | "stateMutability": "view", 149 | "type": "function" 150 | }, 151 | { 152 | "inputs": [], 153 | "name": "symbol", 154 | "outputs": [ 155 | { 156 | "internalType": "string", 157 | "name": "", 158 | "type": "string" 159 | } 160 | ], 161 | "stateMutability": "view", 162 | "type": "function" 163 | }, 164 | { 165 | "inputs": [], 166 | "name": "totalSupply", 167 | "outputs": [ 168 | { 169 | "internalType": "uint256", 170 | "name": "", 171 | "type": "uint256" 172 | } 173 | ], 174 | "stateMutability": "view", 175 | "type": "function" 176 | }, 177 | { 178 | "inputs": [ 179 | { 180 | "internalType": "address", 181 | "name": "to", 182 | "type": "address" 183 | }, 184 | { 185 | "internalType": "uint256", 186 | "name": "value", 187 | "type": "uint256" 188 | } 189 | ], 190 | "name": "transfer", 191 | "outputs": [ 192 | { 193 | "internalType": "bool", 194 | "name": "", 195 | "type": "bool" 196 | } 197 | ], 198 | "stateMutability": "nonpayable", 199 | "type": "function" 200 | }, 201 | { 202 | "inputs": [ 203 | { 204 | "internalType": "address", 205 | "name": "from", 206 | "type": "address" 207 | }, 208 | { 209 | "internalType": "address", 210 | "name": "to", 211 | "type": "address" 212 | }, 213 | { 214 | "internalType": "uint256", 215 | "name": "value", 216 | "type": "uint256" 217 | } 218 | ], 219 | "name": "transferFrom", 220 | "outputs": [ 221 | { 222 | "internalType": "bool", 223 | "name": "", 224 | "type": "bool" 225 | } 226 | ], 227 | "stateMutability": "nonpayable", 228 | "type": "function" 229 | } 230 | ], 231 | "devdoc": { 232 | "details": "Interface for the optional metadata functions from the ERC20 standard.", 233 | "events": { 234 | "Approval(address,address,uint256)": { 235 | "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." 236 | }, 237 | "Transfer(address,address,uint256)": { 238 | "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." 239 | } 240 | }, 241 | "kind": "dev", 242 | "methods": { 243 | "allowance(address,address)": { 244 | "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." 245 | }, 246 | "approve(address,uint256)": { 247 | "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event." 248 | }, 249 | "balanceOf(address)": { 250 | "details": "Returns the value of tokens owned by `account`." 251 | }, 252 | "decimals()": { 253 | "details": "Returns the decimals places of the token." 254 | }, 255 | "name()": { 256 | "details": "Returns the name of the token." 257 | }, 258 | "symbol()": { 259 | "details": "Returns the symbol of the token." 260 | }, 261 | "totalSupply()": { 262 | "details": "Returns the value of tokens in existence." 263 | }, 264 | "transfer(address,uint256)": { 265 | "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." 266 | }, 267 | "transferFrom(address,address,uint256)": { 268 | "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." 269 | } 270 | }, 271 | "version": 1 272 | }, 273 | "userdoc": { 274 | "kind": "user", 275 | "methods": {}, 276 | "version": 1 277 | } 278 | }, 279 | "settings": { 280 | "compilationTarget": { 281 | ".deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": "IERC20Metadata" 282 | }, 283 | "evmVersion": "cancun", 284 | "libraries": {}, 285 | "metadata": { 286 | "bytecodeHash": "ipfs" 287 | }, 288 | "optimizer": { 289 | "enabled": true, 290 | "runs": 200 291 | }, 292 | "remappings": [] 293 | }, 294 | "sources": { 295 | ".deps/npm/@openzeppelin/contracts/token/ERC20/IERC20.sol": { 296 | "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", 297 | "license": "MIT", 298 | "urls": [ 299 | "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", 300 | "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" 301 | ] 302 | }, 303 | ".deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { 304 | "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", 305 | "license": "MIT", 306 | "urls": [ 307 | "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", 308 | "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" 309 | ] 310 | } 311 | }, 312 | "version": 1 313 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/Context.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Provides information about the current execution context, including the 8 | * sender of the transaction and its data. While these are generally available 9 | * via msg.sender and msg.data, they should not be accessed in such a direct 10 | * manner, since when dealing with meta-transactions the account sending and 11 | * paying for execution may not be the actual sender (as far as an application 12 | * is concerned). 13 | * 14 | * This contract is only required for intermediate, library-like contracts. 15 | */ 16 | abstract contract Context { 17 | function _msgSender() internal view virtual returns (address) { 18 | return msg.sender; 19 | } 20 | 21 | function _msgData() internal view virtual returns (bytes calldata) { 22 | return msg.data; 23 | } 24 | 25 | function _contextSuffixLength() internal view virtual returns (uint256) { 26 | return 0; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/Nonces.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) 3 | pragma solidity ^0.8.20; 4 | 5 | /** 6 | * @dev Provides tracking nonces for addresses. Nonces will only increment. 7 | */ 8 | abstract contract Nonces { 9 | /** 10 | * @dev The nonce used for an `account` is not the expected current nonce. 11 | */ 12 | error InvalidAccountNonce(address account, uint256 currentNonce); 13 | 14 | mapping(address account => uint256) private _nonces; 15 | 16 | /** 17 | * @dev Returns the next unused nonce for an address. 18 | */ 19 | function nonces(address owner) public view virtual returns (uint256) { 20 | return _nonces[owner]; 21 | } 22 | 23 | /** 24 | * @dev Consumes a nonce. 25 | * 26 | * Returns the current value and increments nonce. 27 | */ 28 | function _useNonce(address owner) internal virtual returns (uint256) { 29 | // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be 30 | // decremented or reset. This guarantees that the nonce never overflows. 31 | unchecked { 32 | // It is important to do x++ and not ++x here. 33 | return _nonces[owner]++; 34 | } 35 | } 36 | 37 | /** 38 | * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. 39 | */ 40 | function _useCheckedNonce(address owner, uint256 nonce) internal virtual { 41 | uint256 current = _useNonce(owner); 42 | if (nonce != current) { 43 | revert InvalidAccountNonce(owner, current); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/ShortStrings.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {StorageSlot} from "./StorageSlot.sol"; 7 | 8 | // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | 9 | // | length | 0x BB | 10 | type ShortString is bytes32; 11 | 12 | /** 13 | * @dev This library provides functions to convert short memory strings 14 | * into a `ShortString` type that can be used as an immutable variable. 15 | * 16 | * Strings of arbitrary length can be optimized using this library if 17 | * they are short enough (up to 31 bytes) by packing them with their 18 | * length (1 byte) in a single EVM word (32 bytes). Additionally, a 19 | * fallback mechanism can be used for every other case. 20 | * 21 | * Usage example: 22 | * 23 | * ```solidity 24 | * contract Named { 25 | * using ShortStrings for *; 26 | * 27 | * ShortString private immutable _name; 28 | * string private _nameFallback; 29 | * 30 | * constructor(string memory contractName) { 31 | * _name = contractName.toShortStringWithFallback(_nameFallback); 32 | * } 33 | * 34 | * function name() external view returns (string memory) { 35 | * return _name.toStringWithFallback(_nameFallback); 36 | * } 37 | * } 38 | * ``` 39 | */ 40 | library ShortStrings { 41 | // Used as an identifier for strings longer than 31 bytes. 42 | bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; 43 | 44 | error StringTooLong(string str); 45 | error InvalidShortString(); 46 | 47 | /** 48 | * @dev Encode a string of at most 31 chars into a `ShortString`. 49 | * 50 | * This will trigger a `StringTooLong` error is the input string is too long. 51 | */ 52 | function toShortString(string memory str) internal pure returns (ShortString) { 53 | bytes memory bstr = bytes(str); 54 | if (bstr.length > 31) { 55 | revert StringTooLong(str); 56 | } 57 | return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); 58 | } 59 | 60 | /** 61 | * @dev Decode a `ShortString` back to a "normal" string. 62 | */ 63 | function toString(ShortString sstr) internal pure returns (string memory) { 64 | uint256 len = byteLength(sstr); 65 | // using `new string(len)` would work locally but is not memory safe. 66 | string memory str = new string(32); 67 | /// @solidity memory-safe-assembly 68 | assembly { 69 | mstore(str, len) 70 | mstore(add(str, 0x20), sstr) 71 | } 72 | return str; 73 | } 74 | 75 | /** 76 | * @dev Return the length of a `ShortString`. 77 | */ 78 | function byteLength(ShortString sstr) internal pure returns (uint256) { 79 | uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; 80 | if (result > 31) { 81 | revert InvalidShortString(); 82 | } 83 | return result; 84 | } 85 | 86 | /** 87 | * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. 88 | */ 89 | function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { 90 | if (bytes(value).length < 32) { 91 | return toShortString(value); 92 | } else { 93 | StorageSlot.getStringSlot(store).value = value; 94 | return ShortString.wrap(FALLBACK_SENTINEL); 95 | } 96 | } 97 | 98 | /** 99 | * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. 100 | */ 101 | function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { 102 | if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { 103 | return toString(value); 104 | } else { 105 | return store; 106 | } 107 | } 108 | 109 | /** 110 | * @dev Return the length of a string that was encoded to `ShortString` or written to storage using 111 | * {setWithFallback}. 112 | * 113 | * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of 114 | * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. 115 | */ 116 | function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { 117 | if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { 118 | return byteLength(value); 119 | } else { 120 | return bytes(store).length; 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/StorageSlot.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) 3 | // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. 4 | 5 | pragma solidity ^0.8.20; 6 | 7 | /** 8 | * @dev Library for reading and writing primitive types to specific storage slots. 9 | * 10 | * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. 11 | * This library helps with reading and writing to such slots without the need for inline assembly. 12 | * 13 | * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. 14 | * 15 | * Example usage to set ERC1967 implementation slot: 16 | * ```solidity 17 | * contract ERC1967 { 18 | * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; 19 | * 20 | * function _getImplementation() internal view returns (address) { 21 | * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; 22 | * } 23 | * 24 | * function _setImplementation(address newImplementation) internal { 25 | * require(newImplementation.code.length > 0); 26 | * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; 27 | * } 28 | * } 29 | * ``` 30 | */ 31 | library StorageSlot { 32 | struct AddressSlot { 33 | address value; 34 | } 35 | 36 | struct BooleanSlot { 37 | bool value; 38 | } 39 | 40 | struct Bytes32Slot { 41 | bytes32 value; 42 | } 43 | 44 | struct Uint256Slot { 45 | uint256 value; 46 | } 47 | 48 | struct StringSlot { 49 | string value; 50 | } 51 | 52 | struct BytesSlot { 53 | bytes value; 54 | } 55 | 56 | /** 57 | * @dev Returns an `AddressSlot` with member `value` located at `slot`. 58 | */ 59 | function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { 60 | /// @solidity memory-safe-assembly 61 | assembly { 62 | r.slot := slot 63 | } 64 | } 65 | 66 | /** 67 | * @dev Returns an `BooleanSlot` with member `value` located at `slot`. 68 | */ 69 | function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { 70 | /// @solidity memory-safe-assembly 71 | assembly { 72 | r.slot := slot 73 | } 74 | } 75 | 76 | /** 77 | * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. 78 | */ 79 | function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { 80 | /// @solidity memory-safe-assembly 81 | assembly { 82 | r.slot := slot 83 | } 84 | } 85 | 86 | /** 87 | * @dev Returns an `Uint256Slot` with member `value` located at `slot`. 88 | */ 89 | function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { 90 | /// @solidity memory-safe-assembly 91 | assembly { 92 | r.slot := slot 93 | } 94 | } 95 | 96 | /** 97 | * @dev Returns an `StringSlot` with member `value` located at `slot`. 98 | */ 99 | function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { 100 | /// @solidity memory-safe-assembly 101 | assembly { 102 | r.slot := slot 103 | } 104 | } 105 | 106 | /** 107 | * @dev Returns an `StringSlot` representation of the string storage pointer `store`. 108 | */ 109 | function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { 110 | /// @solidity memory-safe-assembly 111 | assembly { 112 | r.slot := store.slot 113 | } 114 | } 115 | 116 | /** 117 | * @dev Returns an `BytesSlot` with member `value` located at `slot`. 118 | */ 119 | function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { 120 | /// @solidity memory-safe-assembly 121 | assembly { 122 | r.slot := slot 123 | } 124 | } 125 | 126 | /** 127 | * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. 128 | */ 129 | function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { 130 | /// @solidity memory-safe-assembly 131 | assembly { 132 | r.slot := store.slot 133 | } 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/Strings.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {Math} from "./math/Math.sol"; 7 | import {SignedMath} from "./math/SignedMath.sol"; 8 | 9 | /** 10 | * @dev String operations. 11 | */ 12 | library Strings { 13 | bytes16 private constant HEX_DIGITS = "0123456789abcdef"; 14 | uint8 private constant ADDRESS_LENGTH = 20; 15 | 16 | /** 17 | * @dev The `value` string doesn't fit in the specified `length`. 18 | */ 19 | error StringsInsufficientHexLength(uint256 value, uint256 length); 20 | 21 | /** 22 | * @dev Converts a `uint256` to its ASCII `string` decimal representation. 23 | */ 24 | function toString(uint256 value) internal pure returns (string memory) { 25 | unchecked { 26 | uint256 length = Math.log10(value) + 1; 27 | string memory buffer = new string(length); 28 | uint256 ptr; 29 | /// @solidity memory-safe-assembly 30 | assembly { 31 | ptr := add(buffer, add(32, length)) 32 | } 33 | while (true) { 34 | ptr--; 35 | /// @solidity memory-safe-assembly 36 | assembly { 37 | mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) 38 | } 39 | value /= 10; 40 | if (value == 0) break; 41 | } 42 | return buffer; 43 | } 44 | } 45 | 46 | /** 47 | * @dev Converts a `int256` to its ASCII `string` decimal representation. 48 | */ 49 | function toStringSigned(int256 value) internal pure returns (string memory) { 50 | return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); 51 | } 52 | 53 | /** 54 | * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. 55 | */ 56 | function toHexString(uint256 value) internal pure returns (string memory) { 57 | unchecked { 58 | return toHexString(value, Math.log256(value) + 1); 59 | } 60 | } 61 | 62 | /** 63 | * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. 64 | */ 65 | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { 66 | uint256 localValue = value; 67 | bytes memory buffer = new bytes(2 * length + 2); 68 | buffer[0] = "0"; 69 | buffer[1] = "x"; 70 | for (uint256 i = 2 * length + 1; i > 1; --i) { 71 | buffer[i] = HEX_DIGITS[localValue & 0xf]; 72 | localValue >>= 4; 73 | } 74 | if (localValue != 0) { 75 | revert StringsInsufficientHexLength(value, length); 76 | } 77 | return string(buffer); 78 | } 79 | 80 | /** 81 | * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal 82 | * representation. 83 | */ 84 | function toHexString(address addr) internal pure returns (string memory) { 85 | return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); 86 | } 87 | 88 | /** 89 | * @dev Returns true if the two strings are equal. 90 | */ 91 | function equal(string memory a, string memory b) internal pure returns (bool) { 92 | return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/artifacts/Context.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": {} 52 | }, 53 | "abi": [] 54 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/artifacts/Context_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [], 8 | "devdoc": { 9 | "details": "Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.", 10 | "kind": "dev", 11 | "methods": {}, 12 | "version": 1 13 | }, 14 | "userdoc": { 15 | "kind": "user", 16 | "methods": {}, 17 | "version": 1 18 | } 19 | }, 20 | "settings": { 21 | "compilationTarget": { 22 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": "Context" 23 | }, 24 | "evmVersion": "cancun", 25 | "libraries": {}, 26 | "metadata": { 27 | "bytecodeHash": "ipfs" 28 | }, 29 | "optimizer": { 30 | "enabled": true, 31 | "runs": 200 32 | }, 33 | "remappings": [] 34 | }, 35 | "sources": { 36 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": { 37 | "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", 38 | "license": "MIT", 39 | "urls": [ 40 | "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", 41 | "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" 42 | ] 43 | } 44 | }, 45 | "version": 1 46 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/artifacts/build-info/fbaeb5e28d1e77b930eededfb49468c9.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "fbaeb5e28d1e77b930eededfb49468c9", 3 | "_format": "hh-sol-build-info-1", 4 | "solcVersion": "0.8.26", 5 | "solcLongVersion": "0.8.26+commit.8a97fa7a", 6 | "input": { 7 | "language": "Solidity", 8 | "sources": { 9 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": { 10 | "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" 11 | } 12 | }, 13 | "settings": { 14 | "optimizer": { 15 | "enabled": true, 16 | "runs": 200 17 | }, 18 | "outputSelection": { 19 | "*": { 20 | "": [ 21 | "ast" 22 | ], 23 | "*": [ 24 | "abi", 25 | "metadata", 26 | "devdoc", 27 | "userdoc", 28 | "storageLayout", 29 | "evm.legacyAssembly", 30 | "evm.bytecode", 31 | "evm.deployedBytecode", 32 | "evm.methodIdentifiers", 33 | "evm.gasEstimates", 34 | "evm.assembly" 35 | ] 36 | } 37 | }, 38 | "remappings": [] 39 | } 40 | }, 41 | "output": { 42 | "contracts": { 43 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": { 44 | "Context": { 45 | "abi": [], 46 | "devdoc": { 47 | "details": "Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.", 48 | "kind": "dev", 49 | "methods": {}, 50 | "version": 1 51 | }, 52 | "evm": { 53 | "assembly": "", 54 | "bytecode": { 55 | "functionDebugData": {}, 56 | "generatedSources": [], 57 | "linkReferences": {}, 58 | "object": "", 59 | "opcodes": "", 60 | "sourceMap": "" 61 | }, 62 | "deployedBytecode": { 63 | "functionDebugData": {}, 64 | "generatedSources": [], 65 | "immutableReferences": {}, 66 | "linkReferences": {}, 67 | "object": "", 68 | "opcodes": "", 69 | "sourceMap": "" 70 | }, 71 | "gasEstimates": null, 72 | "legacyAssembly": null, 73 | "methodIdentifiers": {} 74 | }, 75 | "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}", 76 | "storageLayout": { 77 | "storage": [], 78 | "types": null 79 | }, 80 | "userdoc": { 81 | "kind": "user", 82 | "methods": {}, 83 | "version": 1 84 | } 85 | } 86 | } 87 | }, 88 | "sources": { 89 | ".deps/npm/@openzeppelin/contracts/utils/Context.sol": { 90 | "ast": { 91 | "absolutePath": ".deps/npm/@openzeppelin/contracts/utils/Context.sol", 92 | "exportedSymbols": { 93 | "Context": [ 94 | 29 95 | ] 96 | }, 97 | "id": 30, 98 | "license": "MIT", 99 | "nodeType": "SourceUnit", 100 | "nodes": [ 101 | { 102 | "id": 1, 103 | "literals": [ 104 | "solidity", 105 | "^", 106 | "0.8", 107 | ".20" 108 | ], 109 | "nodeType": "PragmaDirective", 110 | "src": "101:24:0" 111 | }, 112 | { 113 | "abstract": true, 114 | "baseContracts": [], 115 | "canonicalName": "Context", 116 | "contractDependencies": [], 117 | "contractKind": "contract", 118 | "documentation": { 119 | "id": 2, 120 | "nodeType": "StructuredDocumentation", 121 | "src": "127:496:0", 122 | "text": " @dev Provides information about the current execution context, including the\n sender of the transaction and its data. While these are generally available\n via msg.sender and msg.data, they should not be accessed in such a direct\n manner, since when dealing with meta-transactions the account sending and\n paying for execution may not be the actual sender (as far as an application\n is concerned).\n This contract is only required for intermediate, library-like contracts." 123 | }, 124 | "fullyImplemented": true, 125 | "id": 29, 126 | "linearizedBaseContracts": [ 127 | 29 128 | ], 129 | "name": "Context", 130 | "nameLocation": "642:7:0", 131 | "nodeType": "ContractDefinition", 132 | "nodes": [ 133 | { 134 | "body": { 135 | "id": 10, 136 | "nodeType": "Block", 137 | "src": "718:34:0", 138 | "statements": [ 139 | { 140 | "expression": { 141 | "expression": { 142 | "id": 7, 143 | "name": "msg", 144 | "nodeType": "Identifier", 145 | "overloadedDeclarations": [], 146 | "referencedDeclaration": 4294967281, 147 | "src": "735:3:0", 148 | "typeDescriptions": { 149 | "typeIdentifier": "t_magic_message", 150 | "typeString": "msg" 151 | } 152 | }, 153 | "id": 8, 154 | "isConstant": false, 155 | "isLValue": false, 156 | "isPure": false, 157 | "lValueRequested": false, 158 | "memberLocation": "739:6:0", 159 | "memberName": "sender", 160 | "nodeType": "MemberAccess", 161 | "src": "735:10:0", 162 | "typeDescriptions": { 163 | "typeIdentifier": "t_address", 164 | "typeString": "address" 165 | } 166 | }, 167 | "functionReturnParameters": 6, 168 | "id": 9, 169 | "nodeType": "Return", 170 | "src": "728:17:0" 171 | } 172 | ] 173 | }, 174 | "id": 11, 175 | "implemented": true, 176 | "kind": "function", 177 | "modifiers": [], 178 | "name": "_msgSender", 179 | "nameLocation": "665:10:0", 180 | "nodeType": "FunctionDefinition", 181 | "parameters": { 182 | "id": 3, 183 | "nodeType": "ParameterList", 184 | "parameters": [], 185 | "src": "675:2:0" 186 | }, 187 | "returnParameters": { 188 | "id": 6, 189 | "nodeType": "ParameterList", 190 | "parameters": [ 191 | { 192 | "constant": false, 193 | "id": 5, 194 | "mutability": "mutable", 195 | "name": "", 196 | "nameLocation": "-1:-1:-1", 197 | "nodeType": "VariableDeclaration", 198 | "scope": 11, 199 | "src": "709:7:0", 200 | "stateVariable": false, 201 | "storageLocation": "default", 202 | "typeDescriptions": { 203 | "typeIdentifier": "t_address", 204 | "typeString": "address" 205 | }, 206 | "typeName": { 207 | "id": 4, 208 | "name": "address", 209 | "nodeType": "ElementaryTypeName", 210 | "src": "709:7:0", 211 | "stateMutability": "nonpayable", 212 | "typeDescriptions": { 213 | "typeIdentifier": "t_address", 214 | "typeString": "address" 215 | } 216 | }, 217 | "visibility": "internal" 218 | } 219 | ], 220 | "src": "708:9:0" 221 | }, 222 | "scope": 29, 223 | "src": "656:96:0", 224 | "stateMutability": "view", 225 | "virtual": true, 226 | "visibility": "internal" 227 | }, 228 | { 229 | "body": { 230 | "id": 19, 231 | "nodeType": "Block", 232 | "src": "825:32:0", 233 | "statements": [ 234 | { 235 | "expression": { 236 | "expression": { 237 | "id": 16, 238 | "name": "msg", 239 | "nodeType": "Identifier", 240 | "overloadedDeclarations": [], 241 | "referencedDeclaration": 4294967281, 242 | "src": "842:3:0", 243 | "typeDescriptions": { 244 | "typeIdentifier": "t_magic_message", 245 | "typeString": "msg" 246 | } 247 | }, 248 | "id": 17, 249 | "isConstant": false, 250 | "isLValue": false, 251 | "isPure": false, 252 | "lValueRequested": false, 253 | "memberLocation": "846:4:0", 254 | "memberName": "data", 255 | "nodeType": "MemberAccess", 256 | "src": "842:8:0", 257 | "typeDescriptions": { 258 | "typeIdentifier": "t_bytes_calldata_ptr", 259 | "typeString": "bytes calldata" 260 | } 261 | }, 262 | "functionReturnParameters": 15, 263 | "id": 18, 264 | "nodeType": "Return", 265 | "src": "835:15:0" 266 | } 267 | ] 268 | }, 269 | "id": 20, 270 | "implemented": true, 271 | "kind": "function", 272 | "modifiers": [], 273 | "name": "_msgData", 274 | "nameLocation": "767:8:0", 275 | "nodeType": "FunctionDefinition", 276 | "parameters": { 277 | "id": 12, 278 | "nodeType": "ParameterList", 279 | "parameters": [], 280 | "src": "775:2:0" 281 | }, 282 | "returnParameters": { 283 | "id": 15, 284 | "nodeType": "ParameterList", 285 | "parameters": [ 286 | { 287 | "constant": false, 288 | "id": 14, 289 | "mutability": "mutable", 290 | "name": "", 291 | "nameLocation": "-1:-1:-1", 292 | "nodeType": "VariableDeclaration", 293 | "scope": 20, 294 | "src": "809:14:0", 295 | "stateVariable": false, 296 | "storageLocation": "calldata", 297 | "typeDescriptions": { 298 | "typeIdentifier": "t_bytes_calldata_ptr", 299 | "typeString": "bytes" 300 | }, 301 | "typeName": { 302 | "id": 13, 303 | "name": "bytes", 304 | "nodeType": "ElementaryTypeName", 305 | "src": "809:5:0", 306 | "typeDescriptions": { 307 | "typeIdentifier": "t_bytes_storage_ptr", 308 | "typeString": "bytes" 309 | } 310 | }, 311 | "visibility": "internal" 312 | } 313 | ], 314 | "src": "808:16:0" 315 | }, 316 | "scope": 29, 317 | "src": "758:99:0", 318 | "stateMutability": "view", 319 | "virtual": true, 320 | "visibility": "internal" 321 | }, 322 | { 323 | "body": { 324 | "id": 27, 325 | "nodeType": "Block", 326 | "src": "935:25:0", 327 | "statements": [ 328 | { 329 | "expression": { 330 | "hexValue": "30", 331 | "id": 25, 332 | "isConstant": false, 333 | "isLValue": false, 334 | "isPure": true, 335 | "kind": "number", 336 | "lValueRequested": false, 337 | "nodeType": "Literal", 338 | "src": "952:1:0", 339 | "typeDescriptions": { 340 | "typeIdentifier": "t_rational_0_by_1", 341 | "typeString": "int_const 0" 342 | }, 343 | "value": "0" 344 | }, 345 | "functionReturnParameters": 24, 346 | "id": 26, 347 | "nodeType": "Return", 348 | "src": "945:8:0" 349 | } 350 | ] 351 | }, 352 | "id": 28, 353 | "implemented": true, 354 | "kind": "function", 355 | "modifiers": [], 356 | "name": "_contextSuffixLength", 357 | "nameLocation": "872:20:0", 358 | "nodeType": "FunctionDefinition", 359 | "parameters": { 360 | "id": 21, 361 | "nodeType": "ParameterList", 362 | "parameters": [], 363 | "src": "892:2:0" 364 | }, 365 | "returnParameters": { 366 | "id": 24, 367 | "nodeType": "ParameterList", 368 | "parameters": [ 369 | { 370 | "constant": false, 371 | "id": 23, 372 | "mutability": "mutable", 373 | "name": "", 374 | "nameLocation": "-1:-1:-1", 375 | "nodeType": "VariableDeclaration", 376 | "scope": 28, 377 | "src": "926:7:0", 378 | "stateVariable": false, 379 | "storageLocation": "default", 380 | "typeDescriptions": { 381 | "typeIdentifier": "t_uint256", 382 | "typeString": "uint256" 383 | }, 384 | "typeName": { 385 | "id": 22, 386 | "name": "uint256", 387 | "nodeType": "ElementaryTypeName", 388 | "src": "926:7:0", 389 | "typeDescriptions": { 390 | "typeIdentifier": "t_uint256", 391 | "typeString": "uint256" 392 | } 393 | }, 394 | "visibility": "internal" 395 | } 396 | ], 397 | "src": "925:9:0" 398 | }, 399 | "scope": 29, 400 | "src": "863:97:0", 401 | "stateMutability": "view", 402 | "virtual": true, 403 | "visibility": "internal" 404 | } 405 | ], 406 | "scope": 30, 407 | "src": "624:338:0", 408 | "usedErrors": [], 409 | "usedEvents": [] 410 | } 411 | ], 412 | "src": "101:862:0" 413 | }, 414 | "id": 0 415 | } 416 | } 417 | } 418 | } -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/cryptography/ECDSA.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. 8 | * 9 | * These functions can be used to verify that a message was signed by the holder 10 | * of the private keys of a given address. 11 | */ 12 | library ECDSA { 13 | enum RecoverError { 14 | NoError, 15 | InvalidSignature, 16 | InvalidSignatureLength, 17 | InvalidSignatureS 18 | } 19 | 20 | /** 21 | * @dev The signature derives the `address(0)`. 22 | */ 23 | error ECDSAInvalidSignature(); 24 | 25 | /** 26 | * @dev The signature has an invalid length. 27 | */ 28 | error ECDSAInvalidSignatureLength(uint256 length); 29 | 30 | /** 31 | * @dev The signature has an S value that is in the upper half order. 32 | */ 33 | error ECDSAInvalidSignatureS(bytes32 s); 34 | 35 | /** 36 | * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not 37 | * return address(0) without also returning an error description. Errors are documented using an enum (error type) 38 | * and a bytes32 providing additional information about the error. 39 | * 40 | * If no error is returned, then the address can be used for verification purposes. 41 | * 42 | * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: 43 | * this function rejects them by requiring the `s` value to be in the lower 44 | * half order, and the `v` value to be either 27 or 28. 45 | * 46 | * IMPORTANT: `hash` _must_ be the result of a hash operation for the 47 | * verification to be secure: it is possible to craft signatures that 48 | * recover to arbitrary addresses for non-hashed data. A safe way to ensure 49 | * this is by receiving a hash of the original message (which may otherwise 50 | * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. 51 | * 52 | * Documentation for signature generation: 53 | * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] 54 | * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] 55 | */ 56 | function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { 57 | if (signature.length == 65) { 58 | bytes32 r; 59 | bytes32 s; 60 | uint8 v; 61 | // ecrecover takes the signature parameters, and the only way to get them 62 | // currently is to use assembly. 63 | /// @solidity memory-safe-assembly 64 | assembly { 65 | r := mload(add(signature, 0x20)) 66 | s := mload(add(signature, 0x40)) 67 | v := byte(0, mload(add(signature, 0x60))) 68 | } 69 | return tryRecover(hash, v, r, s); 70 | } else { 71 | return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); 72 | } 73 | } 74 | 75 | /** 76 | * @dev Returns the address that signed a hashed message (`hash`) with 77 | * `signature`. This address can then be used for verification purposes. 78 | * 79 | * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: 80 | * this function rejects them by requiring the `s` value to be in the lower 81 | * half order, and the `v` value to be either 27 or 28. 82 | * 83 | * IMPORTANT: `hash` _must_ be the result of a hash operation for the 84 | * verification to be secure: it is possible to craft signatures that 85 | * recover to arbitrary addresses for non-hashed data. A safe way to ensure 86 | * this is by receiving a hash of the original message (which may otherwise 87 | * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. 88 | */ 89 | function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { 90 | (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); 91 | _throwError(error, errorArg); 92 | return recovered; 93 | } 94 | 95 | /** 96 | * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. 97 | * 98 | * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] 99 | */ 100 | function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { 101 | unchecked { 102 | bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); 103 | // We do not check for an overflow here since the shift operation results in 0 or 1. 104 | uint8 v = uint8((uint256(vs) >> 255) + 27); 105 | return tryRecover(hash, v, r, s); 106 | } 107 | } 108 | 109 | /** 110 | * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. 111 | */ 112 | function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { 113 | (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); 114 | _throwError(error, errorArg); 115 | return recovered; 116 | } 117 | 118 | /** 119 | * @dev Overload of {ECDSA-tryRecover} that receives the `v`, 120 | * `r` and `s` signature fields separately. 121 | */ 122 | function tryRecover( 123 | bytes32 hash, 124 | uint8 v, 125 | bytes32 r, 126 | bytes32 s 127 | ) internal pure returns (address, RecoverError, bytes32) { 128 | // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature 129 | // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines 130 | // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most 131 | // signatures from current libraries generate a unique signature with an s-value in the lower half order. 132 | // 133 | // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value 134 | // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or 135 | // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept 136 | // these malleable signatures as well. 137 | if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { 138 | return (address(0), RecoverError.InvalidSignatureS, s); 139 | } 140 | 141 | // If the signature is valid (and not malleable), return the signer address 142 | address signer = ecrecover(hash, v, r, s); 143 | if (signer == address(0)) { 144 | return (address(0), RecoverError.InvalidSignature, bytes32(0)); 145 | } 146 | 147 | return (signer, RecoverError.NoError, bytes32(0)); 148 | } 149 | 150 | /** 151 | * @dev Overload of {ECDSA-recover} that receives the `v`, 152 | * `r` and `s` signature fields separately. 153 | */ 154 | function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { 155 | (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); 156 | _throwError(error, errorArg); 157 | return recovered; 158 | } 159 | 160 | /** 161 | * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. 162 | */ 163 | function _throwError(RecoverError error, bytes32 errorArg) private pure { 164 | if (error == RecoverError.NoError) { 165 | return; // no error: do nothing 166 | } else if (error == RecoverError.InvalidSignature) { 167 | revert ECDSAInvalidSignature(); 168 | } else if (error == RecoverError.InvalidSignatureLength) { 169 | revert ECDSAInvalidSignatureLength(uint256(errorArg)); 170 | } else if (error == RecoverError.InvalidSignatureS) { 171 | revert ECDSAInvalidSignatureS(errorArg); 172 | } 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/cryptography/EIP712.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {MessageHashUtils} from "./MessageHashUtils.sol"; 7 | import {ShortStrings, ShortString} from "../ShortStrings.sol"; 8 | import {IERC5267} from "../../interfaces/IERC5267.sol"; 9 | 10 | /** 11 | * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. 12 | * 13 | * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose 14 | * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract 15 | * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to 16 | * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. 17 | * 18 | * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding 19 | * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA 20 | * ({_hashTypedDataV4}). 21 | * 22 | * The implementation of the domain separator was designed to be as efficient as possible while still properly updating 23 | * the chain id to protect against replay attacks on an eventual fork of the chain. 24 | * 25 | * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method 26 | * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. 27 | * 28 | * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain 29 | * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the 30 | * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. 31 | * 32 | * @custom:oz-upgrades-unsafe-allow state-variable-immutable 33 | */ 34 | abstract contract EIP712 is IERC5267 { 35 | using ShortStrings for *; 36 | 37 | bytes32 private constant TYPE_HASH = 38 | keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); 39 | 40 | // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to 41 | // invalidate the cached domain separator if the chain id changes. 42 | bytes32 private immutable _cachedDomainSeparator; 43 | uint256 private immutable _cachedChainId; 44 | address private immutable _cachedThis; 45 | 46 | bytes32 private immutable _hashedName; 47 | bytes32 private immutable _hashedVersion; 48 | 49 | ShortString private immutable _name; 50 | ShortString private immutable _version; 51 | string private _nameFallback; 52 | string private _versionFallback; 53 | 54 | /** 55 | * @dev Initializes the domain separator and parameter caches. 56 | * 57 | * The meaning of `name` and `version` is specified in 58 | * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: 59 | * 60 | * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. 61 | * - `version`: the current major version of the signing domain. 62 | * 63 | * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart 64 | * contract upgrade]. 65 | */ 66 | constructor(string memory name, string memory version) { 67 | _name = name.toShortStringWithFallback(_nameFallback); 68 | _version = version.toShortStringWithFallback(_versionFallback); 69 | _hashedName = keccak256(bytes(name)); 70 | _hashedVersion = keccak256(bytes(version)); 71 | 72 | _cachedChainId = block.chainid; 73 | _cachedDomainSeparator = _buildDomainSeparator(); 74 | _cachedThis = address(this); 75 | } 76 | 77 | /** 78 | * @dev Returns the domain separator for the current chain. 79 | */ 80 | function _domainSeparatorV4() internal view returns (bytes32) { 81 | if (address(this) == _cachedThis && block.chainid == _cachedChainId) { 82 | return _cachedDomainSeparator; 83 | } else { 84 | return _buildDomainSeparator(); 85 | } 86 | } 87 | 88 | function _buildDomainSeparator() private view returns (bytes32) { 89 | return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); 90 | } 91 | 92 | /** 93 | * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this 94 | * function returns the hash of the fully encoded EIP712 message for this domain. 95 | * 96 | * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: 97 | * 98 | * ```solidity 99 | * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( 100 | * keccak256("Mail(address to,string contents)"), 101 | * mailTo, 102 | * keccak256(bytes(mailContents)) 103 | * ))); 104 | * address signer = ECDSA.recover(digest, signature); 105 | * ``` 106 | */ 107 | function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { 108 | return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); 109 | } 110 | 111 | /** 112 | * @dev See {IERC-5267}. 113 | */ 114 | function eip712Domain() 115 | public 116 | view 117 | virtual 118 | returns ( 119 | bytes1 fields, 120 | string memory name, 121 | string memory version, 122 | uint256 chainId, 123 | address verifyingContract, 124 | bytes32 salt, 125 | uint256[] memory extensions 126 | ) 127 | { 128 | return ( 129 | hex"0f", // 01111 130 | _EIP712Name(), 131 | _EIP712Version(), 132 | block.chainid, 133 | address(this), 134 | bytes32(0), 135 | new uint256[](0) 136 | ); 137 | } 138 | 139 | /** 140 | * @dev The name parameter for the EIP712 domain. 141 | * 142 | * NOTE: By default this function reads _name which is an immutable value. 143 | * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). 144 | */ 145 | // solhint-disable-next-line func-name-mixedcase 146 | function _EIP712Name() internal view returns (string memory) { 147 | return _name.toStringWithFallback(_nameFallback); 148 | } 149 | 150 | /** 151 | * @dev The version parameter for the EIP712 domain. 152 | * 153 | * NOTE: By default this function reads _version which is an immutable value. 154 | * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). 155 | */ 156 | // solhint-disable-next-line func-name-mixedcase 157 | function _EIP712Version() internal view returns (string memory) { 158 | return _version.toStringWithFallback(_versionFallback); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {Strings} from "../Strings.sol"; 7 | 8 | /** 9 | * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. 10 | * 11 | * The library provides methods for generating a hash of a message that conforms to the 12 | * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] 13 | * specifications. 14 | */ 15 | library MessageHashUtils { 16 | /** 17 | * @dev Returns the keccak256 digest of an EIP-191 signed data with version 18 | * `0x45` (`personal_sign` messages). 19 | * 20 | * The digest is calculated by prefixing a bytes32 `messageHash` with 21 | * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the 22 | * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. 23 | * 24 | * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with 25 | * keccak256, although any bytes32 value can be safely used because the final digest will 26 | * be re-hashed. 27 | * 28 | * See {ECDSA-recover}. 29 | */ 30 | function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { 31 | /// @solidity memory-safe-assembly 32 | assembly { 33 | mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash 34 | mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix 35 | digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) 36 | } 37 | } 38 | 39 | /** 40 | * @dev Returns the keccak256 digest of an EIP-191 signed data with version 41 | * `0x45` (`personal_sign` messages). 42 | * 43 | * The digest is calculated by prefixing an arbitrary `message` with 44 | * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the 45 | * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. 46 | * 47 | * See {ECDSA-recover}. 48 | */ 49 | function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { 50 | return 51 | keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); 52 | } 53 | 54 | /** 55 | * @dev Returns the keccak256 digest of an EIP-191 signed data with version 56 | * `0x00` (data with intended validator). 57 | * 58 | * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended 59 | * `validator` address. Then hashing the result. 60 | * 61 | * See {ECDSA-recover}. 62 | */ 63 | function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { 64 | return keccak256(abi.encodePacked(hex"19_00", validator, data)); 65 | } 66 | 67 | /** 68 | * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). 69 | * 70 | * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with 71 | * `\x19\x01` and hashing the result. It corresponds to the hash signed by the 72 | * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. 73 | * 74 | * See {ECDSA-recover}. 75 | */ 76 | function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { 77 | /// @solidity memory-safe-assembly 78 | assembly { 79 | let ptr := mload(0x40) 80 | mstore(ptr, hex"19_01") 81 | mstore(add(ptr, 0x02), domainSeparator) 82 | mstore(add(ptr, 0x22), structHash) 83 | digest := keccak256(ptr, 0x42) 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /.deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Standard signed math utilities missing in the Solidity language. 8 | */ 9 | library SignedMath { 10 | /** 11 | * @dev Returns the largest of two signed numbers. 12 | */ 13 | function max(int256 a, int256 b) internal pure returns (int256) { 14 | return a > b ? a : b; 15 | } 16 | 17 | /** 18 | * @dev Returns the smallest of two signed numbers. 19 | */ 20 | function min(int256 a, int256 b) internal pure returns (int256) { 21 | return a < b ? a : b; 22 | } 23 | 24 | /** 25 | * @dev Returns the average of two signed numbers without overflow. 26 | * The result is rounded towards zero. 27 | */ 28 | function average(int256 a, int256 b) internal pure returns (int256) { 29 | // Formula from the book "Hacker's Delight" 30 | int256 x = (a & b) + ((a ^ b) >> 1); 31 | return x + (int256(uint256(x) >> 255) & (a ^ b)); 32 | } 33 | 34 | /** 35 | * @dev Returns the absolute unsigned value of a signed value. 36 | */ 37 | function abs(int256 n) internal pure returns (uint256) { 38 | unchecked { 39 | // must be unchecked in order to support `n = type(int256).min` 40 | return uint256(n >= 0 ? n : -n); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /.deps/remix-tests/artifacts/Assert_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "anonymous": false, 10 | "inputs": [ 11 | { 12 | "indexed": false, 13 | "internalType": "bool", 14 | "name": "passed", 15 | "type": "bool" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "string", 20 | "name": "message", 21 | "type": "string" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "string", 26 | "name": "methodName", 27 | "type": "string" 28 | } 29 | ], 30 | "name": "AssertionEvent", 31 | "type": "event" 32 | }, 33 | { 34 | "anonymous": false, 35 | "inputs": [ 36 | { 37 | "indexed": false, 38 | "internalType": "bool", 39 | "name": "passed", 40 | "type": "bool" 41 | }, 42 | { 43 | "indexed": false, 44 | "internalType": "string", 45 | "name": "message", 46 | "type": "string" 47 | }, 48 | { 49 | "indexed": false, 50 | "internalType": "string", 51 | "name": "methodName", 52 | "type": "string" 53 | }, 54 | { 55 | "indexed": false, 56 | "internalType": "address", 57 | "name": "returned", 58 | "type": "address" 59 | }, 60 | { 61 | "indexed": false, 62 | "internalType": "address", 63 | "name": "expected", 64 | "type": "address" 65 | } 66 | ], 67 | "name": "AssertionEventAddress", 68 | "type": "event" 69 | }, 70 | { 71 | "anonymous": false, 72 | "inputs": [ 73 | { 74 | "indexed": false, 75 | "internalType": "bool", 76 | "name": "passed", 77 | "type": "bool" 78 | }, 79 | { 80 | "indexed": false, 81 | "internalType": "string", 82 | "name": "message", 83 | "type": "string" 84 | }, 85 | { 86 | "indexed": false, 87 | "internalType": "string", 88 | "name": "methodName", 89 | "type": "string" 90 | }, 91 | { 92 | "indexed": false, 93 | "internalType": "bool", 94 | "name": "returned", 95 | "type": "bool" 96 | }, 97 | { 98 | "indexed": false, 99 | "internalType": "bool", 100 | "name": "expected", 101 | "type": "bool" 102 | } 103 | ], 104 | "name": "AssertionEventBool", 105 | "type": "event" 106 | }, 107 | { 108 | "anonymous": false, 109 | "inputs": [ 110 | { 111 | "indexed": false, 112 | "internalType": "bool", 113 | "name": "passed", 114 | "type": "bool" 115 | }, 116 | { 117 | "indexed": false, 118 | "internalType": "string", 119 | "name": "message", 120 | "type": "string" 121 | }, 122 | { 123 | "indexed": false, 124 | "internalType": "string", 125 | "name": "methodName", 126 | "type": "string" 127 | }, 128 | { 129 | "indexed": false, 130 | "internalType": "bytes32", 131 | "name": "returned", 132 | "type": "bytes32" 133 | }, 134 | { 135 | "indexed": false, 136 | "internalType": "bytes32", 137 | "name": "expected", 138 | "type": "bytes32" 139 | } 140 | ], 141 | "name": "AssertionEventBytes32", 142 | "type": "event" 143 | }, 144 | { 145 | "anonymous": false, 146 | "inputs": [ 147 | { 148 | "indexed": false, 149 | "internalType": "bool", 150 | "name": "passed", 151 | "type": "bool" 152 | }, 153 | { 154 | "indexed": false, 155 | "internalType": "string", 156 | "name": "message", 157 | "type": "string" 158 | }, 159 | { 160 | "indexed": false, 161 | "internalType": "string", 162 | "name": "methodName", 163 | "type": "string" 164 | }, 165 | { 166 | "indexed": false, 167 | "internalType": "int256", 168 | "name": "returned", 169 | "type": "int256" 170 | }, 171 | { 172 | "indexed": false, 173 | "internalType": "int256", 174 | "name": "expected", 175 | "type": "int256" 176 | } 177 | ], 178 | "name": "AssertionEventInt", 179 | "type": "event" 180 | }, 181 | { 182 | "anonymous": false, 183 | "inputs": [ 184 | { 185 | "indexed": false, 186 | "internalType": "bool", 187 | "name": "passed", 188 | "type": "bool" 189 | }, 190 | { 191 | "indexed": false, 192 | "internalType": "string", 193 | "name": "message", 194 | "type": "string" 195 | }, 196 | { 197 | "indexed": false, 198 | "internalType": "string", 199 | "name": "methodName", 200 | "type": "string" 201 | }, 202 | { 203 | "indexed": false, 204 | "internalType": "int256", 205 | "name": "returned", 206 | "type": "int256" 207 | }, 208 | { 209 | "indexed": false, 210 | "internalType": "uint256", 211 | "name": "expected", 212 | "type": "uint256" 213 | } 214 | ], 215 | "name": "AssertionEventIntUint", 216 | "type": "event" 217 | }, 218 | { 219 | "anonymous": false, 220 | "inputs": [ 221 | { 222 | "indexed": false, 223 | "internalType": "bool", 224 | "name": "passed", 225 | "type": "bool" 226 | }, 227 | { 228 | "indexed": false, 229 | "internalType": "string", 230 | "name": "message", 231 | "type": "string" 232 | }, 233 | { 234 | "indexed": false, 235 | "internalType": "string", 236 | "name": "methodName", 237 | "type": "string" 238 | }, 239 | { 240 | "indexed": false, 241 | "internalType": "string", 242 | "name": "returned", 243 | "type": "string" 244 | }, 245 | { 246 | "indexed": false, 247 | "internalType": "string", 248 | "name": "expected", 249 | "type": "string" 250 | } 251 | ], 252 | "name": "AssertionEventString", 253 | "type": "event" 254 | }, 255 | { 256 | "anonymous": false, 257 | "inputs": [ 258 | { 259 | "indexed": false, 260 | "internalType": "bool", 261 | "name": "passed", 262 | "type": "bool" 263 | }, 264 | { 265 | "indexed": false, 266 | "internalType": "string", 267 | "name": "message", 268 | "type": "string" 269 | }, 270 | { 271 | "indexed": false, 272 | "internalType": "string", 273 | "name": "methodName", 274 | "type": "string" 275 | }, 276 | { 277 | "indexed": false, 278 | "internalType": "uint256", 279 | "name": "returned", 280 | "type": "uint256" 281 | }, 282 | { 283 | "indexed": false, 284 | "internalType": "uint256", 285 | "name": "expected", 286 | "type": "uint256" 287 | } 288 | ], 289 | "name": "AssertionEventUint", 290 | "type": "event" 291 | }, 292 | { 293 | "anonymous": false, 294 | "inputs": [ 295 | { 296 | "indexed": false, 297 | "internalType": "bool", 298 | "name": "passed", 299 | "type": "bool" 300 | }, 301 | { 302 | "indexed": false, 303 | "internalType": "string", 304 | "name": "message", 305 | "type": "string" 306 | }, 307 | { 308 | "indexed": false, 309 | "internalType": "string", 310 | "name": "methodName", 311 | "type": "string" 312 | }, 313 | { 314 | "indexed": false, 315 | "internalType": "uint256", 316 | "name": "returned", 317 | "type": "uint256" 318 | }, 319 | { 320 | "indexed": false, 321 | "internalType": "int256", 322 | "name": "expected", 323 | "type": "int256" 324 | } 325 | ], 326 | "name": "AssertionEventUintInt", 327 | "type": "event" 328 | } 329 | ], 330 | "devdoc": { 331 | "kind": "dev", 332 | "methods": {}, 333 | "version": 1 334 | }, 335 | "userdoc": { 336 | "kind": "user", 337 | "methods": {}, 338 | "version": 1 339 | } 340 | }, 341 | "settings": { 342 | "compilationTarget": { 343 | ".deps/remix-tests/remix_tests.sol": "Assert" 344 | }, 345 | "evmVersion": "cancun", 346 | "libraries": {}, 347 | "metadata": { 348 | "bytecodeHash": "ipfs" 349 | }, 350 | "optimizer": { 351 | "enabled": true, 352 | "runs": 200 353 | }, 354 | "remappings": [] 355 | }, 356 | "sources": { 357 | ".deps/remix-tests/remix_tests.sol": { 358 | "keccak256": "0xe2783cdc204cba8c72494119339f1d90f9022b15d6c718c668b7f097d8e29787", 359 | "license": "GPL-3.0", 360 | "urls": [ 361 | "bzz-raw://bb6a22e64c7f16bcaab63b1c1a1b269d5be8a6d37bdd9dec1718477ab916b18e", 362 | "dweb:/ipfs/QmdkW1tT5iadBvaHMCoskhDGZKnfdg8o1D9CcoQYtdJet7" 363 | ] 364 | } 365 | }, 366 | "version": 1 367 | } -------------------------------------------------------------------------------- /.deps/remix-tests/artifacts/TestsAccounts_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "uint256", 12 | "name": "index", 13 | "type": "uint256" 14 | } 15 | ], 16 | "name": "getAccount", 17 | "outputs": [ 18 | { 19 | "internalType": "address", 20 | "name": "", 21 | "type": "address" 22 | } 23 | ], 24 | "stateMutability": "pure", 25 | "type": "function" 26 | } 27 | ], 28 | "devdoc": { 29 | "kind": "dev", 30 | "methods": {}, 31 | "version": 1 32 | }, 33 | "userdoc": { 34 | "kind": "user", 35 | "methods": {}, 36 | "version": 1 37 | } 38 | }, 39 | "settings": { 40 | "compilationTarget": { 41 | ".deps/remix-tests/remix_accounts.sol": "TestsAccounts" 42 | }, 43 | "evmVersion": "cancun", 44 | "libraries": {}, 45 | "metadata": { 46 | "bytecodeHash": "ipfs" 47 | }, 48 | "optimizer": { 49 | "enabled": true, 50 | "runs": 200 51 | }, 52 | "remappings": [] 53 | }, 54 | "sources": { 55 | ".deps/remix-tests/remix_accounts.sol": { 56 | "keccak256": "0xab088ffd1cd1033f54c2486f151b5d02281a3b76724c8e6f48479c25a4f7809e", 57 | "license": "GPL-3.0", 58 | "urls": [ 59 | "bzz-raw://5ddaf9976b1838f7028cbedfaf7f6e1cf8c898e100221176ff1406ee8b599f23", 60 | "dweb:/ipfs/QmX2FYLXYyo5Cn55ZX2CfngpscSh4mQhcMVzQdQsh2vqcG" 61 | ] 62 | } 63 | }, 64 | "version": 1 65 | } -------------------------------------------------------------------------------- /.deps/remix-tests/remix_accounts.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | pragma solidity >=0.4.22 <0.9.0; 4 | 5 | library TestsAccounts { 6 | function getAccount(uint index) pure public returns (address) { 7 | address[15] memory accounts; 8 | accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; 9 | 10 | accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; 11 | 12 | accounts[2] = 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db; 13 | 14 | accounts[3] = 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB; 15 | 16 | accounts[4] = 0x617F2E2fD72FD9D5503197092aC168c91465E7f2; 17 | 18 | accounts[5] = 0x17F6AD8Ef982297579C203069C1DbfFE4348c372; 19 | 20 | accounts[6] = 0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678; 21 | 22 | accounts[7] = 0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7; 23 | 24 | accounts[8] = 0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C; 25 | 26 | accounts[9] = 0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC; 27 | 28 | accounts[10] = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c; 29 | 30 | accounts[11] = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C; 31 | 32 | accounts[12] = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB; 33 | 34 | accounts[13] = 0x583031D1113aD414F02576BD6afaBfb302140225; 35 | 36 | accounts[14] = 0xdD870fA1b7C4700F2BD7f44238821C26f7392148; 37 | return accounts[index]; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /.deps/remix-tests/remix_tests.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | pragma solidity >=0.4.22 <0.9.0; 4 | 5 | library Assert { 6 | 7 | event AssertionEvent( 8 | bool passed, 9 | string message, 10 | string methodName 11 | ); 12 | 13 | event AssertionEventUint( 14 | bool passed, 15 | string message, 16 | string methodName, 17 | uint256 returned, 18 | uint256 expected 19 | ); 20 | 21 | event AssertionEventInt( 22 | bool passed, 23 | string message, 24 | string methodName, 25 | int256 returned, 26 | int256 expected 27 | ); 28 | 29 | event AssertionEventBool( 30 | bool passed, 31 | string message, 32 | string methodName, 33 | bool returned, 34 | bool expected 35 | ); 36 | 37 | event AssertionEventAddress( 38 | bool passed, 39 | string message, 40 | string methodName, 41 | address returned, 42 | address expected 43 | ); 44 | 45 | event AssertionEventBytes32( 46 | bool passed, 47 | string message, 48 | string methodName, 49 | bytes32 returned, 50 | bytes32 expected 51 | ); 52 | 53 | event AssertionEventString( 54 | bool passed, 55 | string message, 56 | string methodName, 57 | string returned, 58 | string expected 59 | ); 60 | 61 | event AssertionEventUintInt( 62 | bool passed, 63 | string message, 64 | string methodName, 65 | uint256 returned, 66 | int256 expected 67 | ); 68 | 69 | event AssertionEventIntUint( 70 | bool passed, 71 | string message, 72 | string methodName, 73 | int256 returned, 74 | uint256 expected 75 | ); 76 | 77 | function ok(bool a, string memory message) public returns (bool result) { 78 | result = a; 79 | emit AssertionEvent(result, message, "ok"); 80 | } 81 | 82 | function equal(uint256 a, uint256 b, string memory message) public returns (bool result) { 83 | result = (a == b); 84 | emit AssertionEventUint(result, message, "equal", a, b); 85 | } 86 | 87 | function equal(int256 a, int256 b, string memory message) public returns (bool result) { 88 | result = (a == b); 89 | emit AssertionEventInt(result, message, "equal", a, b); 90 | } 91 | 92 | function equal(bool a, bool b, string memory message) public returns (bool result) { 93 | result = (a == b); 94 | emit AssertionEventBool(result, message, "equal", a, b); 95 | } 96 | 97 | // TODO: only for certain versions of solc 98 | //function equal(fixed a, fixed b, string message) public returns (bool result) { 99 | // result = (a == b); 100 | // emit AssertionEvent(result, message); 101 | //} 102 | 103 | // TODO: only for certain versions of solc 104 | //function equal(ufixed a, ufixed b, string message) public returns (bool result) { 105 | // result = (a == b); 106 | // emit AssertionEvent(result, message); 107 | //} 108 | 109 | function equal(address a, address b, string memory message) public returns (bool result) { 110 | result = (a == b); 111 | emit AssertionEventAddress(result, message, "equal", a, b); 112 | } 113 | 114 | function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) { 115 | result = (a == b); 116 | emit AssertionEventBytes32(result, message, "equal", a, b); 117 | } 118 | 119 | function equal(string memory a, string memory b, string memory message) public returns (bool result) { 120 | result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))); 121 | emit AssertionEventString(result, message, "equal", a, b); 122 | } 123 | 124 | function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) { 125 | result = (a != b); 126 | emit AssertionEventUint(result, message, "notEqual", a, b); 127 | } 128 | 129 | function notEqual(int256 a, int256 b, string memory message) public returns (bool result) { 130 | result = (a != b); 131 | emit AssertionEventInt(result, message, "notEqual", a, b); 132 | } 133 | 134 | function notEqual(bool a, bool b, string memory message) public returns (bool result) { 135 | result = (a != b); 136 | emit AssertionEventBool(result, message, "notEqual", a, b); 137 | } 138 | 139 | // TODO: only for certain versions of solc 140 | //function notEqual(fixed a, fixed b, string message) public returns (bool result) { 141 | // result = (a != b); 142 | // emit AssertionEvent(result, message); 143 | //} 144 | 145 | // TODO: only for certain versions of solc 146 | //function notEqual(ufixed a, ufixed b, string message) public returns (bool result) { 147 | // result = (a != b); 148 | // emit AssertionEvent(result, message); 149 | //} 150 | 151 | function notEqual(address a, address b, string memory message) public returns (bool result) { 152 | result = (a != b); 153 | emit AssertionEventAddress(result, message, "notEqual", a, b); 154 | } 155 | 156 | function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) { 157 | result = (a != b); 158 | emit AssertionEventBytes32(result, message, "notEqual", a, b); 159 | } 160 | 161 | function notEqual(string memory a, string memory b, string memory message) public returns (bool result) { 162 | result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))); 163 | emit AssertionEventString(result, message, "notEqual", a, b); 164 | } 165 | 166 | /*----------------- Greater than --------------------*/ 167 | function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) { 168 | result = (a > b); 169 | emit AssertionEventUint(result, message, "greaterThan", a, b); 170 | } 171 | 172 | function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) { 173 | result = (a > b); 174 | emit AssertionEventInt(result, message, "greaterThan", a, b); 175 | } 176 | // TODO: safely compare between uint and int 177 | function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) { 178 | if(b < int(0)) { 179 | // int is negative uint "a" always greater 180 | result = true; 181 | } else { 182 | result = (a > uint(b)); 183 | } 184 | emit AssertionEventUintInt(result, message, "greaterThan", a, b); 185 | } 186 | function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) { 187 | if(a < int(0)) { 188 | // int is negative uint "b" always greater 189 | result = false; 190 | } else { 191 | result = (uint(a) > b); 192 | } 193 | emit AssertionEventIntUint(result, message, "greaterThan", a, b); 194 | } 195 | /*----------------- Lesser than --------------------*/ 196 | function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) { 197 | result = (a < b); 198 | emit AssertionEventUint(result, message, "lesserThan", a, b); 199 | } 200 | 201 | function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) { 202 | result = (a < b); 203 | emit AssertionEventInt(result, message, "lesserThan", a, b); 204 | } 205 | // TODO: safely compare between uint and int 206 | function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) { 207 | if(b < int(0)) { 208 | // int is negative int "b" always lesser 209 | result = false; 210 | } else { 211 | result = (a < uint(b)); 212 | } 213 | emit AssertionEventUintInt(result, message, "lesserThan", a, b); 214 | } 215 | 216 | function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) { 217 | if(a < int(0)) { 218 | // int is negative int "a" always lesser 219 | result = true; 220 | } else { 221 | result = (uint(a) < b); 222 | } 223 | emit AssertionEventIntUint(result, message, "lesserThan", a, b); 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "overrides": [ 3 | { 4 | "files": "*.sol", 5 | "options": { 6 | "printWidth": 1000, 7 | "tabWidth": 4, 8 | "useTabs": false, 9 | "singleQuote": false, 10 | "bracketSpacing": false 11 | } 12 | }, 13 | { 14 | "files": "*.yml", 15 | "options": {} 16 | }, 17 | { 18 | "files": "*.yaml", 19 | "options": {} 20 | }, 21 | { 22 | "files": "*.toml", 23 | "options": {} 24 | }, 25 | { 26 | "files": "*.json", 27 | "options": {} 28 | }, 29 | { 30 | "files": "*.js", 31 | "options": {} 32 | }, 33 | { 34 | "files": "*.ts", 35 | "options": {} 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 JVC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JVCToken Bank 2 | 3 | ## Overview 4 | 5 | This project includes Solidity smart contracts for a decentralized bank that operates using a custom ERC-20 token, JVCToken, as its official currency. The bank contract allows user registration, token minting, burning, ownership transfer, deposits, and withdrawals. The JVCToken contract manages token minting, transferring, and burning, and provides token-related information. 6 | 7 | ## Table of Contents 8 | 9 | - [Introduction](#introduction) 10 | - [Features](#features) 11 | - [Getting Started](#getting-started) 12 | - [Prerequisites](#prerequisites) 13 | - [Installation](#installation) 14 | - [Usage](#usage) 15 | - [Deploying the Contracts](#deploying-the-contracts) 16 | - [Registering Users](#registering-users) 17 | - [Depositing and Withdrawing Tokens](#depositing-and-withdrawing-tokens) 18 | - [Contract Details](#contract-details) 19 | - [Bank Contract](#bank-contract) 20 | - [JVCToken Contract](#jvctoken-contract) 21 | - [Contributing](#contributing) 22 | - [License](#license) 23 | - [Contact](#contact) 24 | 25 | ## Introduction 26 | 27 | The JVCToken Bank is a decentralized application (dApp) where users can manage their funds using the custom ERC-20 token JVCToken. The bank supports user registration, token management (minting, burning, ownership transfer), and secure token-based transactions. 28 | 29 | ## Features 30 | 31 | - **Custom ERC-20 Token**: JVCToken, a fully compliant ERC-20 token, used as the official currency. 32 | - **User Management**: Register users and manage their token balances. 33 | - **Token Minting**: Mint new tokens to the bank or other users. 34 | - **Secure Transactions**: Safeguard deposits and withdrawals with built-in checks and balances. 35 | 36 | ## Getting Started 37 | 38 | ### Prerequisites 39 | - [Remix IDE](https://remix.ethereum.org/) 40 | - [Metamask](https://metamask.io/) 41 | 42 | ### Installation 43 | 44 | 1. **Clone the repository:** Check [here](https://medium.com/@jvc-byte/how-to-clone-a-github-repository-in-remix-ide-two-steps-218d820824b1) for how to clone repository on Remix IDE. 45 | 46 | ## Usage 47 | 48 | ### Deploying the Contracts 49 | 50 | 1. **Deploy the contracts:** Deploy the contract on remix IDE on sepolia testnet using injected provider - Metamask 51 | 52 | 3. **Interact with the contracts:** You can interact with the contracts right there on remix IDE. 53 | 54 | ### Registering Users 55 | 56 | - Users can register by calling the `registerUser` function in the `Bank` contract. The function automatically checks the user's token balance and records it. 57 | 58 | ### Depositing and Withdrawing Tokens 59 | 60 | - Users can deposit tokens from their account to the bank using the `deposit` function. 61 | - Users can withdraw tokens from the bank to their account using the `withdraw` function. 62 | 63 | ## Contract Details 64 | 65 | ### Bank Contract 66 | 67 | - **Functions**: 68 | - `registerUser`: Registers a new user and records their token balance. 69 | - `deposit`: Deposits tokens into the user's bank account. 70 | - `withdraw`: Withdraws tokens from the user's bank account. 71 | - `getUserByAddress`: Returns the user's information based on their address. 72 | - `mintToken`: Mints new tokens to the bank's address. 73 | - `burnToken`: Burns tokens from the bank's address. 74 | - `changeOwnership`: Changes the ownership of the bank. 75 | - `getContractBalance`: Returns the token balance of the bank contract. 76 | - `getBalanceOf`: Returns the token balance of a specified user. 77 | - `isContractAddr`: Checks if a given address is a contract address. 78 | 79 | ### JVCToken Contract 80 | 81 | - **Functions**: 82 | - `mint`: Mints new tokens to the specified address. 83 | - `burn`: Burns tokens from a specified address. 84 | - `transfer`: Transfers tokens between addresses. 85 | - `checkBalanceOf`: Returns the token balance of a specified address. 86 | - `tokenInfo`: Returns the total supply, name, decimals, and symbol of the token. 87 | - `_update`: Handles the internal logic for minting, burning, and transferring tokens. 88 | 89 | ## Contributing 90 | 91 | Any form of contributions are welcome! 92 | 93 | ## License 94 | 95 | This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. 96 | 97 | ## Contact 98 | 99 | - **Author**: JVC-Byte 100 | - **Email**: [Send a mail](mailto:jvc8463@gmail.com) 101 | - **Twitter**: [jvc_byte](https://x.com/jvc_byte) 102 | 103 | --- 104 | -------------------------------------------------------------------------------- /contracts/artifacts/Bank_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [ 10 | { 11 | "internalType": "address", 12 | "name": "_tokenAddress", 13 | "type": "address" 14 | } 15 | ], 16 | "stateMutability": "nonpayable", 17 | "type": "constructor" 18 | }, 19 | { 20 | "anonymous": false, 21 | "inputs": [ 22 | { 23 | "indexed": true, 24 | "internalType": "address", 25 | "name": "user", 26 | "type": "address" 27 | }, 28 | { 29 | "indexed": false, 30 | "internalType": "string", 31 | "name": "message", 32 | "type": "string" 33 | } 34 | ], 35 | "name": "DepositFailed", 36 | "type": "event" 37 | }, 38 | { 39 | "anonymous": false, 40 | "inputs": [ 41 | { 42 | "indexed": true, 43 | "internalType": "address", 44 | "name": "user", 45 | "type": "address" 46 | }, 47 | { 48 | "indexed": false, 49 | "internalType": "uint256", 50 | "name": "amount", 51 | "type": "uint256" 52 | } 53 | ], 54 | "name": "DepositSuccessful", 55 | "type": "event" 56 | }, 57 | { 58 | "anonymous": false, 59 | "inputs": [ 60 | { 61 | "indexed": true, 62 | "internalType": "address", 63 | "name": "user", 64 | "type": "address" 65 | }, 66 | { 67 | "indexed": false, 68 | "internalType": "string", 69 | "name": "message", 70 | "type": "string" 71 | } 72 | ], 73 | "name": "WithdrawalFailed", 74 | "type": "event" 75 | }, 76 | { 77 | "anonymous": false, 78 | "inputs": [ 79 | { 80 | "indexed": true, 81 | "internalType": "address", 82 | "name": "user", 83 | "type": "address" 84 | }, 85 | { 86 | "indexed": false, 87 | "internalType": "uint256", 88 | "name": "amount", 89 | "type": "uint256" 90 | } 91 | ], 92 | "name": "WithdrawalSuccessful", 93 | "type": "event" 94 | }, 95 | { 96 | "anonymous": false, 97 | "inputs": [ 98 | { 99 | "indexed": false, 100 | "internalType": "string", 101 | "name": "userName", 102 | "type": "string" 103 | }, 104 | { 105 | "indexed": false, 106 | "internalType": "uint256", 107 | "name": "userBalance", 108 | "type": "uint256" 109 | }, 110 | { 111 | "indexed": true, 112 | "internalType": "address", 113 | "name": "userAddress", 114 | "type": "address" 115 | } 116 | ], 117 | "name": "userInfo", 118 | "type": "event" 119 | }, 120 | { 121 | "inputs": [ 122 | { 123 | "internalType": "uint256", 124 | "name": "amount", 125 | "type": "uint256" 126 | } 127 | ], 128 | "name": "burnToken", 129 | "outputs": [], 130 | "stateMutability": "nonpayable", 131 | "type": "function" 132 | }, 133 | { 134 | "inputs": [ 135 | { 136 | "internalType": "address", 137 | "name": "newOwner", 138 | "type": "address" 139 | } 140 | ], 141 | "name": "changeOwnership", 142 | "outputs": [], 143 | "stateMutability": "nonpayable", 144 | "type": "function" 145 | }, 146 | { 147 | "inputs": [], 148 | "name": "deposit", 149 | "outputs": [], 150 | "stateMutability": "payable", 151 | "type": "function" 152 | }, 153 | { 154 | "inputs": [ 155 | { 156 | "internalType": "address", 157 | "name": "_addr", 158 | "type": "address" 159 | } 160 | ], 161 | "name": "getBalanceOf", 162 | "outputs": [ 163 | { 164 | "internalType": "uint256", 165 | "name": "balance", 166 | "type": "uint256" 167 | } 168 | ], 169 | "stateMutability": "view", 170 | "type": "function" 171 | }, 172 | { 173 | "inputs": [], 174 | "name": "getContractBalance", 175 | "outputs": [ 176 | { 177 | "internalType": "uint256", 178 | "name": "", 179 | "type": "uint256" 180 | } 181 | ], 182 | "stateMutability": "view", 183 | "type": "function" 184 | }, 185 | { 186 | "inputs": [], 187 | "name": "getTokenInfo", 188 | "outputs": [ 189 | { 190 | "internalType": "uint256", 191 | "name": "totalSupply", 192 | "type": "uint256" 193 | }, 194 | { 195 | "internalType": "string", 196 | "name": "tokenName", 197 | "type": "string" 198 | }, 199 | { 200 | "internalType": "string", 201 | "name": "tokenSymbol", 202 | "type": "string" 203 | }, 204 | { 205 | "internalType": "uint256", 206 | "name": "tokenDecimal", 207 | "type": "uint256" 208 | } 209 | ], 210 | "stateMutability": "nonpayable", 211 | "type": "function" 212 | }, 213 | { 214 | "inputs": [ 215 | { 216 | "internalType": "address", 217 | "name": "", 218 | "type": "address" 219 | } 220 | ], 221 | "name": "getUserByAddress", 222 | "outputs": [ 223 | { 224 | "internalType": "string", 225 | "name": "uname", 226 | "type": "string" 227 | }, 228 | { 229 | "internalType": "uint256", 230 | "name": "balance", 231 | "type": "uint256" 232 | }, 233 | { 234 | "internalType": "address", 235 | "name": "uaddress", 236 | "type": "address" 237 | } 238 | ], 239 | "stateMutability": "view", 240 | "type": "function" 241 | }, 242 | { 243 | "inputs": [ 244 | { 245 | "internalType": "uint256", 246 | "name": "amount", 247 | "type": "uint256" 248 | } 249 | ], 250 | "name": "mintToken", 251 | "outputs": [], 252 | "stateMutability": "nonpayable", 253 | "type": "function" 254 | }, 255 | { 256 | "inputs": [ 257 | { 258 | "internalType": "string", 259 | "name": "uname", 260 | "type": "string" 261 | } 262 | ], 263 | "name": "registerUser", 264 | "outputs": [], 265 | "stateMutability": "nonpayable", 266 | "type": "function" 267 | }, 268 | { 269 | "inputs": [], 270 | "name": "status", 271 | "outputs": [ 272 | { 273 | "internalType": "enum Bank.Status", 274 | "name": "", 275 | "type": "uint8" 276 | } 277 | ], 278 | "stateMutability": "view", 279 | "type": "function" 280 | }, 281 | { 282 | "inputs": [ 283 | { 284 | "internalType": "uint256", 285 | "name": "amount", 286 | "type": "uint256" 287 | } 288 | ], 289 | "name": "withdraw", 290 | "outputs": [], 291 | "stateMutability": "payable", 292 | "type": "function" 293 | } 294 | ], 295 | "devdoc": { 296 | "kind": "dev", 297 | "methods": {}, 298 | "version": 1 299 | }, 300 | "userdoc": { 301 | "kind": "user", 302 | "methods": {}, 303 | "version": 1 304 | } 305 | }, 306 | "settings": { 307 | "compilationTarget": { 308 | "contracts/bank.sol": "Bank" 309 | }, 310 | "evmVersion": "cancun", 311 | "libraries": {}, 312 | "metadata": { 313 | "bytecodeHash": "ipfs" 314 | }, 315 | "optimizer": { 316 | "enabled": true, 317 | "runs": 200 318 | }, 319 | "remappings": [] 320 | }, 321 | "sources": { 322 | "@openzeppelin/contracts/access/Ownable.sol": { 323 | "keccak256": "0x9152d3446ffd9d8ddf6b0c57edc36ac6a565de127bda10ff8094f0e1ea3f6553", 324 | "license": "MIT", 325 | "urls": [ 326 | "bzz-raw://25f37c975e92fc0bc2fe94ec0d8cad2eaae8f9214521685eb3b9a32d025fe284", 327 | "dweb:/ipfs/QmRogodSGXv581gm2LoeimVj5aLKGAzp8G1uW3M6J6rFVG" 328 | ] 329 | }, 330 | "@openzeppelin/contracts/utils/Context.sol": { 331 | "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", 332 | "license": "MIT", 333 | "urls": [ 334 | "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", 335 | "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" 336 | ] 337 | }, 338 | "contracts/bank.sol": { 339 | "keccak256": "0x0c20750f0484800fe779d510d499805512339097034ac41a9f0f689ec1aa7455", 340 | "license": "MIT", 341 | "urls": [ 342 | "bzz-raw://814a5c4d6aa28c4b4add1756930f2708555b93ff4bd4a172a86d83e7cc7a3057", 343 | "dweb:/ipfs/QmXmGGnq1Zz6Skgutyu59uahHQMkP7nVAxZRMdVZaJbRBq" 344 | ] 345 | }, 346 | "contracts/token.sol": { 347 | "keccak256": "0xccfd99e459de9a0e5f1de3978a7637d544b23500fa3ee5723167379f9055a639", 348 | "license": "MIT", 349 | "urls": [ 350 | "bzz-raw://5b8f93ceeb7737897b883e0460c7d3cee5aae949b51263056aae5d8f92ed4b4a", 351 | "dweb:/ipfs/QmZGPC269iXe1RkvWHy12RSpqr9a9skTrXSfxVcw2FsQ8U" 352 | ] 353 | } 354 | }, 355 | "version": 1 356 | } -------------------------------------------------------------------------------- /contracts/artifacts/JVCToken_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.26+commit.8a97fa7a" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [], 10 | "stateMutability": "nonpayable", 11 | "type": "constructor" 12 | }, 13 | { 14 | "inputs": [ 15 | { 16 | "internalType": "address", 17 | "name": "owner", 18 | "type": "address" 19 | } 20 | ], 21 | "name": "OwnableInvalidOwner", 22 | "type": "error" 23 | }, 24 | { 25 | "inputs": [ 26 | { 27 | "internalType": "address", 28 | "name": "account", 29 | "type": "address" 30 | } 31 | ], 32 | "name": "OwnableUnauthorizedAccount", 33 | "type": "error" 34 | }, 35 | { 36 | "anonymous": false, 37 | "inputs": [ 38 | { 39 | "indexed": true, 40 | "internalType": "address", 41 | "name": "previousOwner", 42 | "type": "address" 43 | }, 44 | { 45 | "indexed": true, 46 | "internalType": "address", 47 | "name": "newOwner", 48 | "type": "address" 49 | } 50 | ], 51 | "name": "OwnershipTransferred", 52 | "type": "event" 53 | }, 54 | { 55 | "anonymous": false, 56 | "inputs": [ 57 | { 58 | "indexed": true, 59 | "internalType": "address", 60 | "name": "_from", 61 | "type": "address" 62 | }, 63 | { 64 | "indexed": true, 65 | "internalType": "address", 66 | "name": "_to", 67 | "type": "address" 68 | }, 69 | { 70 | "indexed": false, 71 | "internalType": "uint256", 72 | "name": "_value", 73 | "type": "uint256" 74 | } 75 | ], 76 | "name": "Transfer", 77 | "type": "event" 78 | }, 79 | { 80 | "inputs": [ 81 | { 82 | "internalType": "address", 83 | "name": "account", 84 | "type": "address" 85 | }, 86 | { 87 | "internalType": "uint256", 88 | "name": "value", 89 | "type": "uint256" 90 | } 91 | ], 92 | "name": "burn", 93 | "outputs": [], 94 | "stateMutability": "nonpayable", 95 | "type": "function" 96 | }, 97 | { 98 | "inputs": [ 99 | { 100 | "internalType": "address", 101 | "name": "_owner", 102 | "type": "address" 103 | } 104 | ], 105 | "name": "checkBalanceOf", 106 | "outputs": [ 107 | { 108 | "internalType": "uint256", 109 | "name": "balance", 110 | "type": "uint256" 111 | } 112 | ], 113 | "stateMutability": "view", 114 | "type": "function" 115 | }, 116 | { 117 | "inputs": [], 118 | "name": "decimals", 119 | "outputs": [ 120 | { 121 | "internalType": "uint8", 122 | "name": "", 123 | "type": "uint8" 124 | } 125 | ], 126 | "stateMutability": "view", 127 | "type": "function" 128 | }, 129 | { 130 | "inputs": [], 131 | "name": "getCaller", 132 | "outputs": [ 133 | { 134 | "internalType": "address", 135 | "name": "Caller", 136 | "type": "address" 137 | } 138 | ], 139 | "stateMutability": "view", 140 | "type": "function" 141 | }, 142 | { 143 | "inputs": [ 144 | { 145 | "internalType": "address", 146 | "name": "account", 147 | "type": "address" 148 | }, 149 | { 150 | "internalType": "uint256", 151 | "name": "value", 152 | "type": "uint256" 153 | } 154 | ], 155 | "name": "mint", 156 | "outputs": [], 157 | "stateMutability": "nonpayable", 158 | "type": "function" 159 | }, 160 | { 161 | "inputs": [], 162 | "name": "name", 163 | "outputs": [ 164 | { 165 | "internalType": "string", 166 | "name": "", 167 | "type": "string" 168 | } 169 | ], 170 | "stateMutability": "view", 171 | "type": "function" 172 | }, 173 | { 174 | "inputs": [], 175 | "name": "owner", 176 | "outputs": [ 177 | { 178 | "internalType": "address", 179 | "name": "", 180 | "type": "address" 181 | } 182 | ], 183 | "stateMutability": "view", 184 | "type": "function" 185 | }, 186 | { 187 | "inputs": [], 188 | "name": "symbol", 189 | "outputs": [ 190 | { 191 | "internalType": "string", 192 | "name": "", 193 | "type": "string" 194 | } 195 | ], 196 | "stateMutability": "view", 197 | "type": "function" 198 | }, 199 | { 200 | "inputs": [], 201 | "name": "tokenInfo", 202 | "outputs": [ 203 | { 204 | "internalType": "uint256", 205 | "name": "", 206 | "type": "uint256" 207 | }, 208 | { 209 | "internalType": "string", 210 | "name": "", 211 | "type": "string" 212 | }, 213 | { 214 | "internalType": "string", 215 | "name": "", 216 | "type": "string" 217 | }, 218 | { 219 | "internalType": "uint256", 220 | "name": "", 221 | "type": "uint256" 222 | } 223 | ], 224 | "stateMutability": "nonpayable", 225 | "type": "function" 226 | }, 227 | { 228 | "inputs": [], 229 | "name": "totalSupply", 230 | "outputs": [ 231 | { 232 | "internalType": "uint256", 233 | "name": "", 234 | "type": "uint256" 235 | } 236 | ], 237 | "stateMutability": "view", 238 | "type": "function" 239 | }, 240 | { 241 | "inputs": [ 242 | { 243 | "internalType": "address payable", 244 | "name": "_to", 245 | "type": "address" 246 | }, 247 | { 248 | "internalType": "uint256", 249 | "name": "_value", 250 | "type": "uint256" 251 | } 252 | ], 253 | "name": "transfer", 254 | "outputs": [ 255 | { 256 | "internalType": "bool", 257 | "name": "success", 258 | "type": "bool" 259 | } 260 | ], 261 | "stateMutability": "payable", 262 | "type": "function" 263 | }, 264 | { 265 | "inputs": [ 266 | { 267 | "internalType": "address", 268 | "name": "newOwner", 269 | "type": "address" 270 | } 271 | ], 272 | "name": "transferOwnership", 273 | "outputs": [], 274 | "stateMutability": "nonpayable", 275 | "type": "function" 276 | } 277 | ], 278 | "devdoc": { 279 | "errors": { 280 | "OwnableInvalidOwner(address)": [ 281 | { 282 | "details": "The owner is not a valid owner account. (eg. `address(0)`)" 283 | } 284 | ], 285 | "OwnableUnauthorizedAccount(address)": [ 286 | { 287 | "details": "The caller account is not authorized to perform an operation." 288 | } 289 | ] 290 | }, 291 | "kind": "dev", 292 | "methods": { 293 | "owner()": { 294 | "details": "Returns the address of the current owner." 295 | }, 296 | "transferOwnership(address)": { 297 | "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." 298 | } 299 | }, 300 | "version": 1 301 | }, 302 | "userdoc": { 303 | "kind": "user", 304 | "methods": {}, 305 | "version": 1 306 | } 307 | }, 308 | "settings": { 309 | "compilationTarget": { 310 | "contracts/token.sol": "JVCToken" 311 | }, 312 | "evmVersion": "cancun", 313 | "libraries": {}, 314 | "metadata": { 315 | "bytecodeHash": "ipfs" 316 | }, 317 | "optimizer": { 318 | "enabled": true, 319 | "runs": 200 320 | }, 321 | "remappings": [] 322 | }, 323 | "sources": { 324 | "@openzeppelin/contracts/access/Ownable.sol": { 325 | "keccak256": "0x9152d3446ffd9d8ddf6b0c57edc36ac6a565de127bda10ff8094f0e1ea3f6553", 326 | "license": "MIT", 327 | "urls": [ 328 | "bzz-raw://25f37c975e92fc0bc2fe94ec0d8cad2eaae8f9214521685eb3b9a32d025fe284", 329 | "dweb:/ipfs/QmRogodSGXv581gm2LoeimVj5aLKGAzp8G1uW3M6J6rFVG" 330 | ] 331 | }, 332 | "@openzeppelin/contracts/utils/Context.sol": { 333 | "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", 334 | "license": "MIT", 335 | "urls": [ 336 | "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", 337 | "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" 338 | ] 339 | }, 340 | "contracts/token.sol": { 341 | "keccak256": "0x35326da1cfa9f6fb22a16ece502532b791caf922e5546f11b43bf3e2db16b839", 342 | "license": "MIT", 343 | "urls": [ 344 | "bzz-raw://b6f1752d288ad96a8424b0af97b996903751784261c66e4f85dc36b3b25b3bb9", 345 | "dweb:/ipfs/QmZv2qaynD47WTfSdPZ46Zvsx1ebebiHRPwefDTLjMzQvP" 346 | ] 347 | } 348 | }, 349 | "version": 1 350 | } -------------------------------------------------------------------------------- /contracts/bank.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.5.0 <0.9.0; 3 | 4 | import "./token.sol"; 5 | 6 | contract Bank { 7 | // Create an instance of the contract (JVCToken) 8 | JVCToken internal token; 9 | 10 | // Storage location of the users 11 | struct User { 12 | string uname; 13 | uint256 balance; 14 | address uaddress; 15 | } 16 | 17 | // Use address as a key to access the storage location of the users 18 | mapping(address => User) public getUserByAddress; 19 | 20 | // Constants for minimum deposit and maximum withdrawal amount 21 | uint256 private constant minDepAmt = 100 wei; 22 | uint256 private constant maxWithdAmt = 1 ether; 23 | 24 | // Custom datatype recognised as unsigned integer to store the state of deposit and withdrawal. 25 | enum Status { 26 | Pending, 27 | Failed, 28 | Successful 29 | } 30 | Status public status; 31 | 32 | // Events to log the status of the withdrawal and deposit activities 33 | event DepositSuccessful(address indexed user, uint256 amount); 34 | event DepositFailed(address indexed user, string message); 35 | event WithdrawalSuccessful(address indexed user, uint256 amount); 36 | event WithdrawalFailed(address indexed user, string message); 37 | 38 | //event to log when a user registers 39 | event userInfo(string userName, uint256 userBalance, address indexed userAddress); 40 | 41 | // Function modifier to ensure an address in not a contract address 42 | modifier verifyAddr(address _addr) { 43 | require(!isContractAddr(_addr), "Contract addresses not allowed!"); 44 | _; 45 | } 46 | 47 | // Get the token address which will be used to interact with the deployed contract (JVCToken) 48 | constructor(address _tokenAddress) { 49 | token = JVCToken(_tokenAddress); 50 | } 51 | 52 | // Add users to the bank 53 | function registerUser(string memory uname) public { 54 | require(bytes(getUserByAddress[msg.sender].uname).length == 0, "User already registered!"); 55 | uint256 userBalance = token.checkBalanceOf(msg.sender); // Default to 0 if none. 56 | getUserByAddress[msg.sender] = User(uname, userBalance, msg.sender); 57 | emit userInfo(uname, userBalance, msg.sender); 58 | } 59 | 60 | // Place a deposit from the the address trigering the function to the bank(contract address) 61 | function deposit() public payable verifyAddr(msg.sender) { 62 | require(msg.value >= minDepAmt, "Minimum deposit amount not met"); 63 | token.transfer(payable(address(this)), msg.value); 64 | status = Status.Successful; 65 | emit DepositSuccessful(msg.sender, msg.value); 66 | } 67 | 68 | // Place a withdrawal from the bank (contract address) to the address in request(msg.sender) 69 | function withdraw(uint256 amount) public payable verifyAddr(msg.sender) { 70 | require(getUserByAddress[msg.sender].uaddress == msg.sender, "This user no dey this bank!"); 71 | require(amount <= getUserByAddress[msg.sender].balance, "Insufficient balance"); 72 | require(amount <= maxWithdAmt, "Withdrawal amount exceeds limit"); 73 | getUserByAddress[payable(address(this))].balance -= amount; 74 | getUserByAddress[payable(msg.sender)].balance += amount; 75 | // token.removeMoney(msg.sender, amount); 76 | emit WithdrawalSuccessful(msg.sender, amount); 77 | status = Status.Successful; 78 | } 79 | 80 | // Mint new tokens 81 | function mintToken(uint256 amount) public { 82 | token.mint(address(this), amount); 83 | } 84 | 85 | // Burn some of the tokens 86 | function burnToken(uint256 amount) public { 87 | token.burn(address(this), amount); 88 | } 89 | 90 | // Transfer onwership of the token 91 | function changeOwnership(address newOwner) public verifyAddr(newOwner) { 92 | token.transferOwnership(newOwner); 93 | } 94 | 95 | // Get the balance of the smart contract 96 | function getContractBalance() public view returns (uint256) { 97 | return (token.checkBalanceOf(address(this))); 98 | } 99 | 100 | // Get some meta data about the JVC token 101 | function getTokenInfo() public returns (uint256 totalSupply, string memory tokenName, string memory tokenSymbol, uint256 tokenDecimal) { 102 | return (token.tokenInfo()); 103 | } 104 | 105 | // Get the acount balance of a user 106 | function getBalanceOf(address _addr) public view returns (uint balance) { 107 | return token.checkBalanceOf(_addr); 108 | } 109 | 110 | // Helper function to check contract address 111 | function isContractAddr(address addr) internal view returns (bool) { 112 | return addr.code.length > 0; 113 | } 114 | 115 | function getCaller() public view returns (address Caller) { 116 | return msg.sender; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /contracts/token.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.5.0 <0.9.0; 3 | import "@openzeppelin/contracts/access/Ownable.sol"; 4 | 5 | contract JVCToken is Ownable { 6 | // Address as key to access users balance 7 | mapping(address => uint256) internal balances; 8 | 9 | // State variables to store token meta data 10 | uint256 public totalSupply; 11 | string public name; 12 | uint8 public decimals; 13 | string public symbol; 14 | 15 | // initializer 16 | constructor() Ownable(msg.sender) { 17 | balances[msg.sender] = 10; 18 | totalSupply = balances[msg.sender]; 19 | name = "JVCToken"; 20 | decimals = 18; 21 | symbol = "JVC"; 22 | } 23 | 24 | // event to log transfer status 25 | event Transfer(address indexed _from, address indexed _to, uint256 _value); 26 | 27 | // Helper function to fetch meta data of the token 28 | function tokenInfo() 29 | external 30 | virtual 31 | returns ( 32 | uint256, 33 | string memory, 34 | string memory, 35 | uint256 36 | ) 37 | { 38 | return (totalSupply, name, symbol, decimals); 39 | } 40 | 41 | // Transfer from the person initiating the transaction to the provided address 42 | function transfer(address payable _to, uint256 _value) external payable virtual returns (bool success) { 43 | require(balances[msg.sender] >= _value, "token balance is lower than the value requested"); 44 | require(msg.sender != _to, "Hold on, you wan deposit to yourself. Dey play!"); 45 | balances[msg.sender] -= _value; 46 | balances[_to] += _value; 47 | emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars 48 | return true; 49 | } 50 | 51 | // Check balance of a given address 52 | function checkBalanceOf(address _owner) external view returns (uint256 balance) { 53 | return balances[_owner]; 54 | } 55 | 56 | // Burn some JVCToken 57 | function burn(address account, uint256 value) external virtual onlyOwner { 58 | require(account != address(0), "Invalid account!"); 59 | _update(account, address(0), value); 60 | } 61 | 62 | // Mint more JVCToken 63 | function mint(address account, uint256 value) external virtual onlyOwner { 64 | require(account != address(0), "Invalid address"); 65 | _update(address(0), account, value); 66 | } 67 | 68 | // Helper function to mint or burn a token 69 | function _update( 70 | address from, 71 | address to, 72 | uint256 value 73 | ) internal virtual { 74 | if (from == address(0)) { 75 | totalSupply += value; 76 | } else { 77 | uint256 fromBalance = balances[from]; 78 | require(fromBalance > value, "Insufient JVC token"); 79 | unchecked { 80 | balances[from] = fromBalance - value; 81 | } 82 | } 83 | 84 | if (to == address(0)) { 85 | unchecked { 86 | totalSupply -= value; 87 | } 88 | } else { 89 | unchecked { 90 | balances[to] += value; 91 | } 92 | } 93 | emit Transfer(from, to, value); 94 | } 95 | 96 | function getCaller() public view returns (address Caller) { 97 | return msg.sender; 98 | } 99 | } 100 | --------------------------------------------------------------------------------