UNPKG

@settlemint/solidity-diamond-bond

Version:

Smart contract set to build an enterprise bond usecase in SettleMint

423 lines 12.1 kB
{ "compiler": { "version": "0.8.27+commit.40a35a09" }, "language": "Solidity", "output": { "abi": [ { "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": [ { "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": "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": "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": [], "stateMutability": "view", "type": "function", "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ] }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ] }, { "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" } ] } ], "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`." }, "constructor": { "details": "Sets the values for {name} and {symbol}. Both values are immutable: they can only be set once during construction." }, "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." }, "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`." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "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": 10000 }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": "ERC20" }, "evmVersion": "cancun", "libraries": {}, "viaIR": true }, "sources": { "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/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" } }, "version": 1 }