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.30+commit.73712a01" }, "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": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "contracts/Diamond.sol": "Diamond" }, "evmVersion": "cancun", "libraries": {}, "viaIR": true }, "sources": { "contracts/Diamond.sol": { "keccak256": "0x7e4bb0a2c35680e7dffed82af3c0cf6ef8a611cc03648b4ec8ce52f497d0339a", "urls": [ "bzz-raw://3ebfbd5db2a87567a0d5f4ea9545865a44d3f8a707b020bc249f3976820a2001", "dweb:/ipfs/QmTn54LDTPWst5VdzeCGrbrBGx4iFYrBsENVJhPVBaGXS4" ], "license": "FSL-1.1-MIT" }, "contracts/interfaces/IDiamond.sol": { "keccak256": "0xe64a3e7835e76770dde0a4ebd76518adf3625bad068d7f1ebf67226c8b9f45bb", "urls": [ "bzz-raw://ae31e558bc047906d9405946934b997f2422e89f90a7c401d14e6bed3288a7b3", "dweb:/ipfs/QmRz2yxg5EU7bQfKjV5v2BoBioSg4b3jS3B2Q26HUinjNH" ], "license": "FSL-1.1-MIT" }, "contracts/interfaces/IDiamondCut.sol": { "keccak256": "0xd5ceb83ab242c9121c7aaea777284a3f9a197fcf233c2f87a05894d3849a34c8", "urls": [ "bzz-raw://fc6be88f47cd1f40e4c37b9bff8028836baf85c04862c810c92644030474da2a", "dweb:/ipfs/QmRnNhYSUH3REeBJRgkNuEDPnFF34Dosae5BJaP7ZCCDBT" ], "license": "FSL-1.1-MIT" }, "contracts/libraries/LibDiamond.sol": { "keccak256": "0x3b1fb5d1225ab0ccf5ebb7b46ff0cf7b1e66157ade88e9b5282c1774c6ebcb42", "urls": [ "bzz-raw://265d5b848f2f4216931cabd38544cedf47c00003867ac8d5088d475bde6fa5f3", "dweb:/ipfs/QmSZTbb6BnCWJSfm3YtkoEJGHyhWSi3nwia7PjwsussBmM" ], "license": "FSL-1.1-MIT" } }, "version": 1 }