@settlemint/solidity-token-erc20-crowdsale
Version:
Smart contract set to build an ERC20 token sale in SettleMint
504 lines • 14.3 kB
JSON
{
"compiler": {
"version": "0.8.27+commit.40a35a09"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"internalType": "uint64",
"name": "startTimestamp",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "durationSeconds",
"type": "uint64"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"inputs": [],
"type": "error",
"name": "FailedCall"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"type": "error",
"name": "InsufficientBalance"
},
{
"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": "token",
"type": "address"
}
],
"type": "error",
"name": "SafeERC20FailedOperation"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address",
"indexed": true
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "ERC20Released",
"anonymous": false
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "EtherReleased",
"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": "view",
"type": "function",
"name": "duration",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "end",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"name": "releasable",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "releasable",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "release"
},
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "function",
"name": "release"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "released",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"name": "released",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "function",
"name": "renounceOwnership"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "start",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "transferOwnership"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "timestamp",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function",
"name": "vestedAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint64",
"name": "timestamp",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function",
"name": "vestedAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [],
"stateMutability": "payable",
"type": "receive"
}
],
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"details": "Sets the beneficiary (owner), the start timestamp and the vesting duration (in seconds) of the vesting wallet."
},
"duration()": {
"details": "Getter for the vesting duration."
},
"end()": {
"details": "Getter for the end timestamp."
},
"owner()": {
"details": "Returns the address of the current owner."
},
"releasable()": {
"details": "Getter for the amount of releasable eth."
},
"releasable(address)": {
"details": "Getter for the amount of releasable `token` tokens. `token` should be the address of an {IERC20} contract."
},
"release()": {
"details": "Release the native token (ether) that have already vested. Emits a {EtherReleased} event."
},
"release(address)": {
"details": "Release the tokens that have already vested. Emits a {ERC20Released} event."
},
"released()": {
"details": "Amount of eth already released"
},
"released(address)": {
"details": "Amount of token already released"
},
"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."
},
"start()": {
"details": "Getter for the start timestamp."
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
},
"vestedAmount(address,uint64)": {
"details": "Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve."
},
"vestedAmount(uint64)": {
"details": "Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"forge-std/=lib/forge-std/src/",
"hardhat/=node_modules/hardhat/"
],
"optimizer": {
"enabled": true,
"runs": 10000
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"node_modules/@openzeppelin/contracts/finance/VestingWallet.sol": "VestingWallet"
},
"evmVersion": "cancun",
"libraries": {},
"viaIR": true
},
"sources": {
"node_modules/@openzeppelin/contracts/access/Ownable.sol": {
"keccak256": "0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb",
"urls": [
"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6",
"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/finance/VestingWallet.sol": {
"keccak256": "0x79de2c47546e7d9e9785dff775e1cadda15fa877ff956f5b33b7a572e4d43e5c",
"urls": [
"bzz-raw://1c431f66acb879d3dba4f4e32a21efcad38b49983cfc0a31d49bfa95a738c9f6",
"dweb:/ipfs/QmQodRbcvFSLc7Cu6XXmGk75CZbsLmL1aZTtjeiDXVagtq"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol": {
"keccak256": "0x9b6b3e7803bc5f2f8cd7ad57db8ac1def61a9930a5a3107df4882e028a9605d7",
"urls": [
"bzz-raw://da62d6be1f5c6edf577f0cb45666a8aa9c2086a4bac87d95d65f02e2f4c36a4b",
"dweb:/ipfs/QmNkpvBpoCMvX8JwAFNSc5XxJ2q5BXJpL5L1txb4QkqVFF"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol": {
"keccak256": "0xde7e9fd9aee8d4f40772f96bb3b58836cbc6dfc0227014a061947f8821ea9724",
"urls": [
"bzz-raw://11fea9f8bc98949ac6709f0c1699db7430d2948137aa94d5a9e95a91f61a710a",
"dweb:/ipfs/QmQdfRXxQjwP6yn3DVo1GHPpriKNcFghSPi94Z1oKEFUNS"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol": {
"keccak256": "0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c",
"urls": [
"bzz-raw://a2608291cb038b388d80b79a06b6118a42f7894ff67b7da10ec0dbbf5b2973ba",
"dweb:/ipfs/QmWohqcBLbcxmA4eGPhZDXe5RYMMEEpFq22nfkaUMvTfw1"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"keccak256": "0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7",
"urls": [
"bzz-raw://df6f0c459663c9858b6cba2cda1d14a7d05a985bed6d2de72bd8e78c25ee79db",
"dweb:/ipfs/QmeTTxZ7qVk9rjEv2R4CpCwdf8UMCcRqDNMvzNxHc3Fnn9"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": {
"keccak256": "0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5",
"urls": [
"bzz-raw://8150ceb4ac947e8a442b2a9c017e01e880b2be2dd958f1fa9bc405f4c5a86508",
"dweb:/ipfs/QmbcBmFX66AY6Kbhnd5gx7zpkgqnUafo43XnmayAM7zVdB"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/utils/Address.sol": {
"keccak256": "0xaaa1d17c1129b127a4a401db2fbd72960e2671474be3d08cae71ccdc42f7624c",
"urls": [
"bzz-raw://cb2f27cd3952aa667e198fba0d9b7bcec52fbb12c16f013c25fe6fb52b29cc0e",
"dweb:/ipfs/QmeuohBFoeyDPZA9JNCTEDz3VBfBD4EABWuWXVhHAuEpKR"
],
"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/Errors.sol": {
"keccak256": "0x6afa713bfd42cf0f7656efa91201007ac465e42049d7de1d50753a373648c123",
"urls": [
"bzz-raw://ba1d02f4847670a1b83dec9f7d37f0b0418d6043447b69f3a29a5f9efc547fcf",
"dweb:/ipfs/QmQ7iH2keLNUKgq2xSWcRmuBE5eZ3F5whYAkAGzCNNoEWB"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"keccak256": "0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8",
"urls": [
"bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621",
"dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL"
],
"license": "MIT"
}
},
"version": 1
}