UNPKG

@settlemint/solidity-diamond-bond

Version:

Smart contract set to build an enterprise bond usecase in SettleMint

689 lines 19.9 kB
{ "compiler": { "version": "0.8.30+commit.73712a01" }, "language": "Solidity", "output": { "abi": [ { "inputs": [ { "internalType": "string", "name": "name_", "type": "string" }, { "internalType": "string", "name": "symbol_", "type": "string" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }, { "internalType": "uint256", "name": "needed", "type": "uint256" } ], "type": "error", "name": "ERC20InsufficientAllowance" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "needed", "type": "uint256" } ], "type": "error", "name": "ERC20InsufficientBalance" }, { "inputs": [ { "internalType": "address", "name": "approver", "type": "address" } ], "type": "error", "name": "ERC20InvalidApprover" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" } ], "type": "error", "name": "ERC20InvalidReceiver" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" } ], "type": "error", "name": "ERC20InvalidSender" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" } ], "type": "error", "name": "ERC20InvalidSpender" }, { "inputs": [], "type": "error", "name": "EnforcedPause" }, { "inputs": [], "type": "error", "name": "ExpectedPause" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "type": "error", "name": "OwnableInvalidOwner" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "type": "error", "name": "OwnableUnauthorizedAccount" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address", "indexed": true }, { "internalType": "address", "name": "spender", "type": "address", "indexed": true }, { "internalType": "uint256", "name": "value", "type": "uint256", "indexed": false } ], "type": "event", "name": "Approval", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "previousOwner", "type": "address", "indexed": true }, { "internalType": "address", "name": "newOwner", "type": "address", "indexed": true } ], "type": "event", "name": "OwnershipTransferred", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address", "indexed": false } ], "type": "event", "name": "Paused", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address", "indexed": true }, { "internalType": "address", "name": "to", "type": "address", "indexed": true }, { "internalType": "uint256", "name": "value", "type": "uint256", "indexed": false } ], "type": "event", "name": "Transfer", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address", "indexed": false } ], "type": "event", "name": "Unpaused", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "stateMutability": "view", "type": "function", "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "stateMutability": "view", "type": "function", "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "burn" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "burnFrom" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ] }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "mint" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ] }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ] }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "pause" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "renounceOwnership" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ] }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", "name": "transferOwnership" }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "unpause" } ], "devdoc": { "kind": "dev", "methods": { "allowance(address,address)": { "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." }, "approve(address,uint256)": { "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." }, "balanceOf(address)": { "details": "Returns the value of tokens owned by `account`." }, "burn(uint256)": { "details": "Destroys `amount` tokens from `account`, reducing the total supply. Emits a Transfer event with `to` set to the zero address. Requirements: - `account` cannot be the zero address. - `account` must have at least `amount` tokens.", "params": { "amount": "The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function" } }, "burnFrom(address,uint256)": { "details": "Destroys a `value` amount of tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `value`." }, "decimals()": { "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}." }, "name()": { "details": "Returns the name of the token." }, "owner()": { "details": "Returns the address of the current owner." }, "pause()": { "details": "Pauses all token transfers." }, "paused()": { "details": "Returns true if the contract is paused, and false otherwise." }, "renounceOwnership()": { "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." }, "symbol()": { "details": "Returns the symbol of the token, usually a shorter version of the name." }, "totalSupply()": { "details": "Returns the value of tokens in existence." }, "transfer(address,uint256)": { "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`." }, "transferFrom(address,address,uint256)": { "details": "See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. 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`." }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, "unpause()": { "details": "Unpauses all token transfers." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "pause()": { "notice": "This function can only be called by the contract owner." }, "unpause()": { "notice": "This function can only be called by the contract owner." } }, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/=node_modules/@openzeppelin/", "@prb/math/=node_modules/@prb/math/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "contracts/GenericToken.sol": "GenericToken" }, "evmVersion": "cancun", "libraries": {}, "viaIR": true }, "sources": { "contracts/GenericToken.sol": { "keccak256": "0xc6ce45fb65f5e74f887c437b33d6b86348b20bf3a108346628bf30d6aa791e57", "urls": [ "bzz-raw://355dc3cec66bf23453a8f703833103480b73717be2a1ed39065c2e897be54786", "dweb:/ipfs/QmaN7FGBpPPyHRctyXDpSUtMYA6GQjkjNpx2E1n6jrGbEz" ], "license": "FSL-1.1-MIT" }, "node_modules/@openzeppelin/contracts/access/Ownable.sol": { "keccak256": "0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb", "urls": [ "bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6", "dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { "keccak256": "0x19fdfb0f3b89a230e7dbd1cf416f1a6b531a3ee5db4da483f946320fc74afc0e", "urls": [ "bzz-raw://3490d794728f5bfecb46820431adaff71ba374141545ec20b650bb60353fac23", "dweb:/ipfs/QmPsfxjVpMcZbpE7BH93DzTpEaktESigEw4SmDzkXuJ4WR" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": { "keccak256": "0x86b7b71a6aedefdad89b607378eeab1dcc5389b9ea7d17346d08af01d7190994", "urls": [ "bzz-raw://1dc2db8d94a21eac8efe03adf574c419b08536409b416057a2b5b95cb772c43c", "dweb:/ipfs/QmZfqJCKVU1ScuX2A7s8WZdQEaikwJbDH5JBrBdKTUT4Gu" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": { "keccak256": "0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2", "urls": [ "bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303", "dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol": { "keccak256": "0x2659248df25e34000ed214b3dc8da2160bc39874c992b477d9e2b1b3283dc073", "urls": [ "bzz-raw://c345af1b0e7ea28d1216d6a04ab28f5534a5229b9edf9ca3cd0e84950ae58d26", "dweb:/ipfs/QmY63jtSrYpLRe8Gj1ep2vMDCKxGNNG3hnNVKBVnrs2nmA" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": { "keccak256": "0x756aee61d83960d324973de3a64920a02b480efe662b611fb05ea506d844aa55", "urls": [ "bzz-raw://4dfb71ab2f5fcc530226a25bba4d808f4d22a7f383cae4a3be3629ec057b276c", "dweb:/ipfs/QmRzyetUjbr9Gx1pcXYSsE5rz4XypfEbZgmBvZKUNUJQLR" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { "keccak256": "0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f", "urls": [ "bzz-raw://f95ee0bbd4dd3ac730d066ba3e785ded4565e890dbec2fa7d3b9fe3bad9d0d6e", "dweb:/ipfs/QmSLr6bHkPFWT7ntj34jmwfyskpwo97T9jZUrk5sz3sdtR" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Context.sol": { "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", "urls": [ "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Pausable.sol": { "keccak256": "0xdb484371dfbb848cb6f5d70464e9ac9b2900e4164ead76bbce4fef0b44bcc68f", "urls": [ "bzz-raw://f9d6f6f6600a2bec622f699081b58350873b5e63ce05464d17d674a290bb8a7c", "dweb:/ipfs/QmQKVzSQY1PM3Bid4QhgVVZyx6B4Jx7XgaQzLKHj38vJz8" ], "license": "MIT" } }, "version": 1 }