UNPKG

@settlemint/solidity-diamond-bond

Version:

Smart contract set to build an enterprise bond usecase in SettleMint

400 lines 10.2 kB
{ "compiler": { "version": "0.8.27+commit.40a35a09" }, "language": "Solidity", "output": { "abi": [ { "inputs": [ { "internalType": "struct IDiamond.FacetCut[]", "name": "_diamondCut", "type": "tuple[]", "components": [ { "internalType": "address", "name": "facetAddress", "type": "address" }, { "internalType": "enum IDiamond.FacetCutAction", "name": "action", "type": "uint8" }, { "internalType": "bytes4[]", "name": "functionSelectors", "type": "bytes4[]" } ] }, { "internalType": "struct DiamondArgs", "name": "_args", "type": "tuple", "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "init", "type": "address" }, { "internalType": "bytes", "name": "initCalldata", "type": "bytes" } ] } ], "stateMutability": "payable", "type": "constructor" }, { "inputs": [ { "internalType": "bytes4", "name": "_selector", "type": "bytes4" } ], "type": "error", "name": "CannotAddFunctionToDiamondThatAlreadyExists" }, { "inputs": [ { "internalType": "bytes4[]", "name": "_selectors", "type": "bytes4[]" } ], "type": "error", "name": "CannotAddSelectorsToZeroAddress" }, { "inputs": [ { "internalType": "bytes4", "name": "_selector", "type": "bytes4" } ], "type": "error", "name": "CannotRemoveFunctionThatDoesNotExist" }, { "inputs": [ { "internalType": "bytes4", "name": "_selector", "type": "bytes4" } ], "type": "error", "name": "CannotRemoveImmutableFunction" }, { "inputs": [ { "internalType": "bytes4", "name": "_selector", "type": "bytes4" } ], "type": "error", "name": "CannotReplaceFunctionThatDoesNotExists" }, { "inputs": [ { "internalType": "bytes4", "name": "_selector", "type": "bytes4" } ], "type": "error", "name": "CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet" }, { "inputs": [ { "internalType": "bytes4[]", "name": "_selectors", "type": "bytes4[]" } ], "type": "error", "name": "CannotReplaceFunctionsFromFacetWithZeroAddress" }, { "inputs": [ { "internalType": "bytes4", "name": "_selector", "type": "bytes4" } ], "type": "error", "name": "CannotReplaceImmutableFunction" }, { "inputs": [ { "internalType": "bytes4", "name": "_functionSelector", "type": "bytes4" } ], "type": "error", "name": "FunctionNotFound" }, { "inputs": [ { "internalType": "uint8", "name": "_action", "type": "uint8" } ], "type": "error", "name": "IncorrectFacetCutAction" }, { "inputs": [ { "internalType": "address", "name": "_initializationContractAddress", "type": "address" }, { "internalType": "bytes", "name": "_calldata", "type": "bytes" } ], "type": "error", "name": "InitializationFunctionReverted" }, { "inputs": [ { "internalType": "address", "name": "_contractAddress", "type": "address" }, { "internalType": "string", "name": "_message", "type": "string" } ], "type": "error", "name": "NoBytecodeAtAddress" }, { "inputs": [ { "internalType": "address", "name": "_facetAddress", "type": "address" } ], "type": "error", "name": "NoSelectorsProvidedForFacetForCut" }, { "inputs": [ { "internalType": "address", "name": "_facetAddress", "type": "address" } ], "type": "error", "name": "RemoveFacetAddressMustBeZeroAddress" }, { "inputs": [ { "internalType": "struct IDiamond.FacetCut[]", "name": "_diamondCut", "type": "tuple[]", "components": [ { "internalType": "address", "name": "facetAddress", "type": "address" }, { "internalType": "enum IDiamond.FacetCutAction", "name": "action", "type": "uint8" }, { "internalType": "bytes4[]", "name": "functionSelectors", "type": "bytes4[]" } ], "indexed": false }, { "internalType": "address", "name": "_init", "type": "address", "indexed": false }, { "internalType": "bytes", "name": "_calldata", "type": "bytes", "indexed": false } ], "type": "event", "name": "DiamondCut", "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": [], "stateMutability": "payable", "type": "fallback" }, { "inputs": [ { "internalType": "struct IDiamond.FacetCut[]", "name": "_diamondCut", "type": "tuple[]", "components": [ { "internalType": "address", "name": "facetAddress", "type": "address" }, { "internalType": "enum IDiamond.FacetCutAction", "name": "action", "type": "uint8" }, { "internalType": "bytes4[]", "name": "functionSelectors", "type": "bytes4[]" } ] }, { "internalType": "address", "name": "_init", "type": "address" }, { "internalType": "bytes", "name": "_calldata", "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function", "name": "diamondCut" }, { "inputs": [], "stateMutability": "payable", "type": "receive" } ], "devdoc": { "kind": "dev", "methods": {}, "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": { "contracts/Diamond.sol": "Diamond" }, "evmVersion": "cancun", "libraries": {}, "viaIR": true }, "sources": { "contracts/Diamond.sol": { "keccak256": "0x41047034ac265335dd621ece49594e9a56e6f03e2f523d8aeb00287258014684", "urls": [ "bzz-raw://8f3b404fb4370f8e5a42fcdf6ec9ef72f3002a16b94bbf1d941cf11449c79f19", "dweb:/ipfs/QmZAFJMycUrsMF8r5mXwWuRCzFscGV1ephkR3GAZqLHnjS" ], "license": "FSL-1.1-MIT" }, "contracts/interfaces/IDiamond.sol": { "keccak256": "0xf6ea8172fc4ca7f19387dcab713a7c2d3c7453540ec8ea9bbf8fa29fce272d4b", "urls": [ "bzz-raw://57c74c3e17114c0aa5982815aab8cff5264c00317af1abe3620ee8acaca49ff9", "dweb:/ipfs/Qma45nAPXZU1MCDfuEBe1Fub6Qd7oumdyEqonGeqsPHXMQ" ], "license": "FSL-1.1-MIT" }, "contracts/interfaces/IDiamondCut.sol": { "keccak256": "0xe30dd72352453957dbc5d9f6b96369b1630c7abac4c2eb6fd49fc858317f99e3", "urls": [ "bzz-raw://55940b6e5e3ae666f6851b2deac40b10173a2636fcef15dbe7e44b94542e9cfa", "dweb:/ipfs/QmeVaPtmffSzEz3x4NgAJVjdjMTosM85JyCcX3eGF1Qpo1" ], "license": "FSL-1.1-MIT" }, "contracts/libraries/LibDiamond.sol": { "keccak256": "0xe411f7691d0554f8f01260065f249abda18eaa17697b626272c4e0554a2244b1", "urls": [ "bzz-raw://a116a9dcfd5dc8cef470e6c53c69bbaada930ebe9a7373a0a4a6c3924b77d7e8", "dweb:/ipfs/QmRxGt99hosAR5wxJpuTeXpyEV6DNb5fnxs76P2L2Bd34Y" ], "license": "FSL-1.1-MIT" } }, "version": 1 }