├── artifacts ├── contracts │ ├── DAI.sol │ │ └── DAI.dbg.json │ ├── DEW.sol │ │ └── DEW.dbg.json │ ├── Silver.sol │ │ └── Silver.dbg.json │ ├── CryptoSI.sol │ │ └── CryptoSI.dbg.json │ ├── SilverICO.sol │ │ └── SilverICO.dbg.json │ └── SilverPadFactory.sol │ │ └── SilverPadFactory.dbg.json ├── hardhat │ └── console.sol │ │ ├── console.dbg.json │ │ └── console.json └── @openzeppelin │ └── contracts │ ├── access │ └── Ownable.sol │ │ ├── Ownable.dbg.json │ │ └── Ownable.json │ ├── utils │ ├── Address.sol │ │ ├── Address.dbg.json │ │ └── Address.json │ ├── Context.sol │ │ ├── Context.dbg.json │ │ └── Context.json │ └── ReentrancyGuard.sol │ │ ├── ReentrancyGuard.dbg.json │ │ └── ReentrancyGuard.json │ ├── token │ └── ERC20 │ │ ├── ERC20.sol │ │ ├── ERC20.dbg.json │ │ └── ERC20.json │ │ ├── IERC20.sol │ │ ├── IERC20.dbg.json │ │ └── IERC20.json │ │ ├── utils │ │ └── SafeERC20.sol │ │ │ ├── SafeERC20.dbg.json │ │ │ └── SafeERC20.json │ │ └── extensions │ │ ├── IERC20Permit.sol │ │ ├── IERC20Permit.dbg.json │ │ └── IERC20Permit.json │ │ └── IERC20Metadata.sol │ │ ├── IERC20Metadata.dbg.json │ │ └── IERC20Metadata.json │ └── interfaces │ └── draft-IERC6093.sol │ ├── IERC20Errors.dbg.json │ ├── IERC721Errors.dbg.json │ ├── IERC1155Errors.dbg.json │ ├── IERC20Errors.json │ ├── IERC721Errors.json │ └── IERC1155Errors.json ├── typechain-types ├── factories │ ├── @openzeppelin │ │ ├── index.ts │ │ └── contracts │ │ │ ├── token │ │ │ ├── index.ts │ │ │ └── ERC20 │ │ │ │ ├── utils │ │ │ │ ├── index.ts │ │ │ │ └── SafeERC20__factory.ts │ │ │ │ ├── extensions │ │ │ │ ├── index.ts │ │ │ │ ├── IERC20Permit__factory.ts │ │ │ │ └── IERC20Metadata__factory.ts │ │ │ │ ├── index.ts │ │ │ │ ├── IERC20__factory.ts │ │ │ │ └── ERC20__factory.ts │ │ │ ├── access │ │ │ ├── index.ts │ │ │ └── Ownable__factory.ts │ │ │ ├── interfaces │ │ │ ├── index.ts │ │ │ └── draft-IERC6093.sol │ │ │ │ ├── index.ts │ │ │ │ ├── IERC20Errors__factory.ts │ │ │ │ ├── IERC721Errors__factory.ts │ │ │ │ └── IERC1155Errors__factory.ts │ │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── ReentrancyGuard__factory.ts │ │ │ └── Address__factory.ts │ │ │ └── index.ts │ ├── index.ts │ └── contracts │ │ └── index.ts ├── @openzeppelin │ ├── contracts │ │ ├── access │ │ │ ├── index.ts │ │ │ └── Ownable.ts │ │ ├── token │ │ │ ├── ERC20 │ │ │ │ ├── utils │ │ │ │ │ ├── index.ts │ │ │ │ │ └── SafeERC20.ts │ │ │ │ ├── extensions │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── IERC20Permit.ts │ │ │ │ │ └── IERC20Metadata.ts │ │ │ │ ├── index.ts │ │ │ │ ├── IERC20.ts │ │ │ │ └── ERC20.ts │ │ │ └── index.ts │ │ ├── interfaces │ │ │ ├── index.ts │ │ │ └── draft-IERC6093.sol │ │ │ │ ├── index.ts │ │ │ │ ├── IERC20Errors.ts │ │ │ │ ├── IERC721Errors.ts │ │ │ │ └── IERC1155Errors.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── Address.ts │ │ │ └── ReentrancyGuard.ts │ │ └── index.ts │ └── index.ts ├── contracts │ ├── index.ts │ ├── DAI.ts │ ├── DEW.ts │ ├── CryptoSI.ts │ └── SilverICO.ts ├── index.ts └── common.ts ├── tsconfig.json ├── contracts ├── DEW.sol ├── DAI.sol ├── CryptoSI.sol ├── SilverICO.sol └── SilverPadFactory.sol ├── package.json ├── scripts ├── deploy_factory.ts └── deploy_ERC20.ts ├── LICENSE ├── README.md ├── .gitignore ├── hardhat.config.ts └── test └── factory.ts /artifacts/contracts/DAI.sol/DAI.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/contracts/DEW.sol/DEW.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/contracts/Silver.sol/Silver.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/hardhat/console.sol/console.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/contracts/CryptoSI.sol/CryptoSI.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/contracts/SilverICO.sol/SilverICO.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/contracts/SilverPadFactory.sol/SilverPadFactory.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as contracts from "./contracts"; 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/access/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { Ownable } from "./Ownable"; 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as erc20 from "./ERC20"; 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { SafeERC20 } from "./SafeERC20"; 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type * as contracts from "./contracts"; 5 | export type { contracts }; 6 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type * as erc20 from "./ERC20"; 5 | export type { erc20 }; 6 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/access/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { Ownable__factory } from "./Ownable__factory"; 5 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as draftIerc6093Sol from "./draft-IERC6093.sol"; 5 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/factories/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as openzeppelin from "./@openzeppelin"; 5 | export * as contracts from "./contracts"; 6 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "..\\..\\..\\..\\..\\..\\build-info\\0d41807e819b6738e66c7f794591f6b7.json" 4 | } 5 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { SafeERC20__factory } from "./SafeERC20__factory"; 5 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type * as draftIerc6093Sol from "./draft-IERC6093.sol"; 5 | export type { draftIerc6093Sol }; 6 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { Address } from "./Address"; 5 | export type { ReentrancyGuard } from "./ReentrancyGuard"; 6 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { IERC20Metadata } from "./IERC20Metadata"; 5 | export type { IERC20Permit } from "./IERC20Permit"; 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { Address__factory } from "./Address__factory"; 5 | export { ReentrancyGuard__factory } from "./ReentrancyGuard__factory"; 6 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as access from "./access"; 5 | export * as interfaces from "./interfaces"; 6 | export * as token from "./token"; 7 | export * as utils from "./utils"; 8 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { IERC20Metadata__factory } from "./IERC20Metadata__factory"; 5 | export { IERC20Permit__factory } from "./IERC20Permit__factory"; 6 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { IERC1155Errors } from "./IERC1155Errors"; 5 | export type { IERC20Errors } from "./IERC20Errors"; 6 | export type { IERC721Errors } from "./IERC721Errors"; 7 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Context", 4 | "sourceName": "@openzeppelin/contracts/utils/Context.sol", 5 | "abi": [], 6 | "bytecode": "0x", 7 | "deployedBytecode": "0x", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as extensions from "./extensions"; 5 | export * as utils from "./utils"; 6 | export { ERC20__factory } from "./ERC20__factory"; 7 | export { IERC20__factory } from "./IERC20__factory"; 8 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { IERC1155Errors__factory } from "./IERC1155Errors__factory"; 5 | export { IERC20Errors__factory } from "./IERC20Errors__factory"; 6 | export { IERC721Errors__factory } from "./IERC721Errors__factory"; 7 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type * as extensions from "./extensions"; 5 | export type { extensions }; 6 | import type * as utils from "./utils"; 7 | export type { utils }; 8 | export type { ERC20 } from "./ERC20"; 9 | export type { IERC20 } from "./IERC20"; 10 | -------------------------------------------------------------------------------- /typechain-types/contracts/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { CryptoSI } from "./CryptoSI"; 5 | export type { DAI } from "./DAI"; 6 | export type { DEW } from "./DEW"; 7 | export type { Silver } from "./Silver"; 8 | export type { SilverICO } from "./SilverICO"; 9 | export type { SilverPadFactory } from "./SilverPadFactory"; 10 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type * as access from "./access"; 5 | export type { access }; 6 | import type * as interfaces from "./interfaces"; 7 | export type { interfaces }; 8 | import type * as token from "./token"; 9 | export type { token }; 10 | import type * as utils from "./utils"; 11 | export type { utils }; 12 | -------------------------------------------------------------------------------- /typechain-types/factories/contracts/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { CryptoSI__factory } from "./CryptoSI__factory"; 5 | export { DAI__factory } from "./DAI__factory"; 6 | export { DEW__factory } from "./DEW__factory"; 7 | export { Silver__factory } from "./Silver__factory"; 8 | export { SilverICO__factory } from "./SilverICO__factory"; 9 | export { SilverPadFactory__factory } from "./SilverPadFactory__factory"; 10 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "ReentrancyGuard", 4 | "sourceName": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", 5 | "abi": [ 6 | { 7 | "inputs": [], 8 | "name": "ReentrancyGuardReentrantCall", 9 | "type": "error" 10 | } 11 | ], 12 | "bytecode": "0x", 13 | "deployedBytecode": "0x", 14 | "linkReferences": {}, 15 | "deployedLinkReferences": {} 16 | } 17 | -------------------------------------------------------------------------------- /contracts/DEW.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.24; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract DEW is ERC20 { 7 | constructor() ERC20("DEW", "Dreams Evolving Widely") { 8 | _mint(msg.sender, 1000000000 * 10 ** 18); 9 | } 10 | 11 | function mint(address account, uint256 amount) public { 12 | _mint(account, amount); 13 | } 14 | 15 | function burn(address account, uint256 amount) public { 16 | _burn(account, amount); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /contracts/DAI.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.24; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract DAI is ERC20 { 7 | constructor(uint256 initialSupply) ERC20("DAI Coin", "DAI") { 8 | _mint(msg.sender, initialSupply * 10 ** 18); 9 | } 10 | 11 | function mint(address account, uint256 amount) public { 12 | _mint(account, amount); 13 | } 14 | 15 | function burn(address account, uint256 amount) public { 16 | _burn(account, amount); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /contracts/CryptoSI.sol: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.24; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract CryptoSI is ERC20 { 7 | constructor() ERC20("CryptoSI DAODAO GROWING", "CRYPTOSI") { 8 | _mint(msg.sender, 1000000000 * 10 ** 18); 9 | } 10 | 11 | function mint(address account, uint256 amount) public { 12 | _mint(account, amount); 13 | } 14 | 15 | function burn(address account, uint256 amount) public { 16 | _burn(account, amount); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /artifacts/hardhat/console.sol/console.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "console", 4 | "sourceName": "hardhat/console.sol", 5 | "abi": [], 6 | "bytecode": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea26469706673582212205d108a1b9b40e68886a7e29ce0d9d0a2f056d1a0c4ef4c643bee025ebe8910db64736f6c63430008180033", 7 | "deployedBytecode": "0x600080fdfea26469706673582212205d108a1b9b40e68886a7e29ce0d9d0a2f056d1a0c4ef4c643bee025ebe8910db64736f6c63430008180033", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "silverpad_contract", 3 | "version": "1.0.0", 4 | "description": "This project demonstrates a basic Hardhat use case. It comes with a SilverPad contract, a test for that contract, and a Hardhat Ignition module that deploys that contract.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@nomicfoundation/hardhat-verify": "^2.0.10", 14 | "@openzeppelin/contracts": "^5.0.2", 15 | "@openzeppelin/contracts-upgradeable": "^5.0.2", 16 | "dotenv": "^16.4.5", 17 | "hardhat": "^2.22.10" 18 | }, 19 | "devDependencies": { 20 | "@nomicfoundation/hardhat-toolbox": "^5.0.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scripts/deploy_factory.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | 3 | async function main() { 4 | const [deployer] = await ethers.getSigners(); 5 | 6 | /////Early Liquidity 7 | const dai = "0xdc1a36bc15d5255Bb7061ec78e735e5C4dA4Ce5e"; 8 | const dao = "0x5B98a0c38d3684644A9Ada0baaeAae452aE3267B" 9 | 10 | console.log("Deploying SilverPadFactory contracts with the account:", deployer.address); 11 | const FACTORY = await ethers.getContractFactory("SilverPadFactory"); 12 | const factory = await FACTORY.deploy(dai, dao); 13 | await factory.waitForDeployment(); 14 | console.log("factory address:", await factory.getAddress()); 15 | //https://sepolia.etherscan.io/address/0x0a86feB19b48Ad6ACDf1A476b4757A1abc3Ee82a#code 16 | } 17 | 18 | main() 19 | .then(() => process.exit(0)) 20 | .catch((error) => { 21 | console.error(error); 22 | process.exit(1); 23 | }); 24 | -------------------------------------------------------------------------------- /scripts/deploy_ERC20.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | 3 | async function main() { 4 | const [deployer] = await ethers.getSigners(); 5 | /////Early Liquidity 6 | console.log("Deploying DAI token contracts with the account:", deployer.address); 7 | const DAI = await ethers.getContractFactory("DAI"); 8 | const daiToken = await DAI.deploy(1000000000); 9 | await daiToken.waitForDeployment(); 10 | console.log("DAI address:", await daiToken.getAddress()); 11 | 12 | console.log("Deploying DEW token contracts with the account:", deployer.address); 13 | const DEW = await ethers.getContractFactory("DEW"); 14 | const dewToken = await DEW.deploy(); 15 | await dewToken.waitForDeployment(); 16 | console.log("DEW address:", await dewToken.getAddress()); 17 | 18 | } 19 | 20 | main() 21 | .then(() => process.exit(0)) 22 | .catch((error) => { 23 | console.error(error); 24 | process.exit(1); 25 | }); 26 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | ReentrancyGuard, 8 | ReentrancyGuardInterface, 9 | } from "../../../../@openzeppelin/contracts/utils/ReentrancyGuard"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [], 14 | name: "ReentrancyGuardReentrantCall", 15 | type: "error", 16 | }, 17 | ] as const; 18 | 19 | export class ReentrancyGuard__factory { 20 | static readonly abi = _abi; 21 | static createInterface(): ReentrancyGuardInterface { 22 | return new Interface(_abi) as ReentrancyGuardInterface; 23 | } 24 | static connect( 25 | address: string, 26 | runner?: ContractRunner | null 27 | ): ReentrancyGuard { 28 | return new Contract(address, _abi, runner) as unknown as ReentrancyGuard; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 MARK 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Address", 4 | "sourceName": "@openzeppelin/contracts/utils/Address.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "target", 11 | "type": "address" 12 | } 13 | ], 14 | "name": "AddressEmptyCode", 15 | "type": "error" 16 | }, 17 | { 18 | "inputs": [ 19 | { 20 | "internalType": "address", 21 | "name": "account", 22 | "type": "address" 23 | } 24 | ], 25 | "name": "AddressInsufficientBalance", 26 | "type": "error" 27 | }, 28 | { 29 | "inputs": [], 30 | "name": "FailedInnerCall", 31 | "type": "error" 32 | } 33 | ], 34 | "bytecode": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea2646970667358221220d35ba930de102c841b8435ba2bfdaaf0ecdc72baf4aaeda2c8b00113597796b164736f6c63430008180033", 35 | "deployedBytecode": "0x600080fdfea2646970667358221220d35ba930de102c841b8435ba2bfdaaf0ecdc72baf4aaeda2c8b00113597796b164736f6c63430008180033", 36 | "linkReferences": {}, 37 | "deployedLinkReferences": {} 38 | } 39 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "SafeERC20", 4 | "sourceName": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "spender", 11 | "type": "address" 12 | }, 13 | { 14 | "internalType": "uint256", 15 | "name": "currentAllowance", 16 | "type": "uint256" 17 | }, 18 | { 19 | "internalType": "uint256", 20 | "name": "requestedDecrease", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "SafeERC20FailedDecreaseAllowance", 25 | "type": "error" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "token", 32 | "type": "address" 33 | } 34 | ], 35 | "name": "SafeERC20FailedOperation", 36 | "type": "error" 37 | } 38 | ], 39 | "bytecode": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea26469706673582212208c8af14e6fe45d8f3c53171ab2a00b35ad7b1e721e25bb073a2e6bd75edd4d6c64736f6c63430008180033", 40 | "deployedBytecode": "0x600080fdfea26469706673582212208c8af14e6fe45d8f3c53171ab2a00b35ad7b1e721e25bb073a2e6bd75edd4d6c64736f6c63430008180033", 41 | "linkReferences": {}, 42 | "deployedLinkReferences": {} 43 | } 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SilverPad Contract 2 | 3 | A robust decentralized ICO (Initial Coin Offering) platform built on Ethereum, leveraging Hardhat for development and testing. SilverPad Contract provides a secure and efficient token launch system with comprehensive safety mechanisms. 4 | 5 | ## Overview 6 | 7 | SilverPad Contract enables projects to launch their tokens through a secure and transparent ICO process, with built-in protections for both token creators and investors. 8 | 9 | ## Key Features 10 | 11 | ### Token Launch System 12 | - Configurable ICO parameters 13 | - Customizable softcap and hardcap 14 | - Flexible duration settings 15 | - Dynamic token pricing 16 | - Supply Management Controls 17 | - Real-time Launch Monitoring 18 | 19 | ### Investment Protection 20 | - Secure Transaction Processing 21 | - Built-in Safety Validations 22 | - Transparent Fund Management 23 | 24 | ### Smart Contract Architecture 25 | - ERC20 Token Implementation 26 | - Multiple Token Support (DAI, DEW) 27 | - Automated Deployment Scripts 28 | 29 | ## Technical Stack 30 | - Solidity Smart Contracts 31 | - Hardhat Development Environment 32 | - TypeScript for Deployment Scripts 33 | - OpenZeppelin Contract Standards 34 | - Ethers.js Library 35 | 36 | ## Getting Started 37 | 38 | ### Prerequisites 39 | ```bash 40 | npm install 41 | ``` 42 | 43 | ### Environment Setup 44 | ```bash 45 | cp .env.example .env 46 | ``` 47 | 48 | ### Deployment 49 | ```bash 50 | npx hardhat run scripts/deploy.ts --network 51 | ``` 52 | 53 | ### Testing 54 | ```bash 55 | npx hardhat test 56 | ``` 57 | 58 | ## Security Considerations 59 | 60 | - Multi-layered Security Checks 61 | - Standard Audit Compliance 62 | - Protected Investment Mechanisms 63 | 64 | ## Contribution 65 | 66 | 1. Fork the repository 67 | 2. Create your feature branch (`git checkout -b feature/AmazingFeature`) 68 | 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) 69 | 4. Push to the branch (`git push origin feature/AmazingFeature`) 70 | 5. Open a pull request 71 | 72 | ## License 73 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 74 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Ownable", 4 | "sourceName": "@openzeppelin/contracts/access/Ownable.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "owner", 11 | "type": "address" 12 | } 13 | ], 14 | "name": "OwnableInvalidOwner", 15 | "type": "error" 16 | }, 17 | { 18 | "inputs": [ 19 | { 20 | "internalType": "address", 21 | "name": "account", 22 | "type": "address" 23 | } 24 | ], 25 | "name": "OwnableUnauthorizedAccount", 26 | "type": "error" 27 | }, 28 | { 29 | "anonymous": false, 30 | "inputs": [ 31 | { 32 | "indexed": true, 33 | "internalType": "address", 34 | "name": "previousOwner", 35 | "type": "address" 36 | }, 37 | { 38 | "indexed": true, 39 | "internalType": "address", 40 | "name": "newOwner", 41 | "type": "address" 42 | } 43 | ], 44 | "name": "OwnershipTransferred", 45 | "type": "event" 46 | }, 47 | { 48 | "inputs": [], 49 | "name": "owner", 50 | "outputs": [ 51 | { 52 | "internalType": "address", 53 | "name": "", 54 | "type": "address" 55 | } 56 | ], 57 | "stateMutability": "view", 58 | "type": "function" 59 | }, 60 | { 61 | "inputs": [], 62 | "name": "renounceOwnership", 63 | "outputs": [], 64 | "stateMutability": "nonpayable", 65 | "type": "function" 66 | }, 67 | { 68 | "inputs": [ 69 | { 70 | "internalType": "address", 71 | "name": "newOwner", 72 | "type": "address" 73 | } 74 | ], 75 | "name": "transferOwnership", 76 | "outputs": [], 77 | "stateMutability": "nonpayable", 78 | "type": "function" 79 | } 80 | ], 81 | "bytecode": "0x", 82 | "deployedBytecode": "0x", 83 | "linkReferences": {}, 84 | "deployedLinkReferences": {} 85 | } 86 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC20Permit", 4 | "sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", 5 | "abi": [ 6 | { 7 | "inputs": [], 8 | "name": "DOMAIN_SEPARATOR", 9 | "outputs": [ 10 | { 11 | "internalType": "bytes32", 12 | "name": "", 13 | "type": "bytes32" 14 | } 15 | ], 16 | "stateMutability": "view", 17 | "type": "function" 18 | }, 19 | { 20 | "inputs": [ 21 | { 22 | "internalType": "address", 23 | "name": "owner", 24 | "type": "address" 25 | } 26 | ], 27 | "name": "nonces", 28 | "outputs": [ 29 | { 30 | "internalType": "uint256", 31 | "name": "", 32 | "type": "uint256" 33 | } 34 | ], 35 | "stateMutability": "view", 36 | "type": "function" 37 | }, 38 | { 39 | "inputs": [ 40 | { 41 | "internalType": "address", 42 | "name": "owner", 43 | "type": "address" 44 | }, 45 | { 46 | "internalType": "address", 47 | "name": "spender", 48 | "type": "address" 49 | }, 50 | { 51 | "internalType": "uint256", 52 | "name": "value", 53 | "type": "uint256" 54 | }, 55 | { 56 | "internalType": "uint256", 57 | "name": "deadline", 58 | "type": "uint256" 59 | }, 60 | { 61 | "internalType": "uint8", 62 | "name": "v", 63 | "type": "uint8" 64 | }, 65 | { 66 | "internalType": "bytes32", 67 | "name": "r", 68 | "type": "bytes32" 69 | }, 70 | { 71 | "internalType": "bytes32", 72 | "name": "s", 73 | "type": "bytes32" 74 | } 75 | ], 76 | "name": "permit", 77 | "outputs": [], 78 | "stateMutability": "nonpayable", 79 | "type": "function" 80 | } 81 | ], 82 | "bytecode": "0x", 83 | "deployedBytecode": "0x", 84 | "linkReferences": {}, 85 | "deployedLinkReferences": {} 86 | } 87 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/utils/Address.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | FunctionFragment, 7 | Interface, 8 | ContractRunner, 9 | ContractMethod, 10 | Listener, 11 | } from "ethers"; 12 | import type { 13 | TypedContractEvent, 14 | TypedDeferredTopicFilter, 15 | TypedEventLog, 16 | TypedListener, 17 | } from "../../../common"; 18 | 19 | export interface AddressInterface extends Interface {} 20 | 21 | export interface Address extends BaseContract { 22 | connect(runner?: ContractRunner | null): Address; 23 | waitForDeployment(): Promise; 24 | 25 | interface: AddressInterface; 26 | 27 | queryFilter( 28 | event: TCEvent, 29 | fromBlockOrBlockhash?: string | number | undefined, 30 | toBlock?: string | number | undefined 31 | ): Promise>>; 32 | queryFilter( 33 | filter: TypedDeferredTopicFilter, 34 | fromBlockOrBlockhash?: string | number | undefined, 35 | toBlock?: string | number | undefined 36 | ): Promise>>; 37 | 38 | on( 39 | event: TCEvent, 40 | listener: TypedListener 41 | ): Promise; 42 | on( 43 | filter: TypedDeferredTopicFilter, 44 | listener: TypedListener 45 | ): Promise; 46 | 47 | once( 48 | event: TCEvent, 49 | listener: TypedListener 50 | ): Promise; 51 | once( 52 | filter: TypedDeferredTopicFilter, 53 | listener: TypedListener 54 | ): Promise; 55 | 56 | listeners( 57 | event: TCEvent 58 | ): Promise>>; 59 | listeners(eventName?: string): Promise>; 60 | removeAllListeners( 61 | event?: TCEvent 62 | ): Promise; 63 | 64 | getFunction( 65 | key: string | FunctionFragment 66 | ): T; 67 | 68 | filters: {}; 69 | } 70 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | FunctionFragment, 7 | Interface, 8 | ContractRunner, 9 | ContractMethod, 10 | Listener, 11 | } from "ethers"; 12 | import type { 13 | TypedContractEvent, 14 | TypedDeferredTopicFilter, 15 | TypedEventLog, 16 | TypedListener, 17 | } from "../../../../../common"; 18 | 19 | export interface SafeERC20Interface extends Interface {} 20 | 21 | export interface SafeERC20 extends BaseContract { 22 | connect(runner?: ContractRunner | null): SafeERC20; 23 | waitForDeployment(): Promise; 24 | 25 | interface: SafeERC20Interface; 26 | 27 | queryFilter( 28 | event: TCEvent, 29 | fromBlockOrBlockhash?: string | number | undefined, 30 | toBlock?: string | number | undefined 31 | ): Promise>>; 32 | queryFilter( 33 | filter: TypedDeferredTopicFilter, 34 | fromBlockOrBlockhash?: string | number | undefined, 35 | toBlock?: string | number | undefined 36 | ): Promise>>; 37 | 38 | on( 39 | event: TCEvent, 40 | listener: TypedListener 41 | ): Promise; 42 | on( 43 | filter: TypedDeferredTopicFilter, 44 | listener: TypedListener 45 | ): Promise; 46 | 47 | once( 48 | event: TCEvent, 49 | listener: TypedListener 50 | ): Promise; 51 | once( 52 | filter: TypedDeferredTopicFilter, 53 | listener: TypedListener 54 | ): Promise; 55 | 56 | listeners( 57 | event: TCEvent 58 | ): Promise>>; 59 | listeners(eventName?: string): Promise>; 60 | removeAllListeners( 61 | event?: TCEvent 62 | ): Promise; 63 | 64 | getFunction( 65 | key: string | FunctionFragment 66 | ): T; 67 | 68 | filters: {}; 69 | } 70 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/utils/ReentrancyGuard.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | FunctionFragment, 7 | Interface, 8 | ContractRunner, 9 | ContractMethod, 10 | Listener, 11 | } from "ethers"; 12 | import type { 13 | TypedContractEvent, 14 | TypedDeferredTopicFilter, 15 | TypedEventLog, 16 | TypedListener, 17 | } from "../../../common"; 18 | 19 | export interface ReentrancyGuardInterface extends Interface {} 20 | 21 | export interface ReentrancyGuard extends BaseContract { 22 | connect(runner?: ContractRunner | null): ReentrancyGuard; 23 | waitForDeployment(): Promise; 24 | 25 | interface: ReentrancyGuardInterface; 26 | 27 | queryFilter( 28 | event: TCEvent, 29 | fromBlockOrBlockhash?: string | number | undefined, 30 | toBlock?: string | number | undefined 31 | ): Promise>>; 32 | queryFilter( 33 | filter: TypedDeferredTopicFilter, 34 | fromBlockOrBlockhash?: string | number | undefined, 35 | toBlock?: string | number | undefined 36 | ): Promise>>; 37 | 38 | on( 39 | event: TCEvent, 40 | listener: TypedListener 41 | ): Promise; 42 | on( 43 | filter: TypedDeferredTopicFilter, 44 | listener: TypedListener 45 | ): Promise; 46 | 47 | once( 48 | event: TCEvent, 49 | listener: TypedListener 50 | ): Promise; 51 | once( 52 | filter: TypedDeferredTopicFilter, 53 | listener: TypedListener 54 | ): Promise; 55 | 56 | listeners( 57 | event: TCEvent 58 | ): Promise>>; 59 | listeners(eventName?: string): Promise>; 60 | removeAllListeners( 61 | event?: TCEvent 62 | ): Promise; 63 | 64 | getFunction( 65 | key: string | FunctionFragment 66 | ): T; 67 | 68 | filters: {}; 69 | } 70 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | FunctionFragment, 7 | Interface, 8 | ContractRunner, 9 | ContractMethod, 10 | Listener, 11 | } from "ethers"; 12 | import type { 13 | TypedContractEvent, 14 | TypedDeferredTopicFilter, 15 | TypedEventLog, 16 | TypedListener, 17 | } from "../../../../common"; 18 | 19 | export interface IERC20ErrorsInterface extends Interface {} 20 | 21 | export interface IERC20Errors extends BaseContract { 22 | connect(runner?: ContractRunner | null): IERC20Errors; 23 | waitForDeployment(): Promise; 24 | 25 | interface: IERC20ErrorsInterface; 26 | 27 | queryFilter( 28 | event: TCEvent, 29 | fromBlockOrBlockhash?: string | number | undefined, 30 | toBlock?: string | number | undefined 31 | ): Promise>>; 32 | queryFilter( 33 | filter: TypedDeferredTopicFilter, 34 | fromBlockOrBlockhash?: string | number | undefined, 35 | toBlock?: string | number | undefined 36 | ): Promise>>; 37 | 38 | on( 39 | event: TCEvent, 40 | listener: TypedListener 41 | ): Promise; 42 | on( 43 | filter: TypedDeferredTopicFilter, 44 | listener: TypedListener 45 | ): Promise; 46 | 47 | once( 48 | event: TCEvent, 49 | listener: TypedListener 50 | ): Promise; 51 | once( 52 | filter: TypedDeferredTopicFilter, 53 | listener: TypedListener 54 | ): Promise; 55 | 56 | listeners( 57 | event: TCEvent 58 | ): Promise>>; 59 | listeners(eventName?: string): Promise>; 60 | removeAllListeners( 61 | event?: TCEvent 62 | ): Promise; 63 | 64 | getFunction( 65 | key: string | FunctionFragment 66 | ): T; 67 | 68 | filters: {}; 69 | } 70 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | FunctionFragment, 7 | Interface, 8 | ContractRunner, 9 | ContractMethod, 10 | Listener, 11 | } from "ethers"; 12 | import type { 13 | TypedContractEvent, 14 | TypedDeferredTopicFilter, 15 | TypedEventLog, 16 | TypedListener, 17 | } from "../../../../common"; 18 | 19 | export interface IERC721ErrorsInterface extends Interface {} 20 | 21 | export interface IERC721Errors extends BaseContract { 22 | connect(runner?: ContractRunner | null): IERC721Errors; 23 | waitForDeployment(): Promise; 24 | 25 | interface: IERC721ErrorsInterface; 26 | 27 | queryFilter( 28 | event: TCEvent, 29 | fromBlockOrBlockhash?: string | number | undefined, 30 | toBlock?: string | number | undefined 31 | ): Promise>>; 32 | queryFilter( 33 | filter: TypedDeferredTopicFilter, 34 | fromBlockOrBlockhash?: string | number | undefined, 35 | toBlock?: string | number | undefined 36 | ): Promise>>; 37 | 38 | on( 39 | event: TCEvent, 40 | listener: TypedListener 41 | ): Promise; 42 | on( 43 | filter: TypedDeferredTopicFilter, 44 | listener: TypedListener 45 | ): Promise; 46 | 47 | once( 48 | event: TCEvent, 49 | listener: TypedListener 50 | ): Promise; 51 | once( 52 | filter: TypedDeferredTopicFilter, 53 | listener: TypedListener 54 | ): Promise; 55 | 56 | listeners( 57 | event: TCEvent 58 | ): Promise>>; 59 | listeners(eventName?: string): Promise>; 60 | removeAllListeners( 61 | event?: TCEvent 62 | ): Promise; 63 | 64 | getFunction( 65 | key: string | FunctionFragment 66 | ): T; 67 | 68 | filters: {}; 69 | } 70 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | FunctionFragment, 7 | Interface, 8 | ContractRunner, 9 | ContractMethod, 10 | Listener, 11 | } from "ethers"; 12 | import type { 13 | TypedContractEvent, 14 | TypedDeferredTopicFilter, 15 | TypedEventLog, 16 | TypedListener, 17 | } from "../../../../common"; 18 | 19 | export interface IERC1155ErrorsInterface extends Interface {} 20 | 21 | export interface IERC1155Errors extends BaseContract { 22 | connect(runner?: ContractRunner | null): IERC1155Errors; 23 | waitForDeployment(): Promise; 24 | 25 | interface: IERC1155ErrorsInterface; 26 | 27 | queryFilter( 28 | event: TCEvent, 29 | fromBlockOrBlockhash?: string | number | undefined, 30 | toBlock?: string | number | undefined 31 | ): Promise>>; 32 | queryFilter( 33 | filter: TypedDeferredTopicFilter, 34 | fromBlockOrBlockhash?: string | number | undefined, 35 | toBlock?: string | number | undefined 36 | ): Promise>>; 37 | 38 | on( 39 | event: TCEvent, 40 | listener: TypedListener 41 | ): Promise; 42 | on( 43 | filter: TypedDeferredTopicFilter, 44 | listener: TypedListener 45 | ): Promise; 46 | 47 | once( 48 | event: TCEvent, 49 | listener: TypedListener 50 | ): Promise; 51 | once( 52 | filter: TypedDeferredTopicFilter, 53 | listener: TypedListener 54 | ): Promise; 55 | 56 | listeners( 57 | event: TCEvent 58 | ): Promise>>; 59 | listeners(eventName?: string): Promise>; 60 | removeAllListeners( 61 | event?: TCEvent 62 | ): Promise; 63 | 64 | getFunction( 65 | key: string | FunctionFragment 66 | ): T; 67 | 68 | filters: {}; 69 | } 70 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | Ownable, 8 | OwnableInterface, 9 | } from "../../../../@openzeppelin/contracts/access/Ownable"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [ 14 | { 15 | internalType: "address", 16 | name: "owner", 17 | type: "address", 18 | }, 19 | ], 20 | name: "OwnableInvalidOwner", 21 | type: "error", 22 | }, 23 | { 24 | inputs: [ 25 | { 26 | internalType: "address", 27 | name: "account", 28 | type: "address", 29 | }, 30 | ], 31 | name: "OwnableUnauthorizedAccount", 32 | type: "error", 33 | }, 34 | { 35 | anonymous: false, 36 | inputs: [ 37 | { 38 | indexed: true, 39 | internalType: "address", 40 | name: "previousOwner", 41 | type: "address", 42 | }, 43 | { 44 | indexed: true, 45 | internalType: "address", 46 | name: "newOwner", 47 | type: "address", 48 | }, 49 | ], 50 | name: "OwnershipTransferred", 51 | type: "event", 52 | }, 53 | { 54 | inputs: [], 55 | name: "owner", 56 | outputs: [ 57 | { 58 | internalType: "address", 59 | name: "", 60 | type: "address", 61 | }, 62 | ], 63 | stateMutability: "view", 64 | type: "function", 65 | }, 66 | { 67 | inputs: [], 68 | name: "renounceOwnership", 69 | outputs: [], 70 | stateMutability: "nonpayable", 71 | type: "function", 72 | }, 73 | { 74 | inputs: [ 75 | { 76 | internalType: "address", 77 | name: "newOwner", 78 | type: "address", 79 | }, 80 | ], 81 | name: "transferOwnership", 82 | outputs: [], 83 | stateMutability: "nonpayable", 84 | type: "function", 85 | }, 86 | ] as const; 87 | 88 | export class Ownable__factory { 89 | static readonly abi = _abi; 90 | static createInterface(): OwnableInterface { 91 | return new Interface(_abi) as OwnableInterface; 92 | } 93 | static connect(address: string, runner?: ContractRunner | null): Ownable { 94 | return new Contract(address, _abi, runner) as unknown as Ownable; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC20Errors", 4 | "sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "spender", 11 | "type": "address" 12 | }, 13 | { 14 | "internalType": "uint256", 15 | "name": "allowance", 16 | "type": "uint256" 17 | }, 18 | { 19 | "internalType": "uint256", 20 | "name": "needed", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "ERC20InsufficientAllowance", 25 | "type": "error" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "sender", 32 | "type": "address" 33 | }, 34 | { 35 | "internalType": "uint256", 36 | "name": "balance", 37 | "type": "uint256" 38 | }, 39 | { 40 | "internalType": "uint256", 41 | "name": "needed", 42 | "type": "uint256" 43 | } 44 | ], 45 | "name": "ERC20InsufficientBalance", 46 | "type": "error" 47 | }, 48 | { 49 | "inputs": [ 50 | { 51 | "internalType": "address", 52 | "name": "approver", 53 | "type": "address" 54 | } 55 | ], 56 | "name": "ERC20InvalidApprover", 57 | "type": "error" 58 | }, 59 | { 60 | "inputs": [ 61 | { 62 | "internalType": "address", 63 | "name": "receiver", 64 | "type": "address" 65 | } 66 | ], 67 | "name": "ERC20InvalidReceiver", 68 | "type": "error" 69 | }, 70 | { 71 | "inputs": [ 72 | { 73 | "internalType": "address", 74 | "name": "sender", 75 | "type": "address" 76 | } 77 | ], 78 | "name": "ERC20InvalidSender", 79 | "type": "error" 80 | }, 81 | { 82 | "inputs": [ 83 | { 84 | "internalType": "address", 85 | "name": "spender", 86 | "type": "address" 87 | } 88 | ], 89 | "name": "ERC20InvalidSpender", 90 | "type": "error" 91 | } 92 | ], 93 | "bytecode": "0x", 94 | "deployedBytecode": "0x", 95 | "linkReferences": {}, 96 | "deployedLinkReferences": {} 97 | } 98 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | IERC20Permit, 8 | IERC20PermitInterface, 9 | } from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [], 14 | name: "DOMAIN_SEPARATOR", 15 | outputs: [ 16 | { 17 | internalType: "bytes32", 18 | name: "", 19 | type: "bytes32", 20 | }, 21 | ], 22 | stateMutability: "view", 23 | type: "function", 24 | }, 25 | { 26 | inputs: [ 27 | { 28 | internalType: "address", 29 | name: "owner", 30 | type: "address", 31 | }, 32 | ], 33 | name: "nonces", 34 | outputs: [ 35 | { 36 | internalType: "uint256", 37 | name: "", 38 | type: "uint256", 39 | }, 40 | ], 41 | stateMutability: "view", 42 | type: "function", 43 | }, 44 | { 45 | inputs: [ 46 | { 47 | internalType: "address", 48 | name: "owner", 49 | type: "address", 50 | }, 51 | { 52 | internalType: "address", 53 | name: "spender", 54 | type: "address", 55 | }, 56 | { 57 | internalType: "uint256", 58 | name: "value", 59 | type: "uint256", 60 | }, 61 | { 62 | internalType: "uint256", 63 | name: "deadline", 64 | type: "uint256", 65 | }, 66 | { 67 | internalType: "uint8", 68 | name: "v", 69 | type: "uint8", 70 | }, 71 | { 72 | internalType: "bytes32", 73 | name: "r", 74 | type: "bytes32", 75 | }, 76 | { 77 | internalType: "bytes32", 78 | name: "s", 79 | type: "bytes32", 80 | }, 81 | ], 82 | name: "permit", 83 | outputs: [], 84 | stateMutability: "nonpayable", 85 | type: "function", 86 | }, 87 | ] as const; 88 | 89 | export class IERC20Permit__factory { 90 | static readonly abi = _abi; 91 | static createInterface(): IERC20PermitInterface { 92 | return new Interface(_abi) as IERC20PermitInterface; 93 | } 94 | static connect( 95 | address: string, 96 | runner?: ContractRunner | null 97 | ): IERC20Permit { 98 | return new Contract(address, _abi, runner) as unknown as IERC20Permit; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | IERC20Errors, 8 | IERC20ErrorsInterface, 9 | } from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [ 14 | { 15 | internalType: "address", 16 | name: "spender", 17 | type: "address", 18 | }, 19 | { 20 | internalType: "uint256", 21 | name: "allowance", 22 | type: "uint256", 23 | }, 24 | { 25 | internalType: "uint256", 26 | name: "needed", 27 | type: "uint256", 28 | }, 29 | ], 30 | name: "ERC20InsufficientAllowance", 31 | type: "error", 32 | }, 33 | { 34 | inputs: [ 35 | { 36 | internalType: "address", 37 | name: "sender", 38 | type: "address", 39 | }, 40 | { 41 | internalType: "uint256", 42 | name: "balance", 43 | type: "uint256", 44 | }, 45 | { 46 | internalType: "uint256", 47 | name: "needed", 48 | type: "uint256", 49 | }, 50 | ], 51 | name: "ERC20InsufficientBalance", 52 | type: "error", 53 | }, 54 | { 55 | inputs: [ 56 | { 57 | internalType: "address", 58 | name: "approver", 59 | type: "address", 60 | }, 61 | ], 62 | name: "ERC20InvalidApprover", 63 | type: "error", 64 | }, 65 | { 66 | inputs: [ 67 | { 68 | internalType: "address", 69 | name: "receiver", 70 | type: "address", 71 | }, 72 | ], 73 | name: "ERC20InvalidReceiver", 74 | type: "error", 75 | }, 76 | { 77 | inputs: [ 78 | { 79 | internalType: "address", 80 | name: "sender", 81 | type: "address", 82 | }, 83 | ], 84 | name: "ERC20InvalidSender", 85 | type: "error", 86 | }, 87 | { 88 | inputs: [ 89 | { 90 | internalType: "address", 91 | name: "spender", 92 | type: "address", 93 | }, 94 | ], 95 | name: "ERC20InvalidSpender", 96 | type: "error", 97 | }, 98 | ] as const; 99 | 100 | export class IERC20Errors__factory { 101 | static readonly abi = _abi; 102 | static createInterface(): IERC20ErrorsInterface { 103 | return new Interface(_abi) as IERC20ErrorsInterface; 104 | } 105 | static connect( 106 | address: string, 107 | runner?: ContractRunner | null 108 | ): IERC20Errors { 109 | return new Contract(address, _abi, runner) as unknown as IERC20Errors; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/utils/Address__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import { 5 | Contract, 6 | ContractFactory, 7 | ContractTransactionResponse, 8 | Interface, 9 | } from "ethers"; 10 | import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; 11 | import type { NonPayableOverrides } from "../../../../common"; 12 | import type { 13 | Address, 14 | AddressInterface, 15 | } from "../../../../@openzeppelin/contracts/utils/Address"; 16 | 17 | const _abi = [ 18 | { 19 | inputs: [ 20 | { 21 | internalType: "address", 22 | name: "target", 23 | type: "address", 24 | }, 25 | ], 26 | name: "AddressEmptyCode", 27 | type: "error", 28 | }, 29 | { 30 | inputs: [ 31 | { 32 | internalType: "address", 33 | name: "account", 34 | type: "address", 35 | }, 36 | ], 37 | name: "AddressInsufficientBalance", 38 | type: "error", 39 | }, 40 | { 41 | inputs: [], 42 | name: "FailedInnerCall", 43 | type: "error", 44 | }, 45 | ] as const; 46 | 47 | const _bytecode = 48 | "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea2646970667358221220d35ba930de102c841b8435ba2bfdaaf0ecdc72baf4aaeda2c8b00113597796b164736f6c63430008180033"; 49 | 50 | type AddressConstructorParams = 51 | | [signer?: Signer] 52 | | ConstructorParameters; 53 | 54 | const isSuperArgs = ( 55 | xs: AddressConstructorParams 56 | ): xs is ConstructorParameters => xs.length > 1; 57 | 58 | export class Address__factory extends ContractFactory { 59 | constructor(...args: AddressConstructorParams) { 60 | if (isSuperArgs(args)) { 61 | super(...args); 62 | } else { 63 | super(_abi, _bytecode, args[0]); 64 | } 65 | } 66 | 67 | override getDeployTransaction( 68 | overrides?: NonPayableOverrides & { from?: string } 69 | ): Promise { 70 | return super.getDeployTransaction(overrides || {}); 71 | } 72 | override deploy(overrides?: NonPayableOverrides & { from?: string }) { 73 | return super.deploy(overrides || {}) as Promise< 74 | Address & { 75 | deploymentTransaction(): ContractTransactionResponse; 76 | } 77 | >; 78 | } 79 | override connect(runner: ContractRunner | null): Address__factory { 80 | return super.connect(runner) as Address__factory; 81 | } 82 | 83 | static readonly bytecode = _bytecode; 84 | static readonly abi = _abi; 85 | static createInterface(): AddressInterface { 86 | return new Interface(_abi) as AddressInterface; 87 | } 88 | static connect(address: string, runner?: ContractRunner | null): Address { 89 | return new Contract(address, _abi, runner) as unknown as Address; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /contracts/SilverICO.sol: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.24; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 5 | import "@openzeppelin/contracts/access/Ownable.sol"; 6 | 7 | contract SilverICO is Ownable { 8 | // Address of the SilverDoge token 9 | address public silverDogeToken; 10 | 11 | // Presale parameters 12 | uint256 public presaleRate; // Tokens per BNB 13 | uint256 public presaleCap; // Maximum BNB to be raised 14 | uint256 public presaleStartTime; 15 | uint256 public presaleEndTime; 16 | 17 | // Mapping to track user contributions 18 | mapping(address => uint256) public contributions; 19 | 20 | // Events 21 | event Contribution( 22 | address indexed contributor, 23 | uint256 amount, 24 | uint256 tokensPurchased 25 | ); 26 | 27 | // Constructor 28 | constructor( 29 | address _silverDogeToken, 30 | uint256 _presaleCap, 31 | uint256 _presaleStartTime, 32 | uint256 _presaleEndTime, 33 | address _owner 34 | ) Ownable(_owner) { 35 | silverDogeToken = _silverDogeToken; 36 | presaleCap = _presaleCap; 37 | presaleStartTime = _presaleStartTime; 38 | presaleEndTime = _presaleEndTime; 39 | 40 | // Desired token price in BNB 41 | uint256 tokenPriceInBNB = 100000000; // 1 BNB = 100,000,000 tokens 42 | 43 | // Calculate presale rate 44 | presaleRate = 1e18 / tokenPriceInBNB; 45 | } 46 | 47 | // Function to participate in the presale 48 | function participate() external payable { 49 | require(block.timestamp >= presaleStartTime, "Presale has not started"); 50 | require(block.timestamp <= presaleEndTime, "Presale has ended"); 51 | require(msg.value > 0, "Must send BNB to participate"); 52 | 53 | uint256 tokensPurchased = (msg.value) * (presaleRate); 54 | require(tokensPurchased > 0, "Insufficient BNB sent"); 55 | 56 | // Check if the presale cap is reached 57 | require( 58 | getPresaleRaised() + msg.value <= presaleCap, 59 | "Presale cap reached" 60 | ); 61 | 62 | // Transfer tokens to the contributor 63 | IERC20(silverDogeToken).transfer(msg.sender, tokensPurchased); 64 | 65 | // Update contribution mapping 66 | contributions[msg.sender] = contributions[msg.sender] + (msg.value); 67 | 68 | // Emit event 69 | emit Contribution(msg.sender, msg.value, tokensPurchased); 70 | } 71 | 72 | // Function to retrieve the current amount raised in BNB 73 | function getPresaleRaised() public view returns (uint256) { 74 | return address(this).balance; 75 | } 76 | 77 | // Function to withdraw BNB from the contract (only for the owner) 78 | function withdrawBNB() external onlyOwner { 79 | payable(owner()).transfer(address(this).balance); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC721Errors", 4 | "sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "sender", 11 | "type": "address" 12 | }, 13 | { 14 | "internalType": "uint256", 15 | "name": "tokenId", 16 | "type": "uint256" 17 | }, 18 | { 19 | "internalType": "address", 20 | "name": "owner", 21 | "type": "address" 22 | } 23 | ], 24 | "name": "ERC721IncorrectOwner", 25 | "type": "error" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "operator", 32 | "type": "address" 33 | }, 34 | { 35 | "internalType": "uint256", 36 | "name": "tokenId", 37 | "type": "uint256" 38 | } 39 | ], 40 | "name": "ERC721InsufficientApproval", 41 | "type": "error" 42 | }, 43 | { 44 | "inputs": [ 45 | { 46 | "internalType": "address", 47 | "name": "approver", 48 | "type": "address" 49 | } 50 | ], 51 | "name": "ERC721InvalidApprover", 52 | "type": "error" 53 | }, 54 | { 55 | "inputs": [ 56 | { 57 | "internalType": "address", 58 | "name": "operator", 59 | "type": "address" 60 | } 61 | ], 62 | "name": "ERC721InvalidOperator", 63 | "type": "error" 64 | }, 65 | { 66 | "inputs": [ 67 | { 68 | "internalType": "address", 69 | "name": "owner", 70 | "type": "address" 71 | } 72 | ], 73 | "name": "ERC721InvalidOwner", 74 | "type": "error" 75 | }, 76 | { 77 | "inputs": [ 78 | { 79 | "internalType": "address", 80 | "name": "receiver", 81 | "type": "address" 82 | } 83 | ], 84 | "name": "ERC721InvalidReceiver", 85 | "type": "error" 86 | }, 87 | { 88 | "inputs": [ 89 | { 90 | "internalType": "address", 91 | "name": "sender", 92 | "type": "address" 93 | } 94 | ], 95 | "name": "ERC721InvalidSender", 96 | "type": "error" 97 | }, 98 | { 99 | "inputs": [ 100 | { 101 | "internalType": "uint256", 102 | "name": "tokenId", 103 | "type": "uint256" 104 | } 105 | ], 106 | "name": "ERC721NonexistentToken", 107 | "type": "error" 108 | } 109 | ], 110 | "bytecode": "0x", 111 | "deployedBytecode": "0x", 112 | "linkReferences": {}, 113 | "deployedLinkReferences": {} 114 | } 115 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC1155Errors", 4 | "sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "sender", 11 | "type": "address" 12 | }, 13 | { 14 | "internalType": "uint256", 15 | "name": "balance", 16 | "type": "uint256" 17 | }, 18 | { 19 | "internalType": "uint256", 20 | "name": "needed", 21 | "type": "uint256" 22 | }, 23 | { 24 | "internalType": "uint256", 25 | "name": "tokenId", 26 | "type": "uint256" 27 | } 28 | ], 29 | "name": "ERC1155InsufficientBalance", 30 | "type": "error" 31 | }, 32 | { 33 | "inputs": [ 34 | { 35 | "internalType": "address", 36 | "name": "approver", 37 | "type": "address" 38 | } 39 | ], 40 | "name": "ERC1155InvalidApprover", 41 | "type": "error" 42 | }, 43 | { 44 | "inputs": [ 45 | { 46 | "internalType": "uint256", 47 | "name": "idsLength", 48 | "type": "uint256" 49 | }, 50 | { 51 | "internalType": "uint256", 52 | "name": "valuesLength", 53 | "type": "uint256" 54 | } 55 | ], 56 | "name": "ERC1155InvalidArrayLength", 57 | "type": "error" 58 | }, 59 | { 60 | "inputs": [ 61 | { 62 | "internalType": "address", 63 | "name": "operator", 64 | "type": "address" 65 | } 66 | ], 67 | "name": "ERC1155InvalidOperator", 68 | "type": "error" 69 | }, 70 | { 71 | "inputs": [ 72 | { 73 | "internalType": "address", 74 | "name": "receiver", 75 | "type": "address" 76 | } 77 | ], 78 | "name": "ERC1155InvalidReceiver", 79 | "type": "error" 80 | }, 81 | { 82 | "inputs": [ 83 | { 84 | "internalType": "address", 85 | "name": "sender", 86 | "type": "address" 87 | } 88 | ], 89 | "name": "ERC1155InvalidSender", 90 | "type": "error" 91 | }, 92 | { 93 | "inputs": [ 94 | { 95 | "internalType": "address", 96 | "name": "operator", 97 | "type": "address" 98 | }, 99 | { 100 | "internalType": "address", 101 | "name": "owner", 102 | "type": "address" 103 | } 104 | ], 105 | "name": "ERC1155MissingApprovalForAll", 106 | "type": "error" 107 | } 108 | ], 109 | "bytecode": "0x", 110 | "deployedBytecode": "0x", 111 | "linkReferences": {}, 112 | "deployedLinkReferences": {} 113 | } 114 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import { 5 | Contract, 6 | ContractFactory, 7 | ContractTransactionResponse, 8 | Interface, 9 | } from "ethers"; 10 | import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; 11 | import type { NonPayableOverrides } from "../../../../../../common"; 12 | import type { 13 | SafeERC20, 14 | SafeERC20Interface, 15 | } from "../../../../../../@openzeppelin/contracts/token/ERC20/utils/SafeERC20"; 16 | 17 | const _abi = [ 18 | { 19 | inputs: [ 20 | { 21 | internalType: "address", 22 | name: "spender", 23 | type: "address", 24 | }, 25 | { 26 | internalType: "uint256", 27 | name: "currentAllowance", 28 | type: "uint256", 29 | }, 30 | { 31 | internalType: "uint256", 32 | name: "requestedDecrease", 33 | type: "uint256", 34 | }, 35 | ], 36 | name: "SafeERC20FailedDecreaseAllowance", 37 | type: "error", 38 | }, 39 | { 40 | inputs: [ 41 | { 42 | internalType: "address", 43 | name: "token", 44 | type: "address", 45 | }, 46 | ], 47 | name: "SafeERC20FailedOperation", 48 | type: "error", 49 | }, 50 | ] as const; 51 | 52 | const _bytecode = 53 | "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea26469706673582212208c8af14e6fe45d8f3c53171ab2a00b35ad7b1e721e25bb073a2e6bd75edd4d6c64736f6c63430008180033"; 54 | 55 | type SafeERC20ConstructorParams = 56 | | [signer?: Signer] 57 | | ConstructorParameters; 58 | 59 | const isSuperArgs = ( 60 | xs: SafeERC20ConstructorParams 61 | ): xs is ConstructorParameters => xs.length > 1; 62 | 63 | export class SafeERC20__factory extends ContractFactory { 64 | constructor(...args: SafeERC20ConstructorParams) { 65 | if (isSuperArgs(args)) { 66 | super(...args); 67 | } else { 68 | super(_abi, _bytecode, args[0]); 69 | } 70 | } 71 | 72 | override getDeployTransaction( 73 | overrides?: NonPayableOverrides & { from?: string } 74 | ): Promise { 75 | return super.getDeployTransaction(overrides || {}); 76 | } 77 | override deploy(overrides?: NonPayableOverrides & { from?: string }) { 78 | return super.deploy(overrides || {}) as Promise< 79 | SafeERC20 & { 80 | deploymentTransaction(): ContractTransactionResponse; 81 | } 82 | >; 83 | } 84 | override connect(runner: ContractRunner | null): SafeERC20__factory { 85 | return super.connect(runner) as SafeERC20__factory; 86 | } 87 | 88 | static readonly bytecode = _bytecode; 89 | static readonly abi = _abi; 90 | static createInterface(): SafeERC20Interface { 91 | return new Interface(_abi) as SafeERC20Interface; 92 | } 93 | static connect(address: string, runner?: ContractRunner | null): SafeERC20 { 94 | return new Contract(address, _abi, runner) as unknown as SafeERC20; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | IERC721Errors, 8 | IERC721ErrorsInterface, 9 | } from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [ 14 | { 15 | internalType: "address", 16 | name: "sender", 17 | type: "address", 18 | }, 19 | { 20 | internalType: "uint256", 21 | name: "tokenId", 22 | type: "uint256", 23 | }, 24 | { 25 | internalType: "address", 26 | name: "owner", 27 | type: "address", 28 | }, 29 | ], 30 | name: "ERC721IncorrectOwner", 31 | type: "error", 32 | }, 33 | { 34 | inputs: [ 35 | { 36 | internalType: "address", 37 | name: "operator", 38 | type: "address", 39 | }, 40 | { 41 | internalType: "uint256", 42 | name: "tokenId", 43 | type: "uint256", 44 | }, 45 | ], 46 | name: "ERC721InsufficientApproval", 47 | type: "error", 48 | }, 49 | { 50 | inputs: [ 51 | { 52 | internalType: "address", 53 | name: "approver", 54 | type: "address", 55 | }, 56 | ], 57 | name: "ERC721InvalidApprover", 58 | type: "error", 59 | }, 60 | { 61 | inputs: [ 62 | { 63 | internalType: "address", 64 | name: "operator", 65 | type: "address", 66 | }, 67 | ], 68 | name: "ERC721InvalidOperator", 69 | type: "error", 70 | }, 71 | { 72 | inputs: [ 73 | { 74 | internalType: "address", 75 | name: "owner", 76 | type: "address", 77 | }, 78 | ], 79 | name: "ERC721InvalidOwner", 80 | type: "error", 81 | }, 82 | { 83 | inputs: [ 84 | { 85 | internalType: "address", 86 | name: "receiver", 87 | type: "address", 88 | }, 89 | ], 90 | name: "ERC721InvalidReceiver", 91 | type: "error", 92 | }, 93 | { 94 | inputs: [ 95 | { 96 | internalType: "address", 97 | name: "sender", 98 | type: "address", 99 | }, 100 | ], 101 | name: "ERC721InvalidSender", 102 | type: "error", 103 | }, 104 | { 105 | inputs: [ 106 | { 107 | internalType: "uint256", 108 | name: "tokenId", 109 | type: "uint256", 110 | }, 111 | ], 112 | name: "ERC721NonexistentToken", 113 | type: "error", 114 | }, 115 | ] as const; 116 | 117 | export class IERC721Errors__factory { 118 | static readonly abi = _abi; 119 | static createInterface(): IERC721ErrorsInterface { 120 | return new Interface(_abi) as IERC721ErrorsInterface; 121 | } 122 | static connect( 123 | address: string, 124 | runner?: ContractRunner | null 125 | ): IERC721Errors { 126 | return new Contract(address, _abi, runner) as unknown as IERC721Errors; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | IERC1155Errors, 8 | IERC1155ErrorsInterface, 9 | } from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [ 14 | { 15 | internalType: "address", 16 | name: "sender", 17 | type: "address", 18 | }, 19 | { 20 | internalType: "uint256", 21 | name: "balance", 22 | type: "uint256", 23 | }, 24 | { 25 | internalType: "uint256", 26 | name: "needed", 27 | type: "uint256", 28 | }, 29 | { 30 | internalType: "uint256", 31 | name: "tokenId", 32 | type: "uint256", 33 | }, 34 | ], 35 | name: "ERC1155InsufficientBalance", 36 | type: "error", 37 | }, 38 | { 39 | inputs: [ 40 | { 41 | internalType: "address", 42 | name: "approver", 43 | type: "address", 44 | }, 45 | ], 46 | name: "ERC1155InvalidApprover", 47 | type: "error", 48 | }, 49 | { 50 | inputs: [ 51 | { 52 | internalType: "uint256", 53 | name: "idsLength", 54 | type: "uint256", 55 | }, 56 | { 57 | internalType: "uint256", 58 | name: "valuesLength", 59 | type: "uint256", 60 | }, 61 | ], 62 | name: "ERC1155InvalidArrayLength", 63 | type: "error", 64 | }, 65 | { 66 | inputs: [ 67 | { 68 | internalType: "address", 69 | name: "operator", 70 | type: "address", 71 | }, 72 | ], 73 | name: "ERC1155InvalidOperator", 74 | type: "error", 75 | }, 76 | { 77 | inputs: [ 78 | { 79 | internalType: "address", 80 | name: "receiver", 81 | type: "address", 82 | }, 83 | ], 84 | name: "ERC1155InvalidReceiver", 85 | type: "error", 86 | }, 87 | { 88 | inputs: [ 89 | { 90 | internalType: "address", 91 | name: "sender", 92 | type: "address", 93 | }, 94 | ], 95 | name: "ERC1155InvalidSender", 96 | type: "error", 97 | }, 98 | { 99 | inputs: [ 100 | { 101 | internalType: "address", 102 | name: "operator", 103 | type: "address", 104 | }, 105 | { 106 | internalType: "address", 107 | name: "owner", 108 | type: "address", 109 | }, 110 | ], 111 | name: "ERC1155MissingApprovalForAll", 112 | type: "error", 113 | }, 114 | ] as const; 115 | 116 | export class IERC1155Errors__factory { 117 | static readonly abi = _abi; 118 | static createInterface(): IERC1155ErrorsInterface { 119 | return new Interface(_abi) as IERC1155ErrorsInterface; 120 | } 121 | static connect( 122 | address: string, 123 | runner?: ContractRunner | null 124 | ): IERC1155Errors { 125 | return new Contract(address, _abi, runner) as unknown as IERC1155Errors; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /typechain-types/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type * as openzeppelin from "./@openzeppelin"; 5 | export type { openzeppelin }; 6 | import type * as contracts from "./contracts"; 7 | export type { contracts }; 8 | export * as factories from "./factories"; 9 | export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; 10 | export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; 11 | export type { IERC1155Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors"; 12 | export { IERC1155Errors__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory"; 13 | export type { IERC20Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors"; 14 | export { IERC20Errors__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory"; 15 | export type { IERC721Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors"; 16 | export { IERC721Errors__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory"; 17 | export type { ERC20 } from "./@openzeppelin/contracts/token/ERC20/ERC20"; 18 | export { ERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/ERC20__factory"; 19 | export type { IERC20Metadata } from "./@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; 20 | export { IERC20Metadata__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory"; 21 | export type { IERC20Permit } from "./@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit"; 22 | export { IERC20Permit__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory"; 23 | export type { IERC20 } from "./@openzeppelin/contracts/token/ERC20/IERC20"; 24 | export { IERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/IERC20__factory"; 25 | export type { SafeERC20 } from "./@openzeppelin/contracts/token/ERC20/utils/SafeERC20"; 26 | export { SafeERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory"; 27 | export type { Address } from "./@openzeppelin/contracts/utils/Address"; 28 | export { Address__factory } from "./factories/@openzeppelin/contracts/utils/Address__factory"; 29 | export type { ReentrancyGuard } from "./@openzeppelin/contracts/utils/ReentrancyGuard"; 30 | export { ReentrancyGuard__factory } from "./factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory"; 31 | export type { CryptoSI } from "./contracts/CryptoSI"; 32 | export { CryptoSI__factory } from "./factories/contracts/CryptoSI__factory"; 33 | export type { DAI } from "./contracts/DAI"; 34 | export { DAI__factory } from "./factories/contracts/DAI__factory"; 35 | export type { DEW } from "./contracts/DEW"; 36 | export { DEW__factory } from "./factories/contracts/DEW__factory"; 37 | export type { Silver } from "./contracts/Silver"; 38 | export { Silver__factory } from "./factories/contracts/Silver__factory"; 39 | export type { SilverICO } from "./contracts/SilverICO"; 40 | export { SilverICO__factory } from "./factories/contracts/SilverICO__factory"; 41 | export type { SilverPadFactory } from "./contracts/SilverPadFactory"; 42 | export { SilverPadFactory__factory } from "./factories/contracts/SilverPadFactory__factory"; 43 | -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | import "@nomicfoundation/hardhat-toolbox"; 3 | import "@nomicfoundation/hardhat-verify"; 4 | import dotenv from 'dotenv'; 5 | 6 | dotenv.config (); 7 | 8 | const PRIVATE_KEY: string = process.env.PRIVATE_KEY as string; 9 | 10 | const config: HardhatUserConfig = { 11 | solidity: { 12 | version: "0.8.24", 13 | settings: { 14 | optimizer: { 15 | enabled: true, 16 | runs: 100, 17 | }, 18 | viaIR: true, 19 | }, 20 | }, 21 | // defaultNetwork: "sepolia", 22 | networks: { 23 | sepolia: { 24 | url: process.env.SEPOLIA_URL, 25 | accounts: [PRIVATE_KEY], 26 | }, 27 | goerli: { 28 | url: process.env.GOERLI_URL, 29 | accounts: [PRIVATE_KEY], 30 | }, 31 | mantle: { 32 | url: process.env.MANTLE_URL, 33 | accounts: [PRIVATE_KEY] 34 | }, 35 | etc: { 36 | url: process.env.ETC_URL, 37 | accounts: [PRIVATE_KEY] 38 | }, 39 | polygon: { 40 | url: process.env.POLYGON_URL, 41 | accounts: [PRIVATE_KEY] 42 | }, 43 | opt: { 44 | url: process.env.OPTIMISM_URL, 45 | accounts: [PRIVATE_KEY] 46 | }, 47 | arbitrum: { 48 | url: process.env.ARBITRUM_URL, 49 | accounts: [PRIVATE_KEY] 50 | }, 51 | base: { 52 | url: process.env.BASE_URL, 53 | accounts: [PRIVATE_KEY] 54 | }, 55 | bsc: { 56 | url: process.env.BSC_URL, 57 | accounts: [PRIVATE_KEY] 58 | }, 59 | scroll: { 60 | url: process.env.SCROLL_URL, 61 | accounts: [PRIVATE_KEY] 62 | }, 63 | artio_testnet: { 64 | url: process.env.ARTIO_URL, 65 | accounts: [PRIVATE_KEY] 66 | }, 67 | }, 68 | etherscan: { 69 | apiKey: { 70 | goerli: process.env.ETHERSCAN_KEY!, 71 | sepolia: process.env.ETHERSCAN_KEY!, 72 | polygon: process.env.POLYGONSCAN_KEY!, 73 | mantle: "any", 74 | etc: process.env.ETCSCAN_KEY!, 75 | bsc: process.env.BSCSCAN_API_KEY!, 76 | scroll: process.env.SCROLLSCAN_KEY!, 77 | artio_testnet: "artio_testnet" 78 | }, 79 | customChains: [ 80 | { 81 | network: "mantle", 82 | chainId: 5000, 83 | urls: { 84 | apiURL: "https://api.routescan.io/v2/network/mainnet/evm/5000/etherscan", 85 | browserURL: "https://mantlescan.info" 86 | } 87 | }, 88 | { 89 | network: "etc", 90 | chainId: 61, 91 | urls: { 92 | apiURL: "https://etc.blockscout.com/api", 93 | browserURL: "https://etc.blockscout.com/" 94 | } 95 | }, 96 | { 97 | network: "polygon", 98 | chainId: 137, 99 | urls: { 100 | apiURL: "https://api.polygonscan.com/api", 101 | browserURL: "https://polygonscan.com/" 102 | } 103 | }, 104 | { 105 | network: "artio_testnet", 106 | chainId: 80085, 107 | urls: { 108 | apiURL: "https://api.routescan.io/v2/network/testnet/evm/80085/etherscan", 109 | browserURL: "https://artio.beratrail.io" 110 | } 111 | }, 112 | { 113 | network: "scroll", 114 | chainId: 534352, 115 | urls: { 116 | apiURL: "https://api.scrollscan.com/api", 117 | browserURL: "https://api.scrollscan.com" 118 | } 119 | } 120 | ] 121 | }, 122 | sourcify: { 123 | enabled: true, 124 | }, 125 | }; 126 | 127 | export default config; -------------------------------------------------------------------------------- /typechain-types/common.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | FunctionFragment, 6 | Typed, 7 | EventFragment, 8 | ContractTransaction, 9 | ContractTransactionResponse, 10 | DeferredTopicFilter, 11 | EventLog, 12 | TransactionRequest, 13 | LogDescription, 14 | } from "ethers"; 15 | 16 | export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> 17 | extends DeferredTopicFilter {} 18 | 19 | export interface TypedContractEvent< 20 | InputTuple extends Array = any, 21 | OutputTuple extends Array = any, 22 | OutputObject = any 23 | > { 24 | (...args: Partial): TypedDeferredTopicFilter< 25 | TypedContractEvent 26 | >; 27 | name: string; 28 | fragment: EventFragment; 29 | getFragment(...args: Partial): EventFragment; 30 | } 31 | 32 | type __TypechainAOutputTuple = T extends TypedContractEvent< 33 | infer _U, 34 | infer W 35 | > 36 | ? W 37 | : never; 38 | type __TypechainOutputObject = T extends TypedContractEvent< 39 | infer _U, 40 | infer _W, 41 | infer V 42 | > 43 | ? V 44 | : never; 45 | 46 | export interface TypedEventLog 47 | extends Omit { 48 | args: __TypechainAOutputTuple & __TypechainOutputObject; 49 | } 50 | 51 | export interface TypedLogDescription 52 | extends Omit { 53 | args: __TypechainAOutputTuple & __TypechainOutputObject; 54 | } 55 | 56 | export type TypedListener = ( 57 | ...listenerArg: [ 58 | ...__TypechainAOutputTuple, 59 | TypedEventLog, 60 | ...undefined[] 61 | ] 62 | ) => void; 63 | 64 | export type MinEthersFactory = { 65 | deploy(...a: ARGS[]): Promise; 66 | }; 67 | 68 | export type GetContractTypeFromFactory = F extends MinEthersFactory< 69 | infer C, 70 | any 71 | > 72 | ? C 73 | : never; 74 | export type GetARGsTypeFromFactory = F extends MinEthersFactory 75 | ? Parameters 76 | : never; 77 | 78 | export type StateMutability = "nonpayable" | "payable" | "view"; 79 | 80 | export type BaseOverrides = Omit; 81 | export type NonPayableOverrides = Omit< 82 | BaseOverrides, 83 | "value" | "blockTag" | "enableCcipRead" 84 | >; 85 | export type PayableOverrides = Omit< 86 | BaseOverrides, 87 | "blockTag" | "enableCcipRead" 88 | >; 89 | export type ViewOverrides = Omit; 90 | export type Overrides = S extends "nonpayable" 91 | ? NonPayableOverrides 92 | : S extends "payable" 93 | ? PayableOverrides 94 | : ViewOverrides; 95 | 96 | export type PostfixOverrides, S extends StateMutability> = 97 | | A 98 | | [...A, Overrides]; 99 | export type ContractMethodArgs< 100 | A extends Array, 101 | S extends StateMutability 102 | > = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; 103 | 104 | export type DefaultReturnType = R extends Array ? R[0] : R; 105 | 106 | // export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { 107 | export interface TypedContractMethod< 108 | A extends Array = Array, 109 | R = any, 110 | S extends StateMutability = "payable" 111 | > { 112 | (...args: ContractMethodArgs): S extends "view" 113 | ? Promise> 114 | : Promise; 115 | 116 | name: string; 117 | 118 | fragment: FunctionFragment; 119 | 120 | getFragment(...args: ContractMethodArgs): FunctionFragment; 121 | 122 | populateTransaction( 123 | ...args: ContractMethodArgs 124 | ): Promise; 125 | staticCall( 126 | ...args: ContractMethodArgs 127 | ): Promise>; 128 | send(...args: ContractMethodArgs): Promise; 129 | estimateGas(...args: ContractMethodArgs): Promise; 130 | staticCallResult(...args: ContractMethodArgs): Promise; 131 | } 132 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | AddressLike, 12 | ContractRunner, 13 | ContractMethod, 14 | Listener, 15 | } from "ethers"; 16 | import type { 17 | TypedContractEvent, 18 | TypedDeferredTopicFilter, 19 | TypedEventLog, 20 | TypedListener, 21 | TypedContractMethod, 22 | } from "../../../../../common"; 23 | 24 | export interface IERC20PermitInterface extends Interface { 25 | getFunction( 26 | nameOrSignature: "DOMAIN_SEPARATOR" | "nonces" | "permit" 27 | ): FunctionFragment; 28 | 29 | encodeFunctionData( 30 | functionFragment: "DOMAIN_SEPARATOR", 31 | values?: undefined 32 | ): string; 33 | encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; 34 | encodeFunctionData( 35 | functionFragment: "permit", 36 | values: [ 37 | AddressLike, 38 | AddressLike, 39 | BigNumberish, 40 | BigNumberish, 41 | BigNumberish, 42 | BytesLike, 43 | BytesLike 44 | ] 45 | ): string; 46 | 47 | decodeFunctionResult( 48 | functionFragment: "DOMAIN_SEPARATOR", 49 | data: BytesLike 50 | ): Result; 51 | decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; 52 | decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; 53 | } 54 | 55 | export interface IERC20Permit extends BaseContract { 56 | connect(runner?: ContractRunner | null): IERC20Permit; 57 | waitForDeployment(): Promise; 58 | 59 | interface: IERC20PermitInterface; 60 | 61 | queryFilter( 62 | event: TCEvent, 63 | fromBlockOrBlockhash?: string | number | undefined, 64 | toBlock?: string | number | undefined 65 | ): Promise>>; 66 | queryFilter( 67 | filter: TypedDeferredTopicFilter, 68 | fromBlockOrBlockhash?: string | number | undefined, 69 | toBlock?: string | number | undefined 70 | ): Promise>>; 71 | 72 | on( 73 | event: TCEvent, 74 | listener: TypedListener 75 | ): Promise; 76 | on( 77 | filter: TypedDeferredTopicFilter, 78 | listener: TypedListener 79 | ): Promise; 80 | 81 | once( 82 | event: TCEvent, 83 | listener: TypedListener 84 | ): Promise; 85 | once( 86 | filter: TypedDeferredTopicFilter, 87 | listener: TypedListener 88 | ): Promise; 89 | 90 | listeners( 91 | event: TCEvent 92 | ): Promise>>; 93 | listeners(eventName?: string): Promise>; 94 | removeAllListeners( 95 | event?: TCEvent 96 | ): Promise; 97 | 98 | DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; 99 | 100 | nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; 101 | 102 | permit: TypedContractMethod< 103 | [ 104 | owner: AddressLike, 105 | spender: AddressLike, 106 | value: BigNumberish, 107 | deadline: BigNumberish, 108 | v: BigNumberish, 109 | r: BytesLike, 110 | s: BytesLike 111 | ], 112 | [void], 113 | "nonpayable" 114 | >; 115 | 116 | getFunction( 117 | key: string | FunctionFragment 118 | ): T; 119 | 120 | getFunction( 121 | nameOrSignature: "DOMAIN_SEPARATOR" 122 | ): TypedContractMethod<[], [string], "view">; 123 | getFunction( 124 | nameOrSignature: "nonces" 125 | ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; 126 | getFunction( 127 | nameOrSignature: "permit" 128 | ): TypedContractMethod< 129 | [ 130 | owner: AddressLike, 131 | spender: AddressLike, 132 | value: BigNumberish, 133 | deadline: BigNumberish, 134 | v: BigNumberish, 135 | r: BytesLike, 136 | s: BytesLike 137 | ], 138 | [void], 139 | "nonpayable" 140 | >; 141 | 142 | filters: {}; 143 | } 144 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | IERC20, 8 | IERC20Interface, 9 | } from "../../../../../@openzeppelin/contracts/token/ERC20/IERC20"; 10 | 11 | const _abi = [ 12 | { 13 | anonymous: false, 14 | inputs: [ 15 | { 16 | indexed: true, 17 | internalType: "address", 18 | name: "owner", 19 | type: "address", 20 | }, 21 | { 22 | indexed: true, 23 | internalType: "address", 24 | name: "spender", 25 | type: "address", 26 | }, 27 | { 28 | indexed: false, 29 | internalType: "uint256", 30 | name: "value", 31 | type: "uint256", 32 | }, 33 | ], 34 | name: "Approval", 35 | type: "event", 36 | }, 37 | { 38 | anonymous: false, 39 | inputs: [ 40 | { 41 | indexed: true, 42 | internalType: "address", 43 | name: "from", 44 | type: "address", 45 | }, 46 | { 47 | indexed: true, 48 | internalType: "address", 49 | name: "to", 50 | type: "address", 51 | }, 52 | { 53 | indexed: false, 54 | internalType: "uint256", 55 | name: "value", 56 | type: "uint256", 57 | }, 58 | ], 59 | name: "Transfer", 60 | type: "event", 61 | }, 62 | { 63 | inputs: [ 64 | { 65 | internalType: "address", 66 | name: "owner", 67 | type: "address", 68 | }, 69 | { 70 | internalType: "address", 71 | name: "spender", 72 | type: "address", 73 | }, 74 | ], 75 | name: "allowance", 76 | outputs: [ 77 | { 78 | internalType: "uint256", 79 | name: "", 80 | type: "uint256", 81 | }, 82 | ], 83 | stateMutability: "view", 84 | type: "function", 85 | }, 86 | { 87 | inputs: [ 88 | { 89 | internalType: "address", 90 | name: "spender", 91 | type: "address", 92 | }, 93 | { 94 | internalType: "uint256", 95 | name: "value", 96 | type: "uint256", 97 | }, 98 | ], 99 | name: "approve", 100 | outputs: [ 101 | { 102 | internalType: "bool", 103 | name: "", 104 | type: "bool", 105 | }, 106 | ], 107 | stateMutability: "nonpayable", 108 | type: "function", 109 | }, 110 | { 111 | inputs: [ 112 | { 113 | internalType: "address", 114 | name: "account", 115 | type: "address", 116 | }, 117 | ], 118 | name: "balanceOf", 119 | outputs: [ 120 | { 121 | internalType: "uint256", 122 | name: "", 123 | type: "uint256", 124 | }, 125 | ], 126 | stateMutability: "view", 127 | type: "function", 128 | }, 129 | { 130 | inputs: [], 131 | name: "totalSupply", 132 | outputs: [ 133 | { 134 | internalType: "uint256", 135 | name: "", 136 | type: "uint256", 137 | }, 138 | ], 139 | stateMutability: "view", 140 | type: "function", 141 | }, 142 | { 143 | inputs: [ 144 | { 145 | internalType: "address", 146 | name: "to", 147 | type: "address", 148 | }, 149 | { 150 | internalType: "uint256", 151 | name: "value", 152 | type: "uint256", 153 | }, 154 | ], 155 | name: "transfer", 156 | outputs: [ 157 | { 158 | internalType: "bool", 159 | name: "", 160 | type: "bool", 161 | }, 162 | ], 163 | stateMutability: "nonpayable", 164 | type: "function", 165 | }, 166 | { 167 | inputs: [ 168 | { 169 | internalType: "address", 170 | name: "from", 171 | type: "address", 172 | }, 173 | { 174 | internalType: "address", 175 | name: "to", 176 | type: "address", 177 | }, 178 | { 179 | internalType: "uint256", 180 | name: "value", 181 | type: "uint256", 182 | }, 183 | ], 184 | name: "transferFrom", 185 | outputs: [ 186 | { 187 | internalType: "bool", 188 | name: "", 189 | type: "bool", 190 | }, 191 | ], 192 | stateMutability: "nonpayable", 193 | type: "function", 194 | }, 195 | ] as const; 196 | 197 | export class IERC20__factory { 198 | static readonly abi = _abi; 199 | static createInterface(): IERC20Interface { 200 | return new Interface(_abi) as IERC20Interface; 201 | } 202 | static connect(address: string, runner?: ContractRunner | null): IERC20 { 203 | return new Contract(address, _abi, runner) as unknown as IERC20; 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC20", 4 | "sourceName": "@openzeppelin/contracts/token/ERC20/IERC20.sol", 5 | "abi": [ 6 | { 7 | "anonymous": false, 8 | "inputs": [ 9 | { 10 | "indexed": true, 11 | "internalType": "address", 12 | "name": "owner", 13 | "type": "address" 14 | }, 15 | { 16 | "indexed": true, 17 | "internalType": "address", 18 | "name": "spender", 19 | "type": "address" 20 | }, 21 | { 22 | "indexed": false, 23 | "internalType": "uint256", 24 | "name": "value", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "Approval", 29 | "type": "event" 30 | }, 31 | { 32 | "anonymous": false, 33 | "inputs": [ 34 | { 35 | "indexed": true, 36 | "internalType": "address", 37 | "name": "from", 38 | "type": "address" 39 | }, 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "to", 44 | "type": "address" 45 | }, 46 | { 47 | "indexed": false, 48 | "internalType": "uint256", 49 | "name": "value", 50 | "type": "uint256" 51 | } 52 | ], 53 | "name": "Transfer", 54 | "type": "event" 55 | }, 56 | { 57 | "inputs": [ 58 | { 59 | "internalType": "address", 60 | "name": "owner", 61 | "type": "address" 62 | }, 63 | { 64 | "internalType": "address", 65 | "name": "spender", 66 | "type": "address" 67 | } 68 | ], 69 | "name": "allowance", 70 | "outputs": [ 71 | { 72 | "internalType": "uint256", 73 | "name": "", 74 | "type": "uint256" 75 | } 76 | ], 77 | "stateMutability": "view", 78 | "type": "function" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "address", 84 | "name": "spender", 85 | "type": "address" 86 | }, 87 | { 88 | "internalType": "uint256", 89 | "name": "value", 90 | "type": "uint256" 91 | } 92 | ], 93 | "name": "approve", 94 | "outputs": [ 95 | { 96 | "internalType": "bool", 97 | "name": "", 98 | "type": "bool" 99 | } 100 | ], 101 | "stateMutability": "nonpayable", 102 | "type": "function" 103 | }, 104 | { 105 | "inputs": [ 106 | { 107 | "internalType": "address", 108 | "name": "account", 109 | "type": "address" 110 | } 111 | ], 112 | "name": "balanceOf", 113 | "outputs": [ 114 | { 115 | "internalType": "uint256", 116 | "name": "", 117 | "type": "uint256" 118 | } 119 | ], 120 | "stateMutability": "view", 121 | "type": "function" 122 | }, 123 | { 124 | "inputs": [], 125 | "name": "totalSupply", 126 | "outputs": [ 127 | { 128 | "internalType": "uint256", 129 | "name": "", 130 | "type": "uint256" 131 | } 132 | ], 133 | "stateMutability": "view", 134 | "type": "function" 135 | }, 136 | { 137 | "inputs": [ 138 | { 139 | "internalType": "address", 140 | "name": "to", 141 | "type": "address" 142 | }, 143 | { 144 | "internalType": "uint256", 145 | "name": "value", 146 | "type": "uint256" 147 | } 148 | ], 149 | "name": "transfer", 150 | "outputs": [ 151 | { 152 | "internalType": "bool", 153 | "name": "", 154 | "type": "bool" 155 | } 156 | ], 157 | "stateMutability": "nonpayable", 158 | "type": "function" 159 | }, 160 | { 161 | "inputs": [ 162 | { 163 | "internalType": "address", 164 | "name": "from", 165 | "type": "address" 166 | }, 167 | { 168 | "internalType": "address", 169 | "name": "to", 170 | "type": "address" 171 | }, 172 | { 173 | "internalType": "uint256", 174 | "name": "value", 175 | "type": "uint256" 176 | } 177 | ], 178 | "name": "transferFrom", 179 | "outputs": [ 180 | { 181 | "internalType": "bool", 182 | "name": "", 183 | "type": "bool" 184 | } 185 | ], 186 | "stateMutability": "nonpayable", 187 | "type": "function" 188 | } 189 | ], 190 | "bytecode": "0x", 191 | "deployedBytecode": "0x", 192 | "linkReferences": {}, 193 | "deployedLinkReferences": {} 194 | } 195 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/access/Ownable.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BytesLike, 7 | FunctionFragment, 8 | Result, 9 | Interface, 10 | EventFragment, 11 | AddressLike, 12 | ContractRunner, 13 | ContractMethod, 14 | Listener, 15 | } from "ethers"; 16 | import type { 17 | TypedContractEvent, 18 | TypedDeferredTopicFilter, 19 | TypedEventLog, 20 | TypedLogDescription, 21 | TypedListener, 22 | TypedContractMethod, 23 | } from "../../../common"; 24 | 25 | export interface OwnableInterface extends Interface { 26 | getFunction( 27 | nameOrSignature: "owner" | "renounceOwnership" | "transferOwnership" 28 | ): FunctionFragment; 29 | 30 | getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; 31 | 32 | encodeFunctionData(functionFragment: "owner", values?: undefined): string; 33 | encodeFunctionData( 34 | functionFragment: "renounceOwnership", 35 | values?: undefined 36 | ): string; 37 | encodeFunctionData( 38 | functionFragment: "transferOwnership", 39 | values: [AddressLike] 40 | ): string; 41 | 42 | decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; 43 | decodeFunctionResult( 44 | functionFragment: "renounceOwnership", 45 | data: BytesLike 46 | ): Result; 47 | decodeFunctionResult( 48 | functionFragment: "transferOwnership", 49 | data: BytesLike 50 | ): Result; 51 | } 52 | 53 | export namespace OwnershipTransferredEvent { 54 | export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; 55 | export type OutputTuple = [previousOwner: string, newOwner: string]; 56 | export interface OutputObject { 57 | previousOwner: string; 58 | newOwner: string; 59 | } 60 | export type Event = TypedContractEvent; 61 | export type Filter = TypedDeferredTopicFilter; 62 | export type Log = TypedEventLog; 63 | export type LogDescription = TypedLogDescription; 64 | } 65 | 66 | export interface Ownable extends BaseContract { 67 | connect(runner?: ContractRunner | null): Ownable; 68 | waitForDeployment(): Promise; 69 | 70 | interface: OwnableInterface; 71 | 72 | queryFilter( 73 | event: TCEvent, 74 | fromBlockOrBlockhash?: string | number | undefined, 75 | toBlock?: string | number | undefined 76 | ): Promise>>; 77 | queryFilter( 78 | filter: TypedDeferredTopicFilter, 79 | fromBlockOrBlockhash?: string | number | undefined, 80 | toBlock?: string | number | undefined 81 | ): Promise>>; 82 | 83 | on( 84 | event: TCEvent, 85 | listener: TypedListener 86 | ): Promise; 87 | on( 88 | filter: TypedDeferredTopicFilter, 89 | listener: TypedListener 90 | ): Promise; 91 | 92 | once( 93 | event: TCEvent, 94 | listener: TypedListener 95 | ): Promise; 96 | once( 97 | filter: TypedDeferredTopicFilter, 98 | listener: TypedListener 99 | ): Promise; 100 | 101 | listeners( 102 | event: TCEvent 103 | ): Promise>>; 104 | listeners(eventName?: string): Promise>; 105 | removeAllListeners( 106 | event?: TCEvent 107 | ): Promise; 108 | 109 | owner: TypedContractMethod<[], [string], "view">; 110 | 111 | renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; 112 | 113 | transferOwnership: TypedContractMethod< 114 | [newOwner: AddressLike], 115 | [void], 116 | "nonpayable" 117 | >; 118 | 119 | getFunction( 120 | key: string | FunctionFragment 121 | ): T; 122 | 123 | getFunction( 124 | nameOrSignature: "owner" 125 | ): TypedContractMethod<[], [string], "view">; 126 | getFunction( 127 | nameOrSignature: "renounceOwnership" 128 | ): TypedContractMethod<[], [void], "nonpayable">; 129 | getFunction( 130 | nameOrSignature: "transferOwnership" 131 | ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; 132 | 133 | getEvent( 134 | key: "OwnershipTransferred" 135 | ): TypedContractEvent< 136 | OwnershipTransferredEvent.InputTuple, 137 | OwnershipTransferredEvent.OutputTuple, 138 | OwnershipTransferredEvent.OutputObject 139 | >; 140 | 141 | filters: { 142 | "OwnershipTransferred(address,address)": TypedContractEvent< 143 | OwnershipTransferredEvent.InputTuple, 144 | OwnershipTransferredEvent.OutputTuple, 145 | OwnershipTransferredEvent.OutputObject 146 | >; 147 | OwnershipTransferred: TypedContractEvent< 148 | OwnershipTransferredEvent.InputTuple, 149 | OwnershipTransferredEvent.OutputTuple, 150 | OwnershipTransferredEvent.OutputObject 151 | >; 152 | }; 153 | } 154 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | IERC20Metadata, 8 | IERC20MetadataInterface, 9 | } from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; 10 | 11 | const _abi = [ 12 | { 13 | anonymous: false, 14 | inputs: [ 15 | { 16 | indexed: true, 17 | internalType: "address", 18 | name: "owner", 19 | type: "address", 20 | }, 21 | { 22 | indexed: true, 23 | internalType: "address", 24 | name: "spender", 25 | type: "address", 26 | }, 27 | { 28 | indexed: false, 29 | internalType: "uint256", 30 | name: "value", 31 | type: "uint256", 32 | }, 33 | ], 34 | name: "Approval", 35 | type: "event", 36 | }, 37 | { 38 | anonymous: false, 39 | inputs: [ 40 | { 41 | indexed: true, 42 | internalType: "address", 43 | name: "from", 44 | type: "address", 45 | }, 46 | { 47 | indexed: true, 48 | internalType: "address", 49 | name: "to", 50 | type: "address", 51 | }, 52 | { 53 | indexed: false, 54 | internalType: "uint256", 55 | name: "value", 56 | type: "uint256", 57 | }, 58 | ], 59 | name: "Transfer", 60 | type: "event", 61 | }, 62 | { 63 | inputs: [ 64 | { 65 | internalType: "address", 66 | name: "owner", 67 | type: "address", 68 | }, 69 | { 70 | internalType: "address", 71 | name: "spender", 72 | type: "address", 73 | }, 74 | ], 75 | name: "allowance", 76 | outputs: [ 77 | { 78 | internalType: "uint256", 79 | name: "", 80 | type: "uint256", 81 | }, 82 | ], 83 | stateMutability: "view", 84 | type: "function", 85 | }, 86 | { 87 | inputs: [ 88 | { 89 | internalType: "address", 90 | name: "spender", 91 | type: "address", 92 | }, 93 | { 94 | internalType: "uint256", 95 | name: "value", 96 | type: "uint256", 97 | }, 98 | ], 99 | name: "approve", 100 | outputs: [ 101 | { 102 | internalType: "bool", 103 | name: "", 104 | type: "bool", 105 | }, 106 | ], 107 | stateMutability: "nonpayable", 108 | type: "function", 109 | }, 110 | { 111 | inputs: [ 112 | { 113 | internalType: "address", 114 | name: "account", 115 | type: "address", 116 | }, 117 | ], 118 | name: "balanceOf", 119 | outputs: [ 120 | { 121 | internalType: "uint256", 122 | name: "", 123 | type: "uint256", 124 | }, 125 | ], 126 | stateMutability: "view", 127 | type: "function", 128 | }, 129 | { 130 | inputs: [], 131 | name: "decimals", 132 | outputs: [ 133 | { 134 | internalType: "uint8", 135 | name: "", 136 | type: "uint8", 137 | }, 138 | ], 139 | stateMutability: "view", 140 | type: "function", 141 | }, 142 | { 143 | inputs: [], 144 | name: "name", 145 | outputs: [ 146 | { 147 | internalType: "string", 148 | name: "", 149 | type: "string", 150 | }, 151 | ], 152 | stateMutability: "view", 153 | type: "function", 154 | }, 155 | { 156 | inputs: [], 157 | name: "symbol", 158 | outputs: [ 159 | { 160 | internalType: "string", 161 | name: "", 162 | type: "string", 163 | }, 164 | ], 165 | stateMutability: "view", 166 | type: "function", 167 | }, 168 | { 169 | inputs: [], 170 | name: "totalSupply", 171 | outputs: [ 172 | { 173 | internalType: "uint256", 174 | name: "", 175 | type: "uint256", 176 | }, 177 | ], 178 | stateMutability: "view", 179 | type: "function", 180 | }, 181 | { 182 | inputs: [ 183 | { 184 | internalType: "address", 185 | name: "to", 186 | type: "address", 187 | }, 188 | { 189 | internalType: "uint256", 190 | name: "value", 191 | type: "uint256", 192 | }, 193 | ], 194 | name: "transfer", 195 | outputs: [ 196 | { 197 | internalType: "bool", 198 | name: "", 199 | type: "bool", 200 | }, 201 | ], 202 | stateMutability: "nonpayable", 203 | type: "function", 204 | }, 205 | { 206 | inputs: [ 207 | { 208 | internalType: "address", 209 | name: "from", 210 | type: "address", 211 | }, 212 | { 213 | internalType: "address", 214 | name: "to", 215 | type: "address", 216 | }, 217 | { 218 | internalType: "uint256", 219 | name: "value", 220 | type: "uint256", 221 | }, 222 | ], 223 | name: "transferFrom", 224 | outputs: [ 225 | { 226 | internalType: "bool", 227 | name: "", 228 | type: "bool", 229 | }, 230 | ], 231 | stateMutability: "nonpayable", 232 | type: "function", 233 | }, 234 | ] as const; 235 | 236 | export class IERC20Metadata__factory { 237 | static readonly abi = _abi; 238 | static createInterface(): IERC20MetadataInterface { 239 | return new Interface(_abi) as IERC20MetadataInterface; 240 | } 241 | static connect( 242 | address: string, 243 | runner?: ContractRunner | null 244 | ): IERC20Metadata { 245 | return new Contract(address, _abi, runner) as unknown as IERC20Metadata; 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC20Metadata", 4 | "sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", 5 | "abi": [ 6 | { 7 | "anonymous": false, 8 | "inputs": [ 9 | { 10 | "indexed": true, 11 | "internalType": "address", 12 | "name": "owner", 13 | "type": "address" 14 | }, 15 | { 16 | "indexed": true, 17 | "internalType": "address", 18 | "name": "spender", 19 | "type": "address" 20 | }, 21 | { 22 | "indexed": false, 23 | "internalType": "uint256", 24 | "name": "value", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "Approval", 29 | "type": "event" 30 | }, 31 | { 32 | "anonymous": false, 33 | "inputs": [ 34 | { 35 | "indexed": true, 36 | "internalType": "address", 37 | "name": "from", 38 | "type": "address" 39 | }, 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "to", 44 | "type": "address" 45 | }, 46 | { 47 | "indexed": false, 48 | "internalType": "uint256", 49 | "name": "value", 50 | "type": "uint256" 51 | } 52 | ], 53 | "name": "Transfer", 54 | "type": "event" 55 | }, 56 | { 57 | "inputs": [ 58 | { 59 | "internalType": "address", 60 | "name": "owner", 61 | "type": "address" 62 | }, 63 | { 64 | "internalType": "address", 65 | "name": "spender", 66 | "type": "address" 67 | } 68 | ], 69 | "name": "allowance", 70 | "outputs": [ 71 | { 72 | "internalType": "uint256", 73 | "name": "", 74 | "type": "uint256" 75 | } 76 | ], 77 | "stateMutability": "view", 78 | "type": "function" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "address", 84 | "name": "spender", 85 | "type": "address" 86 | }, 87 | { 88 | "internalType": "uint256", 89 | "name": "value", 90 | "type": "uint256" 91 | } 92 | ], 93 | "name": "approve", 94 | "outputs": [ 95 | { 96 | "internalType": "bool", 97 | "name": "", 98 | "type": "bool" 99 | } 100 | ], 101 | "stateMutability": "nonpayable", 102 | "type": "function" 103 | }, 104 | { 105 | "inputs": [ 106 | { 107 | "internalType": "address", 108 | "name": "account", 109 | "type": "address" 110 | } 111 | ], 112 | "name": "balanceOf", 113 | "outputs": [ 114 | { 115 | "internalType": "uint256", 116 | "name": "", 117 | "type": "uint256" 118 | } 119 | ], 120 | "stateMutability": "view", 121 | "type": "function" 122 | }, 123 | { 124 | "inputs": [], 125 | "name": "decimals", 126 | "outputs": [ 127 | { 128 | "internalType": "uint8", 129 | "name": "", 130 | "type": "uint8" 131 | } 132 | ], 133 | "stateMutability": "view", 134 | "type": "function" 135 | }, 136 | { 137 | "inputs": [], 138 | "name": "name", 139 | "outputs": [ 140 | { 141 | "internalType": "string", 142 | "name": "", 143 | "type": "string" 144 | } 145 | ], 146 | "stateMutability": "view", 147 | "type": "function" 148 | }, 149 | { 150 | "inputs": [], 151 | "name": "symbol", 152 | "outputs": [ 153 | { 154 | "internalType": "string", 155 | "name": "", 156 | "type": "string" 157 | } 158 | ], 159 | "stateMutability": "view", 160 | "type": "function" 161 | }, 162 | { 163 | "inputs": [], 164 | "name": "totalSupply", 165 | "outputs": [ 166 | { 167 | "internalType": "uint256", 168 | "name": "", 169 | "type": "uint256" 170 | } 171 | ], 172 | "stateMutability": "view", 173 | "type": "function" 174 | }, 175 | { 176 | "inputs": [ 177 | { 178 | "internalType": "address", 179 | "name": "to", 180 | "type": "address" 181 | }, 182 | { 183 | "internalType": "uint256", 184 | "name": "value", 185 | "type": "uint256" 186 | } 187 | ], 188 | "name": "transfer", 189 | "outputs": [ 190 | { 191 | "internalType": "bool", 192 | "name": "", 193 | "type": "bool" 194 | } 195 | ], 196 | "stateMutability": "nonpayable", 197 | "type": "function" 198 | }, 199 | { 200 | "inputs": [ 201 | { 202 | "internalType": "address", 203 | "name": "from", 204 | "type": "address" 205 | }, 206 | { 207 | "internalType": "address", 208 | "name": "to", 209 | "type": "address" 210 | }, 211 | { 212 | "internalType": "uint256", 213 | "name": "value", 214 | "type": "uint256" 215 | } 216 | ], 217 | "name": "transferFrom", 218 | "outputs": [ 219 | { 220 | "internalType": "bool", 221 | "name": "", 222 | "type": "bool" 223 | } 224 | ], 225 | "stateMutability": "nonpayable", 226 | "type": "function" 227 | } 228 | ], 229 | "bytecode": "0x", 230 | "deployedBytecode": "0x", 231 | "linkReferences": {}, 232 | "deployedLinkReferences": {} 233 | } 234 | -------------------------------------------------------------------------------- /typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Interface, type ContractRunner } from "ethers"; 6 | import type { 7 | ERC20, 8 | ERC20Interface, 9 | } from "../../../../../@openzeppelin/contracts/token/ERC20/ERC20"; 10 | 11 | const _abi = [ 12 | { 13 | inputs: [ 14 | { 15 | internalType: "address", 16 | name: "spender", 17 | type: "address", 18 | }, 19 | { 20 | internalType: "uint256", 21 | name: "allowance", 22 | type: "uint256", 23 | }, 24 | { 25 | internalType: "uint256", 26 | name: "needed", 27 | type: "uint256", 28 | }, 29 | ], 30 | name: "ERC20InsufficientAllowance", 31 | type: "error", 32 | }, 33 | { 34 | inputs: [ 35 | { 36 | internalType: "address", 37 | name: "sender", 38 | type: "address", 39 | }, 40 | { 41 | internalType: "uint256", 42 | name: "balance", 43 | type: "uint256", 44 | }, 45 | { 46 | internalType: "uint256", 47 | name: "needed", 48 | type: "uint256", 49 | }, 50 | ], 51 | name: "ERC20InsufficientBalance", 52 | type: "error", 53 | }, 54 | { 55 | inputs: [ 56 | { 57 | internalType: "address", 58 | name: "approver", 59 | type: "address", 60 | }, 61 | ], 62 | name: "ERC20InvalidApprover", 63 | type: "error", 64 | }, 65 | { 66 | inputs: [ 67 | { 68 | internalType: "address", 69 | name: "receiver", 70 | type: "address", 71 | }, 72 | ], 73 | name: "ERC20InvalidReceiver", 74 | type: "error", 75 | }, 76 | { 77 | inputs: [ 78 | { 79 | internalType: "address", 80 | name: "sender", 81 | type: "address", 82 | }, 83 | ], 84 | name: "ERC20InvalidSender", 85 | type: "error", 86 | }, 87 | { 88 | inputs: [ 89 | { 90 | internalType: "address", 91 | name: "spender", 92 | type: "address", 93 | }, 94 | ], 95 | name: "ERC20InvalidSpender", 96 | type: "error", 97 | }, 98 | { 99 | anonymous: false, 100 | inputs: [ 101 | { 102 | indexed: true, 103 | internalType: "address", 104 | name: "owner", 105 | type: "address", 106 | }, 107 | { 108 | indexed: true, 109 | internalType: "address", 110 | name: "spender", 111 | type: "address", 112 | }, 113 | { 114 | indexed: false, 115 | internalType: "uint256", 116 | name: "value", 117 | type: "uint256", 118 | }, 119 | ], 120 | name: "Approval", 121 | type: "event", 122 | }, 123 | { 124 | anonymous: false, 125 | inputs: [ 126 | { 127 | indexed: true, 128 | internalType: "address", 129 | name: "from", 130 | type: "address", 131 | }, 132 | { 133 | indexed: true, 134 | internalType: "address", 135 | name: "to", 136 | type: "address", 137 | }, 138 | { 139 | indexed: false, 140 | internalType: "uint256", 141 | name: "value", 142 | type: "uint256", 143 | }, 144 | ], 145 | name: "Transfer", 146 | type: "event", 147 | }, 148 | { 149 | inputs: [ 150 | { 151 | internalType: "address", 152 | name: "owner", 153 | type: "address", 154 | }, 155 | { 156 | internalType: "address", 157 | name: "spender", 158 | type: "address", 159 | }, 160 | ], 161 | name: "allowance", 162 | outputs: [ 163 | { 164 | internalType: "uint256", 165 | name: "", 166 | type: "uint256", 167 | }, 168 | ], 169 | stateMutability: "view", 170 | type: "function", 171 | }, 172 | { 173 | inputs: [ 174 | { 175 | internalType: "address", 176 | name: "spender", 177 | type: "address", 178 | }, 179 | { 180 | internalType: "uint256", 181 | name: "value", 182 | type: "uint256", 183 | }, 184 | ], 185 | name: "approve", 186 | outputs: [ 187 | { 188 | internalType: "bool", 189 | name: "", 190 | type: "bool", 191 | }, 192 | ], 193 | stateMutability: "nonpayable", 194 | type: "function", 195 | }, 196 | { 197 | inputs: [ 198 | { 199 | internalType: "address", 200 | name: "account", 201 | type: "address", 202 | }, 203 | ], 204 | name: "balanceOf", 205 | outputs: [ 206 | { 207 | internalType: "uint256", 208 | name: "", 209 | type: "uint256", 210 | }, 211 | ], 212 | stateMutability: "view", 213 | type: "function", 214 | }, 215 | { 216 | inputs: [], 217 | name: "decimals", 218 | outputs: [ 219 | { 220 | internalType: "uint8", 221 | name: "", 222 | type: "uint8", 223 | }, 224 | ], 225 | stateMutability: "view", 226 | type: "function", 227 | }, 228 | { 229 | inputs: [], 230 | name: "name", 231 | outputs: [ 232 | { 233 | internalType: "string", 234 | name: "", 235 | type: "string", 236 | }, 237 | ], 238 | stateMutability: "view", 239 | type: "function", 240 | }, 241 | { 242 | inputs: [], 243 | name: "symbol", 244 | outputs: [ 245 | { 246 | internalType: "string", 247 | name: "", 248 | type: "string", 249 | }, 250 | ], 251 | stateMutability: "view", 252 | type: "function", 253 | }, 254 | { 255 | inputs: [], 256 | name: "totalSupply", 257 | outputs: [ 258 | { 259 | internalType: "uint256", 260 | name: "", 261 | type: "uint256", 262 | }, 263 | ], 264 | stateMutability: "view", 265 | type: "function", 266 | }, 267 | { 268 | inputs: [ 269 | { 270 | internalType: "address", 271 | name: "to", 272 | type: "address", 273 | }, 274 | { 275 | internalType: "uint256", 276 | name: "value", 277 | type: "uint256", 278 | }, 279 | ], 280 | name: "transfer", 281 | outputs: [ 282 | { 283 | internalType: "bool", 284 | name: "", 285 | type: "bool", 286 | }, 287 | ], 288 | stateMutability: "nonpayable", 289 | type: "function", 290 | }, 291 | { 292 | inputs: [ 293 | { 294 | internalType: "address", 295 | name: "from", 296 | type: "address", 297 | }, 298 | { 299 | internalType: "address", 300 | name: "to", 301 | type: "address", 302 | }, 303 | { 304 | internalType: "uint256", 305 | name: "value", 306 | type: "uint256", 307 | }, 308 | ], 309 | name: "transferFrom", 310 | outputs: [ 311 | { 312 | internalType: "bool", 313 | name: "", 314 | type: "bool", 315 | }, 316 | ], 317 | stateMutability: "nonpayable", 318 | type: "function", 319 | }, 320 | ] as const; 321 | 322 | export class ERC20__factory { 323 | static readonly abi = _abi; 324 | static createInterface(): ERC20Interface { 325 | return new Interface(_abi) as ERC20Interface; 326 | } 327 | static connect(address: string, runner?: ContractRunner | null): ERC20 { 328 | return new Contract(address, _abi, runner) as unknown as ERC20; 329 | } 330 | } 331 | -------------------------------------------------------------------------------- /artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "ERC20", 4 | "sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "spender", 11 | "type": "address" 12 | }, 13 | { 14 | "internalType": "uint256", 15 | "name": "allowance", 16 | "type": "uint256" 17 | }, 18 | { 19 | "internalType": "uint256", 20 | "name": "needed", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "ERC20InsufficientAllowance", 25 | "type": "error" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "sender", 32 | "type": "address" 33 | }, 34 | { 35 | "internalType": "uint256", 36 | "name": "balance", 37 | "type": "uint256" 38 | }, 39 | { 40 | "internalType": "uint256", 41 | "name": "needed", 42 | "type": "uint256" 43 | } 44 | ], 45 | "name": "ERC20InsufficientBalance", 46 | "type": "error" 47 | }, 48 | { 49 | "inputs": [ 50 | { 51 | "internalType": "address", 52 | "name": "approver", 53 | "type": "address" 54 | } 55 | ], 56 | "name": "ERC20InvalidApprover", 57 | "type": "error" 58 | }, 59 | { 60 | "inputs": [ 61 | { 62 | "internalType": "address", 63 | "name": "receiver", 64 | "type": "address" 65 | } 66 | ], 67 | "name": "ERC20InvalidReceiver", 68 | "type": "error" 69 | }, 70 | { 71 | "inputs": [ 72 | { 73 | "internalType": "address", 74 | "name": "sender", 75 | "type": "address" 76 | } 77 | ], 78 | "name": "ERC20InvalidSender", 79 | "type": "error" 80 | }, 81 | { 82 | "inputs": [ 83 | { 84 | "internalType": "address", 85 | "name": "spender", 86 | "type": "address" 87 | } 88 | ], 89 | "name": "ERC20InvalidSpender", 90 | "type": "error" 91 | }, 92 | { 93 | "anonymous": false, 94 | "inputs": [ 95 | { 96 | "indexed": true, 97 | "internalType": "address", 98 | "name": "owner", 99 | "type": "address" 100 | }, 101 | { 102 | "indexed": true, 103 | "internalType": "address", 104 | "name": "spender", 105 | "type": "address" 106 | }, 107 | { 108 | "indexed": false, 109 | "internalType": "uint256", 110 | "name": "value", 111 | "type": "uint256" 112 | } 113 | ], 114 | "name": "Approval", 115 | "type": "event" 116 | }, 117 | { 118 | "anonymous": false, 119 | "inputs": [ 120 | { 121 | "indexed": true, 122 | "internalType": "address", 123 | "name": "from", 124 | "type": "address" 125 | }, 126 | { 127 | "indexed": true, 128 | "internalType": "address", 129 | "name": "to", 130 | "type": "address" 131 | }, 132 | { 133 | "indexed": false, 134 | "internalType": "uint256", 135 | "name": "value", 136 | "type": "uint256" 137 | } 138 | ], 139 | "name": "Transfer", 140 | "type": "event" 141 | }, 142 | { 143 | "inputs": [ 144 | { 145 | "internalType": "address", 146 | "name": "owner", 147 | "type": "address" 148 | }, 149 | { 150 | "internalType": "address", 151 | "name": "spender", 152 | "type": "address" 153 | } 154 | ], 155 | "name": "allowance", 156 | "outputs": [ 157 | { 158 | "internalType": "uint256", 159 | "name": "", 160 | "type": "uint256" 161 | } 162 | ], 163 | "stateMutability": "view", 164 | "type": "function" 165 | }, 166 | { 167 | "inputs": [ 168 | { 169 | "internalType": "address", 170 | "name": "spender", 171 | "type": "address" 172 | }, 173 | { 174 | "internalType": "uint256", 175 | "name": "value", 176 | "type": "uint256" 177 | } 178 | ], 179 | "name": "approve", 180 | "outputs": [ 181 | { 182 | "internalType": "bool", 183 | "name": "", 184 | "type": "bool" 185 | } 186 | ], 187 | "stateMutability": "nonpayable", 188 | "type": "function" 189 | }, 190 | { 191 | "inputs": [ 192 | { 193 | "internalType": "address", 194 | "name": "account", 195 | "type": "address" 196 | } 197 | ], 198 | "name": "balanceOf", 199 | "outputs": [ 200 | { 201 | "internalType": "uint256", 202 | "name": "", 203 | "type": "uint256" 204 | } 205 | ], 206 | "stateMutability": "view", 207 | "type": "function" 208 | }, 209 | { 210 | "inputs": [], 211 | "name": "decimals", 212 | "outputs": [ 213 | { 214 | "internalType": "uint8", 215 | "name": "", 216 | "type": "uint8" 217 | } 218 | ], 219 | "stateMutability": "view", 220 | "type": "function" 221 | }, 222 | { 223 | "inputs": [], 224 | "name": "name", 225 | "outputs": [ 226 | { 227 | "internalType": "string", 228 | "name": "", 229 | "type": "string" 230 | } 231 | ], 232 | "stateMutability": "view", 233 | "type": "function" 234 | }, 235 | { 236 | "inputs": [], 237 | "name": "symbol", 238 | "outputs": [ 239 | { 240 | "internalType": "string", 241 | "name": "", 242 | "type": "string" 243 | } 244 | ], 245 | "stateMutability": "view", 246 | "type": "function" 247 | }, 248 | { 249 | "inputs": [], 250 | "name": "totalSupply", 251 | "outputs": [ 252 | { 253 | "internalType": "uint256", 254 | "name": "", 255 | "type": "uint256" 256 | } 257 | ], 258 | "stateMutability": "view", 259 | "type": "function" 260 | }, 261 | { 262 | "inputs": [ 263 | { 264 | "internalType": "address", 265 | "name": "to", 266 | "type": "address" 267 | }, 268 | { 269 | "internalType": "uint256", 270 | "name": "value", 271 | "type": "uint256" 272 | } 273 | ], 274 | "name": "transfer", 275 | "outputs": [ 276 | { 277 | "internalType": "bool", 278 | "name": "", 279 | "type": "bool" 280 | } 281 | ], 282 | "stateMutability": "nonpayable", 283 | "type": "function" 284 | }, 285 | { 286 | "inputs": [ 287 | { 288 | "internalType": "address", 289 | "name": "from", 290 | "type": "address" 291 | }, 292 | { 293 | "internalType": "address", 294 | "name": "to", 295 | "type": "address" 296 | }, 297 | { 298 | "internalType": "uint256", 299 | "name": "value", 300 | "type": "uint256" 301 | } 302 | ], 303 | "name": "transferFrom", 304 | "outputs": [ 305 | { 306 | "internalType": "bool", 307 | "name": "", 308 | "type": "bool" 309 | } 310 | ], 311 | "stateMutability": "nonpayable", 312 | "type": "function" 313 | } 314 | ], 315 | "bytecode": "0x", 316 | "deployedBytecode": "0x", 317 | "linkReferences": {}, 318 | "deployedLinkReferences": {} 319 | } 320 | -------------------------------------------------------------------------------- /contracts/SilverPadFactory.sol: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.24; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; 5 | import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 6 | import "./Silver.sol"; 7 | // Uncomment this line to use console.log 8 | import "hardhat/console.sol"; 9 | 10 | contract SilverPadFactory { 11 | ///@dev owner of the factory 12 | address public owner; 13 | 14 | ///@dev cryptoSIDADAO address 15 | address public cryptoSIDADAO = 0x5B98a0c38d3684644A9Ada0baaeAae452aE3267B; 16 | 17 | ///@dev DAI ERC20 token 18 | IERC20 public immutable daiToken; 19 | 20 | ///@dev spam filter fee amount 100DAI with 18 decimals 21 | uint256 public feeAmount = 100 ether; 22 | 23 | ///@dev tracks spam filter fee contributions of investors 24 | mapping(address => uint256) public feeContributions; 25 | 26 | ///@dev created ICOs 27 | address[] public silvers; 28 | 29 | ///@dev ICO is launched 30 | mapping(address => bool) public isSilver; 31 | 32 | /// @dev event when user paid 100DAI spam filter fee 33 | event PaidSpamFilterFee(address user, uint256 amount); 34 | 35 | /// @dev event when new ICO is created 36 | event ICOCreated( 37 | address creator, 38 | address ico, 39 | string projectURI, 40 | uint256 softcap, 41 | uint256 hardcap, 42 | uint256 startTime, 43 | uint256 endTime, 44 | string name, 45 | string symbol, 46 | uint256 price, 47 | uint256 decimal, 48 | uint256 totalSupply, 49 | address tokenAddress, 50 | address fundsAddress, 51 | address lister 52 | ); 53 | 54 | /// @dev validate if address is non-zero 55 | modifier notZeroAddress(address address_) { 56 | require(address_ != address(0), "Invalid address"); 57 | _; 58 | } 59 | 60 | /// @dev validate if paid 100DAI spam filter fee 61 | modifier spamFilterFeePaid(address user_) { 62 | require( 63 | feeContributions[user_] >= feeAmount, 64 | "Not paid spam filter fee" 65 | ); 66 | _; 67 | } 68 | 69 | /// @dev validate endtime is valid 70 | modifier isFuture(uint256 endTime_) { 71 | require(endTime_ > block.timestamp, "End time should be in the future"); 72 | _; 73 | } 74 | 75 | /// @dev validate softcap & hardcap setting 76 | modifier capSettingValid(uint256 softcap_, uint256 hardcap_) { 77 | require(softcap_ > 0, "Softcap must be greater than 0"); 78 | require(hardcap_ > softcap_, "Hardcap must be greater than softcap"); 79 | _; 80 | } 81 | 82 | /// @dev validate if token price is zero 83 | modifier notZeroValue(uint256 price_) { 84 | require(price_ > 0, "Value must be greater than 0"); 85 | _; 86 | } 87 | 88 | /// @dev validate if funds can reach the hardcap for this token 89 | modifier totalSupplyAbleToReachHardcap( 90 | uint price_, 91 | uint totalSupply_, 92 | uint decimal_, 93 | uint hardcap_ 94 | ) { 95 | require( 96 | (price_ * totalSupply_) / 10 ** decimal_ >= hardcap_, 97 | "Have to be able to reach hardcap" 98 | ); 99 | _; 100 | } 101 | 102 | /** 103 | * @dev contructor 104 | * @param daiAddress_ DAI stable coin address for paying spam filter fee... 105 | * @param cryptoSIDADAO_ cryptoSI DAODAO address... 106 | */ 107 | constructor( 108 | address daiAddress_, 109 | address cryptoSIDADAO_ 110 | ) notZeroAddress(cryptoSIDADAO_) { 111 | require(daiAddress_ != address(0), "Invalid DAI address"); 112 | daiToken = IERC20(daiAddress_); 113 | cryptoSIDADAO = cryptoSIDADAO_; 114 | owner = msg.sender; 115 | } 116 | 117 | /** 118 | * @dev Pay non-refundable spam filter fee of 100DAI 119 | */ 120 | function paySpamFilterFee() external { 121 | uint256 _allowance = daiToken.allowance(msg.sender, address(this)); 122 | require(_allowance >= feeAmount, "Insufficient DAI allowance"); 123 | 124 | SafeERC20.safeTransferFrom( 125 | daiToken, 126 | msg.sender, 127 | cryptoSIDADAO, 128 | feeAmount 129 | ); 130 | feeContributions[msg.sender] += feeAmount; 131 | 132 | emit PaidSpamFilterFee(msg.sender, feeAmount); 133 | } 134 | /** 135 | * @dev launch new ICO 136 | * @param projectURI_ project metadata uri "https://ipfs.." 137 | * @param softcap_ softcap for ICO 100 * 10**18 138 | * @param hardcap_ hardcap for ICO 200 * 10**18 139 | * @param endTime_ ICO end time 1762819200000 140 | * @param name_ token name "vulcan token" 141 | * @param symbol_ token symbol "$VULCAN" 142 | * @param price_ token price for ICO 0.01 * 10**18 143 | * @param decimal_ token decimal 18 144 | * @param totalSupply_ token totalSupply 1000000000 * 10**18 145 | * @param tokenAddress_ token address 146 | * @param fundsAddress_ account address that funds will go to 147 | * @param lister_ listing partner's address 148 | */ 149 | function launchNewICO( 150 | string memory projectURI_, 151 | string memory name_, 152 | string memory symbol_, 153 | uint256 totalSupply_, 154 | uint256 decimal_, 155 | uint256 price_, 156 | address tokenAddress_, 157 | address lister_, 158 | address fundsAddress_, 159 | uint256 softcap_, 160 | uint256 hardcap_, 161 | uint256 endTime_ 162 | ) 163 | public 164 | spamFilterFeePaid(msg.sender) 165 | capSettingValid(softcap_, hardcap_) 166 | isFuture(endTime_) 167 | notZeroAddress(tokenAddress_) 168 | notZeroAddress(fundsAddress_) 169 | notZeroValue(price_) 170 | totalSupplyAbleToReachHardcap(price_, totalSupply_, decimal_, hardcap_) 171 | notZeroValue(decimal_) 172 | notZeroValue(totalSupply_) 173 | returns (address) 174 | { 175 | Silver _newSilver = new Silver( 176 | projectURI_, 177 | name_, 178 | symbol_, 179 | totalSupply_, 180 | decimal_, 181 | price_, 182 | msg.sender, 183 | tokenAddress_, 184 | lister_, 185 | cryptoSIDADAO, 186 | fundsAddress_, 187 | softcap_, 188 | hardcap_, 189 | endTime_ 190 | ); 191 | 192 | address _silver = address(_newSilver); 193 | silvers.push(_silver); 194 | feeContributions[msg.sender] -= feeAmount; 195 | 196 | emit ICOCreated( 197 | msg.sender, 198 | _silver, 199 | projectURI_, 200 | softcap_, 201 | hardcap_, 202 | block.timestamp, 203 | endTime_, 204 | name_, 205 | symbol_, 206 | price_, 207 | decimal_, 208 | totalSupply_, 209 | tokenAddress_, 210 | fundsAddress_, 211 | lister_ 212 | ); 213 | return _silver; 214 | } 215 | /** 216 | * @dev set DAO address 217 | */ 218 | function setDAOAddress( 219 | address cryptoSIDADAO_ 220 | ) external notZeroAddress(cryptoSIDADAO_) { 221 | cryptoSIDADAO = cryptoSIDADAO_; 222 | } 223 | 224 | /** 225 | * @dev Test whether the user has already paid the spam filter fee of 100DAI 226 | */ 227 | function paidSpamFilterFee(address user_) external view returns (bool) { 228 | bool _success = feeContributions[user_] >= feeAmount; 229 | return _success; 230 | } 231 | 232 | /** 233 | * @dev get all ico lists 234 | */ 235 | function getSilvers() public view returns (address[] memory) { 236 | return silvers; 237 | } 238 | 239 | /** 240 | * @dev set factory's owner 241 | */ 242 | function setOwner(address owner_) external { 243 | require(owner_ != address(0), "Owner address is not zero!"); 244 | owner = owner_; 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../../../../common"; 25 | 26 | export interface IERC20Interface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "allowance" 30 | | "approve" 31 | | "balanceOf" 32 | | "totalSupply" 33 | | "transfer" 34 | | "transferFrom" 35 | ): FunctionFragment; 36 | 37 | getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; 38 | 39 | encodeFunctionData( 40 | functionFragment: "allowance", 41 | values: [AddressLike, AddressLike] 42 | ): string; 43 | encodeFunctionData( 44 | functionFragment: "approve", 45 | values: [AddressLike, BigNumberish] 46 | ): string; 47 | encodeFunctionData( 48 | functionFragment: "balanceOf", 49 | values: [AddressLike] 50 | ): string; 51 | encodeFunctionData( 52 | functionFragment: "totalSupply", 53 | values?: undefined 54 | ): string; 55 | encodeFunctionData( 56 | functionFragment: "transfer", 57 | values: [AddressLike, BigNumberish] 58 | ): string; 59 | encodeFunctionData( 60 | functionFragment: "transferFrom", 61 | values: [AddressLike, AddressLike, BigNumberish] 62 | ): string; 63 | 64 | decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; 65 | decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; 66 | decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; 67 | decodeFunctionResult( 68 | functionFragment: "totalSupply", 69 | data: BytesLike 70 | ): Result; 71 | decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; 72 | decodeFunctionResult( 73 | functionFragment: "transferFrom", 74 | data: BytesLike 75 | ): Result; 76 | } 77 | 78 | export namespace ApprovalEvent { 79 | export type InputTuple = [ 80 | owner: AddressLike, 81 | spender: AddressLike, 82 | value: BigNumberish 83 | ]; 84 | export type OutputTuple = [owner: string, spender: string, value: bigint]; 85 | export interface OutputObject { 86 | owner: string; 87 | spender: string; 88 | value: bigint; 89 | } 90 | export type Event = TypedContractEvent; 91 | export type Filter = TypedDeferredTopicFilter; 92 | export type Log = TypedEventLog; 93 | export type LogDescription = TypedLogDescription; 94 | } 95 | 96 | export namespace TransferEvent { 97 | export type InputTuple = [ 98 | from: AddressLike, 99 | to: AddressLike, 100 | value: BigNumberish 101 | ]; 102 | export type OutputTuple = [from: string, to: string, value: bigint]; 103 | export interface OutputObject { 104 | from: string; 105 | to: string; 106 | value: bigint; 107 | } 108 | export type Event = TypedContractEvent; 109 | export type Filter = TypedDeferredTopicFilter; 110 | export type Log = TypedEventLog; 111 | export type LogDescription = TypedLogDescription; 112 | } 113 | 114 | export interface IERC20 extends BaseContract { 115 | connect(runner?: ContractRunner | null): IERC20; 116 | waitForDeployment(): Promise; 117 | 118 | interface: IERC20Interface; 119 | 120 | queryFilter( 121 | event: TCEvent, 122 | fromBlockOrBlockhash?: string | number | undefined, 123 | toBlock?: string | number | undefined 124 | ): Promise>>; 125 | queryFilter( 126 | filter: TypedDeferredTopicFilter, 127 | fromBlockOrBlockhash?: string | number | undefined, 128 | toBlock?: string | number | undefined 129 | ): Promise>>; 130 | 131 | on( 132 | event: TCEvent, 133 | listener: TypedListener 134 | ): Promise; 135 | on( 136 | filter: TypedDeferredTopicFilter, 137 | listener: TypedListener 138 | ): Promise; 139 | 140 | once( 141 | event: TCEvent, 142 | listener: TypedListener 143 | ): Promise; 144 | once( 145 | filter: TypedDeferredTopicFilter, 146 | listener: TypedListener 147 | ): Promise; 148 | 149 | listeners( 150 | event: TCEvent 151 | ): Promise>>; 152 | listeners(eventName?: string): Promise>; 153 | removeAllListeners( 154 | event?: TCEvent 155 | ): Promise; 156 | 157 | allowance: TypedContractMethod< 158 | [owner: AddressLike, spender: AddressLike], 159 | [bigint], 160 | "view" 161 | >; 162 | 163 | approve: TypedContractMethod< 164 | [spender: AddressLike, value: BigNumberish], 165 | [boolean], 166 | "nonpayable" 167 | >; 168 | 169 | balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; 170 | 171 | totalSupply: TypedContractMethod<[], [bigint], "view">; 172 | 173 | transfer: TypedContractMethod< 174 | [to: AddressLike, value: BigNumberish], 175 | [boolean], 176 | "nonpayable" 177 | >; 178 | 179 | transferFrom: TypedContractMethod< 180 | [from: AddressLike, to: AddressLike, value: BigNumberish], 181 | [boolean], 182 | "nonpayable" 183 | >; 184 | 185 | getFunction( 186 | key: string | FunctionFragment 187 | ): T; 188 | 189 | getFunction( 190 | nameOrSignature: "allowance" 191 | ): TypedContractMethod< 192 | [owner: AddressLike, spender: AddressLike], 193 | [bigint], 194 | "view" 195 | >; 196 | getFunction( 197 | nameOrSignature: "approve" 198 | ): TypedContractMethod< 199 | [spender: AddressLike, value: BigNumberish], 200 | [boolean], 201 | "nonpayable" 202 | >; 203 | getFunction( 204 | nameOrSignature: "balanceOf" 205 | ): TypedContractMethod<[account: AddressLike], [bigint], "view">; 206 | getFunction( 207 | nameOrSignature: "totalSupply" 208 | ): TypedContractMethod<[], [bigint], "view">; 209 | getFunction( 210 | nameOrSignature: "transfer" 211 | ): TypedContractMethod< 212 | [to: AddressLike, value: BigNumberish], 213 | [boolean], 214 | "nonpayable" 215 | >; 216 | getFunction( 217 | nameOrSignature: "transferFrom" 218 | ): TypedContractMethod< 219 | [from: AddressLike, to: AddressLike, value: BigNumberish], 220 | [boolean], 221 | "nonpayable" 222 | >; 223 | 224 | getEvent( 225 | key: "Approval" 226 | ): TypedContractEvent< 227 | ApprovalEvent.InputTuple, 228 | ApprovalEvent.OutputTuple, 229 | ApprovalEvent.OutputObject 230 | >; 231 | getEvent( 232 | key: "Transfer" 233 | ): TypedContractEvent< 234 | TransferEvent.InputTuple, 235 | TransferEvent.OutputTuple, 236 | TransferEvent.OutputObject 237 | >; 238 | 239 | filters: { 240 | "Approval(address,address,uint256)": TypedContractEvent< 241 | ApprovalEvent.InputTuple, 242 | ApprovalEvent.OutputTuple, 243 | ApprovalEvent.OutputObject 244 | >; 245 | Approval: TypedContractEvent< 246 | ApprovalEvent.InputTuple, 247 | ApprovalEvent.OutputTuple, 248 | ApprovalEvent.OutputObject 249 | >; 250 | 251 | "Transfer(address,address,uint256)": TypedContractEvent< 252 | TransferEvent.InputTuple, 253 | TransferEvent.OutputTuple, 254 | TransferEvent.OutputObject 255 | >; 256 | Transfer: TypedContractEvent< 257 | TransferEvent.InputTuple, 258 | TransferEvent.OutputTuple, 259 | TransferEvent.OutputObject 260 | >; 261 | }; 262 | } 263 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../../../../common"; 25 | 26 | export interface ERC20Interface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "allowance" 30 | | "approve" 31 | | "balanceOf" 32 | | "decimals" 33 | | "name" 34 | | "symbol" 35 | | "totalSupply" 36 | | "transfer" 37 | | "transferFrom" 38 | ): FunctionFragment; 39 | 40 | getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; 41 | 42 | encodeFunctionData( 43 | functionFragment: "allowance", 44 | values: [AddressLike, AddressLike] 45 | ): string; 46 | encodeFunctionData( 47 | functionFragment: "approve", 48 | values: [AddressLike, BigNumberish] 49 | ): string; 50 | encodeFunctionData( 51 | functionFragment: "balanceOf", 52 | values: [AddressLike] 53 | ): string; 54 | encodeFunctionData(functionFragment: "decimals", values?: undefined): string; 55 | encodeFunctionData(functionFragment: "name", values?: undefined): string; 56 | encodeFunctionData(functionFragment: "symbol", values?: undefined): string; 57 | encodeFunctionData( 58 | functionFragment: "totalSupply", 59 | values?: undefined 60 | ): string; 61 | encodeFunctionData( 62 | functionFragment: "transfer", 63 | values: [AddressLike, BigNumberish] 64 | ): string; 65 | encodeFunctionData( 66 | functionFragment: "transferFrom", 67 | values: [AddressLike, AddressLike, BigNumberish] 68 | ): string; 69 | 70 | decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; 71 | decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; 72 | decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; 73 | decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; 74 | decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; 75 | decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; 76 | decodeFunctionResult( 77 | functionFragment: "totalSupply", 78 | data: BytesLike 79 | ): Result; 80 | decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; 81 | decodeFunctionResult( 82 | functionFragment: "transferFrom", 83 | data: BytesLike 84 | ): Result; 85 | } 86 | 87 | export namespace ApprovalEvent { 88 | export type InputTuple = [ 89 | owner: AddressLike, 90 | spender: AddressLike, 91 | value: BigNumberish 92 | ]; 93 | export type OutputTuple = [owner: string, spender: string, value: bigint]; 94 | export interface OutputObject { 95 | owner: string; 96 | spender: string; 97 | value: bigint; 98 | } 99 | export type Event = TypedContractEvent; 100 | export type Filter = TypedDeferredTopicFilter; 101 | export type Log = TypedEventLog; 102 | export type LogDescription = TypedLogDescription; 103 | } 104 | 105 | export namespace TransferEvent { 106 | export type InputTuple = [ 107 | from: AddressLike, 108 | to: AddressLike, 109 | value: BigNumberish 110 | ]; 111 | export type OutputTuple = [from: string, to: string, value: bigint]; 112 | export interface OutputObject { 113 | from: string; 114 | to: string; 115 | value: bigint; 116 | } 117 | export type Event = TypedContractEvent; 118 | export type Filter = TypedDeferredTopicFilter; 119 | export type Log = TypedEventLog; 120 | export type LogDescription = TypedLogDescription; 121 | } 122 | 123 | export interface ERC20 extends BaseContract { 124 | connect(runner?: ContractRunner | null): ERC20; 125 | waitForDeployment(): Promise; 126 | 127 | interface: ERC20Interface; 128 | 129 | queryFilter( 130 | event: TCEvent, 131 | fromBlockOrBlockhash?: string | number | undefined, 132 | toBlock?: string | number | undefined 133 | ): Promise>>; 134 | queryFilter( 135 | filter: TypedDeferredTopicFilter, 136 | fromBlockOrBlockhash?: string | number | undefined, 137 | toBlock?: string | number | undefined 138 | ): Promise>>; 139 | 140 | on( 141 | event: TCEvent, 142 | listener: TypedListener 143 | ): Promise; 144 | on( 145 | filter: TypedDeferredTopicFilter, 146 | listener: TypedListener 147 | ): Promise; 148 | 149 | once( 150 | event: TCEvent, 151 | listener: TypedListener 152 | ): Promise; 153 | once( 154 | filter: TypedDeferredTopicFilter, 155 | listener: TypedListener 156 | ): Promise; 157 | 158 | listeners( 159 | event: TCEvent 160 | ): Promise>>; 161 | listeners(eventName?: string): Promise>; 162 | removeAllListeners( 163 | event?: TCEvent 164 | ): Promise; 165 | 166 | allowance: TypedContractMethod< 167 | [owner: AddressLike, spender: AddressLike], 168 | [bigint], 169 | "view" 170 | >; 171 | 172 | approve: TypedContractMethod< 173 | [spender: AddressLike, value: BigNumberish], 174 | [boolean], 175 | "nonpayable" 176 | >; 177 | 178 | balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; 179 | 180 | decimals: TypedContractMethod<[], [bigint], "view">; 181 | 182 | name: TypedContractMethod<[], [string], "view">; 183 | 184 | symbol: TypedContractMethod<[], [string], "view">; 185 | 186 | totalSupply: TypedContractMethod<[], [bigint], "view">; 187 | 188 | transfer: TypedContractMethod< 189 | [to: AddressLike, value: BigNumberish], 190 | [boolean], 191 | "nonpayable" 192 | >; 193 | 194 | transferFrom: TypedContractMethod< 195 | [from: AddressLike, to: AddressLike, value: BigNumberish], 196 | [boolean], 197 | "nonpayable" 198 | >; 199 | 200 | getFunction( 201 | key: string | FunctionFragment 202 | ): T; 203 | 204 | getFunction( 205 | nameOrSignature: "allowance" 206 | ): TypedContractMethod< 207 | [owner: AddressLike, spender: AddressLike], 208 | [bigint], 209 | "view" 210 | >; 211 | getFunction( 212 | nameOrSignature: "approve" 213 | ): TypedContractMethod< 214 | [spender: AddressLike, value: BigNumberish], 215 | [boolean], 216 | "nonpayable" 217 | >; 218 | getFunction( 219 | nameOrSignature: "balanceOf" 220 | ): TypedContractMethod<[account: AddressLike], [bigint], "view">; 221 | getFunction( 222 | nameOrSignature: "decimals" 223 | ): TypedContractMethod<[], [bigint], "view">; 224 | getFunction( 225 | nameOrSignature: "name" 226 | ): TypedContractMethod<[], [string], "view">; 227 | getFunction( 228 | nameOrSignature: "symbol" 229 | ): TypedContractMethod<[], [string], "view">; 230 | getFunction( 231 | nameOrSignature: "totalSupply" 232 | ): TypedContractMethod<[], [bigint], "view">; 233 | getFunction( 234 | nameOrSignature: "transfer" 235 | ): TypedContractMethod< 236 | [to: AddressLike, value: BigNumberish], 237 | [boolean], 238 | "nonpayable" 239 | >; 240 | getFunction( 241 | nameOrSignature: "transferFrom" 242 | ): TypedContractMethod< 243 | [from: AddressLike, to: AddressLike, value: BigNumberish], 244 | [boolean], 245 | "nonpayable" 246 | >; 247 | 248 | getEvent( 249 | key: "Approval" 250 | ): TypedContractEvent< 251 | ApprovalEvent.InputTuple, 252 | ApprovalEvent.OutputTuple, 253 | ApprovalEvent.OutputObject 254 | >; 255 | getEvent( 256 | key: "Transfer" 257 | ): TypedContractEvent< 258 | TransferEvent.InputTuple, 259 | TransferEvent.OutputTuple, 260 | TransferEvent.OutputObject 261 | >; 262 | 263 | filters: { 264 | "Approval(address,address,uint256)": TypedContractEvent< 265 | ApprovalEvent.InputTuple, 266 | ApprovalEvent.OutputTuple, 267 | ApprovalEvent.OutputObject 268 | >; 269 | Approval: TypedContractEvent< 270 | ApprovalEvent.InputTuple, 271 | ApprovalEvent.OutputTuple, 272 | ApprovalEvent.OutputObject 273 | >; 274 | 275 | "Transfer(address,address,uint256)": TypedContractEvent< 276 | TransferEvent.InputTuple, 277 | TransferEvent.OutputTuple, 278 | TransferEvent.OutputObject 279 | >; 280 | Transfer: TypedContractEvent< 281 | TransferEvent.InputTuple, 282 | TransferEvent.OutputTuple, 283 | TransferEvent.OutputObject 284 | >; 285 | }; 286 | } 287 | -------------------------------------------------------------------------------- /typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../../../../../common"; 25 | 26 | export interface IERC20MetadataInterface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "allowance" 30 | | "approve" 31 | | "balanceOf" 32 | | "decimals" 33 | | "name" 34 | | "symbol" 35 | | "totalSupply" 36 | | "transfer" 37 | | "transferFrom" 38 | ): FunctionFragment; 39 | 40 | getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; 41 | 42 | encodeFunctionData( 43 | functionFragment: "allowance", 44 | values: [AddressLike, AddressLike] 45 | ): string; 46 | encodeFunctionData( 47 | functionFragment: "approve", 48 | values: [AddressLike, BigNumberish] 49 | ): string; 50 | encodeFunctionData( 51 | functionFragment: "balanceOf", 52 | values: [AddressLike] 53 | ): string; 54 | encodeFunctionData(functionFragment: "decimals", values?: undefined): string; 55 | encodeFunctionData(functionFragment: "name", values?: undefined): string; 56 | encodeFunctionData(functionFragment: "symbol", values?: undefined): string; 57 | encodeFunctionData( 58 | functionFragment: "totalSupply", 59 | values?: undefined 60 | ): string; 61 | encodeFunctionData( 62 | functionFragment: "transfer", 63 | values: [AddressLike, BigNumberish] 64 | ): string; 65 | encodeFunctionData( 66 | functionFragment: "transferFrom", 67 | values: [AddressLike, AddressLike, BigNumberish] 68 | ): string; 69 | 70 | decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; 71 | decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; 72 | decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; 73 | decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; 74 | decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; 75 | decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; 76 | decodeFunctionResult( 77 | functionFragment: "totalSupply", 78 | data: BytesLike 79 | ): Result; 80 | decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; 81 | decodeFunctionResult( 82 | functionFragment: "transferFrom", 83 | data: BytesLike 84 | ): Result; 85 | } 86 | 87 | export namespace ApprovalEvent { 88 | export type InputTuple = [ 89 | owner: AddressLike, 90 | spender: AddressLike, 91 | value: BigNumberish 92 | ]; 93 | export type OutputTuple = [owner: string, spender: string, value: bigint]; 94 | export interface OutputObject { 95 | owner: string; 96 | spender: string; 97 | value: bigint; 98 | } 99 | export type Event = TypedContractEvent; 100 | export type Filter = TypedDeferredTopicFilter; 101 | export type Log = TypedEventLog; 102 | export type LogDescription = TypedLogDescription; 103 | } 104 | 105 | export namespace TransferEvent { 106 | export type InputTuple = [ 107 | from: AddressLike, 108 | to: AddressLike, 109 | value: BigNumberish 110 | ]; 111 | export type OutputTuple = [from: string, to: string, value: bigint]; 112 | export interface OutputObject { 113 | from: string; 114 | to: string; 115 | value: bigint; 116 | } 117 | export type Event = TypedContractEvent; 118 | export type Filter = TypedDeferredTopicFilter; 119 | export type Log = TypedEventLog; 120 | export type LogDescription = TypedLogDescription; 121 | } 122 | 123 | export interface IERC20Metadata extends BaseContract { 124 | connect(runner?: ContractRunner | null): IERC20Metadata; 125 | waitForDeployment(): Promise; 126 | 127 | interface: IERC20MetadataInterface; 128 | 129 | queryFilter( 130 | event: TCEvent, 131 | fromBlockOrBlockhash?: string | number | undefined, 132 | toBlock?: string | number | undefined 133 | ): Promise>>; 134 | queryFilter( 135 | filter: TypedDeferredTopicFilter, 136 | fromBlockOrBlockhash?: string | number | undefined, 137 | toBlock?: string | number | undefined 138 | ): Promise>>; 139 | 140 | on( 141 | event: TCEvent, 142 | listener: TypedListener 143 | ): Promise; 144 | on( 145 | filter: TypedDeferredTopicFilter, 146 | listener: TypedListener 147 | ): Promise; 148 | 149 | once( 150 | event: TCEvent, 151 | listener: TypedListener 152 | ): Promise; 153 | once( 154 | filter: TypedDeferredTopicFilter, 155 | listener: TypedListener 156 | ): Promise; 157 | 158 | listeners( 159 | event: TCEvent 160 | ): Promise>>; 161 | listeners(eventName?: string): Promise>; 162 | removeAllListeners( 163 | event?: TCEvent 164 | ): Promise; 165 | 166 | allowance: TypedContractMethod< 167 | [owner: AddressLike, spender: AddressLike], 168 | [bigint], 169 | "view" 170 | >; 171 | 172 | approve: TypedContractMethod< 173 | [spender: AddressLike, value: BigNumberish], 174 | [boolean], 175 | "nonpayable" 176 | >; 177 | 178 | balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; 179 | 180 | decimals: TypedContractMethod<[], [bigint], "view">; 181 | 182 | name: TypedContractMethod<[], [string], "view">; 183 | 184 | symbol: TypedContractMethod<[], [string], "view">; 185 | 186 | totalSupply: TypedContractMethod<[], [bigint], "view">; 187 | 188 | transfer: TypedContractMethod< 189 | [to: AddressLike, value: BigNumberish], 190 | [boolean], 191 | "nonpayable" 192 | >; 193 | 194 | transferFrom: TypedContractMethod< 195 | [from: AddressLike, to: AddressLike, value: BigNumberish], 196 | [boolean], 197 | "nonpayable" 198 | >; 199 | 200 | getFunction( 201 | key: string | FunctionFragment 202 | ): T; 203 | 204 | getFunction( 205 | nameOrSignature: "allowance" 206 | ): TypedContractMethod< 207 | [owner: AddressLike, spender: AddressLike], 208 | [bigint], 209 | "view" 210 | >; 211 | getFunction( 212 | nameOrSignature: "approve" 213 | ): TypedContractMethod< 214 | [spender: AddressLike, value: BigNumberish], 215 | [boolean], 216 | "nonpayable" 217 | >; 218 | getFunction( 219 | nameOrSignature: "balanceOf" 220 | ): TypedContractMethod<[account: AddressLike], [bigint], "view">; 221 | getFunction( 222 | nameOrSignature: "decimals" 223 | ): TypedContractMethod<[], [bigint], "view">; 224 | getFunction( 225 | nameOrSignature: "name" 226 | ): TypedContractMethod<[], [string], "view">; 227 | getFunction( 228 | nameOrSignature: "symbol" 229 | ): TypedContractMethod<[], [string], "view">; 230 | getFunction( 231 | nameOrSignature: "totalSupply" 232 | ): TypedContractMethod<[], [bigint], "view">; 233 | getFunction( 234 | nameOrSignature: "transfer" 235 | ): TypedContractMethod< 236 | [to: AddressLike, value: BigNumberish], 237 | [boolean], 238 | "nonpayable" 239 | >; 240 | getFunction( 241 | nameOrSignature: "transferFrom" 242 | ): TypedContractMethod< 243 | [from: AddressLike, to: AddressLike, value: BigNumberish], 244 | [boolean], 245 | "nonpayable" 246 | >; 247 | 248 | getEvent( 249 | key: "Approval" 250 | ): TypedContractEvent< 251 | ApprovalEvent.InputTuple, 252 | ApprovalEvent.OutputTuple, 253 | ApprovalEvent.OutputObject 254 | >; 255 | getEvent( 256 | key: "Transfer" 257 | ): TypedContractEvent< 258 | TransferEvent.InputTuple, 259 | TransferEvent.OutputTuple, 260 | TransferEvent.OutputObject 261 | >; 262 | 263 | filters: { 264 | "Approval(address,address,uint256)": TypedContractEvent< 265 | ApprovalEvent.InputTuple, 266 | ApprovalEvent.OutputTuple, 267 | ApprovalEvent.OutputObject 268 | >; 269 | Approval: TypedContractEvent< 270 | ApprovalEvent.InputTuple, 271 | ApprovalEvent.OutputTuple, 272 | ApprovalEvent.OutputObject 273 | >; 274 | 275 | "Transfer(address,address,uint256)": TypedContractEvent< 276 | TransferEvent.InputTuple, 277 | TransferEvent.OutputTuple, 278 | TransferEvent.OutputObject 279 | >; 280 | Transfer: TypedContractEvent< 281 | TransferEvent.InputTuple, 282 | TransferEvent.OutputTuple, 283 | TransferEvent.OutputObject 284 | >; 285 | }; 286 | } 287 | -------------------------------------------------------------------------------- /test/factory.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | import { time } from "@nomicfoundation/hardhat-network-helpers"; 3 | 4 | describe("Factory Contract Test", function () { 5 | let silverPadFactory: any; 6 | let ico: any; 7 | 8 | let dew: any; 9 | let dai: any; 10 | let owner: any; 11 | let user: any; 12 | let user1: any; 13 | let user2: any; 14 | let lister: any; 15 | let contributor1: any; 16 | let contributor2: any; 17 | const daoAddress: any = "0x5B98a0c38d3684644A9Ada0baaeAae452aE3267B"; 18 | 19 | const _endTime = Math.floor(new Date("2024-11-30").getTime() / 1000); 20 | 21 | it("should deploy DAI contract", async function () { 22 | [owner, user, user1, user2, lister, contributor1, contributor2] = await ethers.getSigners(); 23 | 24 | // Get the first account as the owner 25 | const DAIInstance = await ethers.getContractFactory("DAI"); 26 | dai = await DAIInstance.connect(user).deploy(1000000); 27 | 28 | console.log('\tDAI token deployed at:', await dai.getAddress()); 29 | console.log("\tuser's dai balance: ", await dai.balanceOf(await user.address)); 30 | }) 31 | 32 | it("should deploy DEW contract", async function () { 33 | // Get the first account as the owner 34 | const DEWInstance = await ethers.getContractFactory("DEW"); 35 | dew = await DEWInstance.connect(user).deploy(); 36 | 37 | console.log('\tDEW token deployed at:', await dew.getAddress()); 38 | console.log("\tuser's dew balance: ", await dew.balanceOf(await user.address)); 39 | }); 40 | 41 | it("should deploy Factory contract", async function () { 42 | const SilverFactoryInstance = await ethers.getContractFactory("SilverPadFactory"); 43 | silverPadFactory = await SilverFactoryInstance.deploy(await dai.getAddress(), daoAddress); 44 | 45 | console.log('\tSilverPadFactory deployed at:', await silverPadFactory.getAddress()); 46 | }); 47 | 48 | it("test for deploying Silver ICO", async function () { 49 | 50 | console.log("user's fee before: ", await silverPadFactory.feeContributions(await user.address)); 51 | console.log("user's dai balance before: ", await dai.balanceOf(await user.address)); 52 | console.log("user's isPaidSpmaFilterFee", await silverPadFactory.paidSpamFilterFee(user.address)); 53 | 54 | await dai.connect(user).approve(await silverPadFactory.getAddress(), ethers.parseEther("100")); 55 | await silverPadFactory.connect(user).paySpamFilterFee(); 56 | 57 | console.log("user's fee: ", await silverPadFactory.feeContributions(await user.address)); 58 | console.log("user's dai balance: ", await dai.balanceOf(await user.address)); 59 | console.log("user's isPaidSpmaFilterFee", await silverPadFactory.paidSpamFilterFee(user.address)); 60 | 61 | //ICO information for deployment... 62 | const _projectURI = "https://ipfs:werwqerwerqwer"; 63 | const _softcap = ethers.parseEther("0.5"); 64 | const _hardcap = ethers.parseEther("1"); 65 | const _symbol = "DEW"; 66 | const _name = "Dreams Evolving Widely"; 67 | const _price = ethers.parseEther("0.000000393218720152"); 68 | const _decimals = 18; 69 | const _totalSupply = "10,000,000,000,000,000,000,000,000,000,000,000"; 70 | const _tokenAddress = await dew.getAddress(); 71 | const _fundsAddress = "0xC80e9598cC9B3474Ac55888b01521a1E206385da"; 72 | 73 | await silverPadFactory.connect(user).launchNewICO( 74 | _projectURI, 75 | _softcap, 76 | _hardcap, 77 | _endTime, 78 | _symbol, 79 | _name, 80 | _price, 81 | _decimals, 82 | _totalSupply, 83 | _tokenAddress, 84 | _fundsAddress, 85 | lister.address 86 | ); 87 | // console.log("user's fee: ", await silverPadFactory.feeContributions(await user.address)) 88 | const _silvers = await silverPadFactory.getVulcans(); 89 | console.log("ICOs: ", _silvers); 90 | 91 | const silverInstance = await ethers.getContractFactory("Silver"); 92 | ico = await silverInstance.attach(_silvers[0]); 93 | }); 94 | 95 | it("test ICO info", async function () { 96 | const _totalCap = await ico.totalCap() 97 | const _tokenInfo = await ico.tokenInfo(); 98 | const _hardcap = await ico.hardcap(); 99 | const _softcap = await ico.softcap(); 100 | const _creator = await ico.creator(); 101 | 102 | const _distribution = await ico.distribution(); 103 | const _refund = await ico.refund(); 104 | const _history = await ico.getHistory(); 105 | 106 | console.log({ 107 | _distribution, 108 | _refund, 109 | _history, 110 | _tokenInfo, 111 | _softcap, 112 | _hardcap, 113 | _creator, 114 | _totalCap, 115 | }); 116 | }); 117 | 118 | it("Check the balance of all addresses", async function () { 119 | const listerAmount = await ethers.provider.getBalance(lister.address); 120 | console.log("lister ", ethers.formatEther(listerAmount)); 121 | const contributor1Amount = await ethers.provider.getBalance(contributor1.address); 122 | console.log("contributor1 ", ethers.formatEther(contributor1Amount)); 123 | const contributor2Amount = await ethers.provider.getBalance(contributor2.address); 124 | console.log("contributor2 ", await ethers.formatEther(contributor2Amount)); 125 | const daoAmount = await ethers.provider.getBalance(daoAddress); 126 | console.log("dao ", await ethers.formatEther(daoAmount)); 127 | const userAmount = await ethers.provider.getBalance(user.address); 128 | console.log("creator ", await ethers.formatEther(userAmount)); 129 | }); 130 | 131 | it("Try to invest", async function () { 132 | await dew.connect(user).transfer(await ico.getAddress(), ethers.parseUnits("1543114.817261654", 18)); 133 | console.log("status -----------", await ico.tokensFullyCharged()); 134 | await dew.connect(user).transfer(await ico.getAddress(), ethers.parseUnits("1000000", 18)); 135 | console.log("status -----------", await ico.tokensFullyCharged()); 136 | // await dew.connect(user).transfer(await ico.getAddress(), 200000*1e10); 137 | 138 | let _user1Balance = await dew.balanceOf(user1.address); 139 | let _user1Eth = await ethers.provider.getBalance(user1.address); 140 | console.log("user1 balance before buy: ", { tokens: ethers.formatUnits(_user1Balance, 10), eth: ethers.formatEther(_user1Eth) }); 141 | console.log("ICO state ", await ico.getICOState()); 142 | 143 | // invest 0.1 via contributor1 144 | await ico.connect(user1).invest(ethers.parseEther("0.500000353643214943"), contributor1, { value: ethers.parseEther("1.000000353643214943") }); 145 | _user1Balance = await dew.balanceOf(user1.address); 146 | let _history = await ico.getHistory(); 147 | console.log("history ------", _history); 148 | 149 | _user1Balance = await dew.balanceOf(user1.address); 150 | _user1Eth = await ethers.provider.getBalance(user1.address); 151 | console.log("user1 balance after buy: ", { tokens: ethers.formatUnits(_user1Balance, 10), eth: ethers.formatEther(_user1Eth) }); 152 | console.log("ICO state ", await ico.getICOState()); 153 | 154 | // invest 59.9 via contributor2 155 | await ico.connect(user1).invest(ethers.parseEther("0.5"), contributor2, { value: ethers.parseEther("60") }); 156 | _history = await ico.getHistory(); 157 | console.log("history ------", _history); 158 | await time.increaseTo(_endTime); 159 | 160 | _user1Balance = await dew.balanceOf(user1.address); 161 | _user1Eth = await ethers.provider.getBalance(user1.address); 162 | console.log("user1 balance after buy: ", { tokens: ethers.formatUnits(_user1Balance, 10), eth: ethers.formatEther(_user1Eth) }); 163 | console.log("ICO state ", await ico.getICOState()); 164 | }); 165 | 166 | it("claim with creator when finish ICO", async function () { 167 | console.log("ICO state ", await ico.getICOState()); 168 | await ico.connect(user1).finish(); 169 | 170 | const distribution = await ico.distribution(); 171 | const refund = await ico.refund(); 172 | 173 | console.log({ distribution, refund }); 174 | }); 175 | 176 | it("Check the balance of all addresses", async function () { 177 | const listerAmount = await ethers.provider.getBalance(lister.address); 178 | const contributor1Amount = await ethers.provider.getBalance(contributor1.address); 179 | const contributor2Amount = await ethers.provider.getBalance(contributor2.address); 180 | const daoAmount = await ethers.provider.getBalance(daoAddress); 181 | const userAmount = await ethers.provider.getBalance(user.address); 182 | const user1Amount = await ethers.provider.getBalance(user1.address); 183 | const tokensRemain = await dew.balanceOf(await ico.getAddress()); 184 | const tokens = await dew.balanceOf(user1.address); 185 | const tokenAmount = await dew.balanceOf(user1.address); 186 | const creatorTokens = await dew.balanceOf(user.address); 187 | 188 | console.log("user1: ", { 189 | eth: ethers.formatEther(user1Amount), 190 | tokens: ethers.formatUnits(tokenAmount, 10) 191 | }); 192 | console.log("lister ", { 193 | eth: ethers.formatEther(listerAmount) 194 | }); 195 | console.log("contributor1 ", { 196 | eth: ethers.formatEther(contributor1Amount) 197 | }); 198 | console.log("contributor2 ", { 199 | eth: ethers.formatEther(contributor2Amount) 200 | }); 201 | console.log("dao: ", { 202 | eth: ethers.formatEther(daoAmount) 203 | }); 204 | console.log("ico tokens left", ethers.formatUnits(tokensRemain, 10)); 205 | console.log("user: ", { 206 | eth: ethers.formatEther(userAmount), 207 | tokens: ethers.formatUnits(creatorTokens, 10) 208 | }); 209 | }); 210 | }); 211 | -------------------------------------------------------------------------------- /typechain-types/contracts/DAI.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../common"; 25 | 26 | export interface DAIInterface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "allowance" 30 | | "approve" 31 | | "balanceOf" 32 | | "burn" 33 | | "decimals" 34 | | "mint" 35 | | "name" 36 | | "symbol" 37 | | "totalSupply" 38 | | "transfer" 39 | | "transferFrom" 40 | ): FunctionFragment; 41 | 42 | getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; 43 | 44 | encodeFunctionData( 45 | functionFragment: "allowance", 46 | values: [AddressLike, AddressLike] 47 | ): string; 48 | encodeFunctionData( 49 | functionFragment: "approve", 50 | values: [AddressLike, BigNumberish] 51 | ): string; 52 | encodeFunctionData( 53 | functionFragment: "balanceOf", 54 | values: [AddressLike] 55 | ): string; 56 | encodeFunctionData( 57 | functionFragment: "burn", 58 | values: [AddressLike, BigNumberish] 59 | ): string; 60 | encodeFunctionData(functionFragment: "decimals", values?: undefined): string; 61 | encodeFunctionData( 62 | functionFragment: "mint", 63 | values: [AddressLike, BigNumberish] 64 | ): string; 65 | encodeFunctionData(functionFragment: "name", values?: undefined): string; 66 | encodeFunctionData(functionFragment: "symbol", values?: undefined): string; 67 | encodeFunctionData( 68 | functionFragment: "totalSupply", 69 | values?: undefined 70 | ): string; 71 | encodeFunctionData( 72 | functionFragment: "transfer", 73 | values: [AddressLike, BigNumberish] 74 | ): string; 75 | encodeFunctionData( 76 | functionFragment: "transferFrom", 77 | values: [AddressLike, AddressLike, BigNumberish] 78 | ): string; 79 | 80 | decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; 81 | decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; 82 | decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; 83 | decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; 84 | decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; 85 | decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; 86 | decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; 87 | decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; 88 | decodeFunctionResult( 89 | functionFragment: "totalSupply", 90 | data: BytesLike 91 | ): Result; 92 | decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; 93 | decodeFunctionResult( 94 | functionFragment: "transferFrom", 95 | data: BytesLike 96 | ): Result; 97 | } 98 | 99 | export namespace ApprovalEvent { 100 | export type InputTuple = [ 101 | owner: AddressLike, 102 | spender: AddressLike, 103 | value: BigNumberish 104 | ]; 105 | export type OutputTuple = [owner: string, spender: string, value: bigint]; 106 | export interface OutputObject { 107 | owner: string; 108 | spender: string; 109 | value: bigint; 110 | } 111 | export type Event = TypedContractEvent; 112 | export type Filter = TypedDeferredTopicFilter; 113 | export type Log = TypedEventLog; 114 | export type LogDescription = TypedLogDescription; 115 | } 116 | 117 | export namespace TransferEvent { 118 | export type InputTuple = [ 119 | from: AddressLike, 120 | to: AddressLike, 121 | value: BigNumberish 122 | ]; 123 | export type OutputTuple = [from: string, to: string, value: bigint]; 124 | export interface OutputObject { 125 | from: string; 126 | to: string; 127 | value: bigint; 128 | } 129 | export type Event = TypedContractEvent; 130 | export type Filter = TypedDeferredTopicFilter; 131 | export type Log = TypedEventLog; 132 | export type LogDescription = TypedLogDescription; 133 | } 134 | 135 | export interface DAI extends BaseContract { 136 | connect(runner?: ContractRunner | null): DAI; 137 | waitForDeployment(): Promise; 138 | 139 | interface: DAIInterface; 140 | 141 | queryFilter( 142 | event: TCEvent, 143 | fromBlockOrBlockhash?: string | number | undefined, 144 | toBlock?: string | number | undefined 145 | ): Promise>>; 146 | queryFilter( 147 | filter: TypedDeferredTopicFilter, 148 | fromBlockOrBlockhash?: string | number | undefined, 149 | toBlock?: string | number | undefined 150 | ): Promise>>; 151 | 152 | on( 153 | event: TCEvent, 154 | listener: TypedListener 155 | ): Promise; 156 | on( 157 | filter: TypedDeferredTopicFilter, 158 | listener: TypedListener 159 | ): Promise; 160 | 161 | once( 162 | event: TCEvent, 163 | listener: TypedListener 164 | ): Promise; 165 | once( 166 | filter: TypedDeferredTopicFilter, 167 | listener: TypedListener 168 | ): Promise; 169 | 170 | listeners( 171 | event: TCEvent 172 | ): Promise>>; 173 | listeners(eventName?: string): Promise>; 174 | removeAllListeners( 175 | event?: TCEvent 176 | ): Promise; 177 | 178 | allowance: TypedContractMethod< 179 | [owner: AddressLike, spender: AddressLike], 180 | [bigint], 181 | "view" 182 | >; 183 | 184 | approve: TypedContractMethod< 185 | [spender: AddressLike, value: BigNumberish], 186 | [boolean], 187 | "nonpayable" 188 | >; 189 | 190 | balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; 191 | 192 | burn: TypedContractMethod< 193 | [account: AddressLike, amount: BigNumberish], 194 | [void], 195 | "nonpayable" 196 | >; 197 | 198 | decimals: TypedContractMethod<[], [bigint], "view">; 199 | 200 | mint: TypedContractMethod< 201 | [account: AddressLike, amount: BigNumberish], 202 | [void], 203 | "nonpayable" 204 | >; 205 | 206 | name: TypedContractMethod<[], [string], "view">; 207 | 208 | symbol: TypedContractMethod<[], [string], "view">; 209 | 210 | totalSupply: TypedContractMethod<[], [bigint], "view">; 211 | 212 | transfer: TypedContractMethod< 213 | [to: AddressLike, value: BigNumberish], 214 | [boolean], 215 | "nonpayable" 216 | >; 217 | 218 | transferFrom: TypedContractMethod< 219 | [from: AddressLike, to: AddressLike, value: BigNumberish], 220 | [boolean], 221 | "nonpayable" 222 | >; 223 | 224 | getFunction( 225 | key: string | FunctionFragment 226 | ): T; 227 | 228 | getFunction( 229 | nameOrSignature: "allowance" 230 | ): TypedContractMethod< 231 | [owner: AddressLike, spender: AddressLike], 232 | [bigint], 233 | "view" 234 | >; 235 | getFunction( 236 | nameOrSignature: "approve" 237 | ): TypedContractMethod< 238 | [spender: AddressLike, value: BigNumberish], 239 | [boolean], 240 | "nonpayable" 241 | >; 242 | getFunction( 243 | nameOrSignature: "balanceOf" 244 | ): TypedContractMethod<[account: AddressLike], [bigint], "view">; 245 | getFunction( 246 | nameOrSignature: "burn" 247 | ): TypedContractMethod< 248 | [account: AddressLike, amount: BigNumberish], 249 | [void], 250 | "nonpayable" 251 | >; 252 | getFunction( 253 | nameOrSignature: "decimals" 254 | ): TypedContractMethod<[], [bigint], "view">; 255 | getFunction( 256 | nameOrSignature: "mint" 257 | ): TypedContractMethod< 258 | [account: AddressLike, amount: BigNumberish], 259 | [void], 260 | "nonpayable" 261 | >; 262 | getFunction( 263 | nameOrSignature: "name" 264 | ): TypedContractMethod<[], [string], "view">; 265 | getFunction( 266 | nameOrSignature: "symbol" 267 | ): TypedContractMethod<[], [string], "view">; 268 | getFunction( 269 | nameOrSignature: "totalSupply" 270 | ): TypedContractMethod<[], [bigint], "view">; 271 | getFunction( 272 | nameOrSignature: "transfer" 273 | ): TypedContractMethod< 274 | [to: AddressLike, value: BigNumberish], 275 | [boolean], 276 | "nonpayable" 277 | >; 278 | getFunction( 279 | nameOrSignature: "transferFrom" 280 | ): TypedContractMethod< 281 | [from: AddressLike, to: AddressLike, value: BigNumberish], 282 | [boolean], 283 | "nonpayable" 284 | >; 285 | 286 | getEvent( 287 | key: "Approval" 288 | ): TypedContractEvent< 289 | ApprovalEvent.InputTuple, 290 | ApprovalEvent.OutputTuple, 291 | ApprovalEvent.OutputObject 292 | >; 293 | getEvent( 294 | key: "Transfer" 295 | ): TypedContractEvent< 296 | TransferEvent.InputTuple, 297 | TransferEvent.OutputTuple, 298 | TransferEvent.OutputObject 299 | >; 300 | 301 | filters: { 302 | "Approval(address,address,uint256)": TypedContractEvent< 303 | ApprovalEvent.InputTuple, 304 | ApprovalEvent.OutputTuple, 305 | ApprovalEvent.OutputObject 306 | >; 307 | Approval: TypedContractEvent< 308 | ApprovalEvent.InputTuple, 309 | ApprovalEvent.OutputTuple, 310 | ApprovalEvent.OutputObject 311 | >; 312 | 313 | "Transfer(address,address,uint256)": TypedContractEvent< 314 | TransferEvent.InputTuple, 315 | TransferEvent.OutputTuple, 316 | TransferEvent.OutputObject 317 | >; 318 | Transfer: TypedContractEvent< 319 | TransferEvent.InputTuple, 320 | TransferEvent.OutputTuple, 321 | TransferEvent.OutputObject 322 | >; 323 | }; 324 | } 325 | -------------------------------------------------------------------------------- /typechain-types/contracts/DEW.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../common"; 25 | 26 | export interface DEWInterface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "allowance" 30 | | "approve" 31 | | "balanceOf" 32 | | "burn" 33 | | "decimals" 34 | | "mint" 35 | | "name" 36 | | "symbol" 37 | | "totalSupply" 38 | | "transfer" 39 | | "transferFrom" 40 | ): FunctionFragment; 41 | 42 | getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; 43 | 44 | encodeFunctionData( 45 | functionFragment: "allowance", 46 | values: [AddressLike, AddressLike] 47 | ): string; 48 | encodeFunctionData( 49 | functionFragment: "approve", 50 | values: [AddressLike, BigNumberish] 51 | ): string; 52 | encodeFunctionData( 53 | functionFragment: "balanceOf", 54 | values: [AddressLike] 55 | ): string; 56 | encodeFunctionData( 57 | functionFragment: "burn", 58 | values: [AddressLike, BigNumberish] 59 | ): string; 60 | encodeFunctionData(functionFragment: "decimals", values?: undefined): string; 61 | encodeFunctionData( 62 | functionFragment: "mint", 63 | values: [AddressLike, BigNumberish] 64 | ): string; 65 | encodeFunctionData(functionFragment: "name", values?: undefined): string; 66 | encodeFunctionData(functionFragment: "symbol", values?: undefined): string; 67 | encodeFunctionData( 68 | functionFragment: "totalSupply", 69 | values?: undefined 70 | ): string; 71 | encodeFunctionData( 72 | functionFragment: "transfer", 73 | values: [AddressLike, BigNumberish] 74 | ): string; 75 | encodeFunctionData( 76 | functionFragment: "transferFrom", 77 | values: [AddressLike, AddressLike, BigNumberish] 78 | ): string; 79 | 80 | decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; 81 | decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; 82 | decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; 83 | decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; 84 | decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; 85 | decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; 86 | decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; 87 | decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; 88 | decodeFunctionResult( 89 | functionFragment: "totalSupply", 90 | data: BytesLike 91 | ): Result; 92 | decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; 93 | decodeFunctionResult( 94 | functionFragment: "transferFrom", 95 | data: BytesLike 96 | ): Result; 97 | } 98 | 99 | export namespace ApprovalEvent { 100 | export type InputTuple = [ 101 | owner: AddressLike, 102 | spender: AddressLike, 103 | value: BigNumberish 104 | ]; 105 | export type OutputTuple = [owner: string, spender: string, value: bigint]; 106 | export interface OutputObject { 107 | owner: string; 108 | spender: string; 109 | value: bigint; 110 | } 111 | export type Event = TypedContractEvent; 112 | export type Filter = TypedDeferredTopicFilter; 113 | export type Log = TypedEventLog; 114 | export type LogDescription = TypedLogDescription; 115 | } 116 | 117 | export namespace TransferEvent { 118 | export type InputTuple = [ 119 | from: AddressLike, 120 | to: AddressLike, 121 | value: BigNumberish 122 | ]; 123 | export type OutputTuple = [from: string, to: string, value: bigint]; 124 | export interface OutputObject { 125 | from: string; 126 | to: string; 127 | value: bigint; 128 | } 129 | export type Event = TypedContractEvent; 130 | export type Filter = TypedDeferredTopicFilter; 131 | export type Log = TypedEventLog; 132 | export type LogDescription = TypedLogDescription; 133 | } 134 | 135 | export interface DEW extends BaseContract { 136 | connect(runner?: ContractRunner | null): DEW; 137 | waitForDeployment(): Promise; 138 | 139 | interface: DEWInterface; 140 | 141 | queryFilter( 142 | event: TCEvent, 143 | fromBlockOrBlockhash?: string | number | undefined, 144 | toBlock?: string | number | undefined 145 | ): Promise>>; 146 | queryFilter( 147 | filter: TypedDeferredTopicFilter, 148 | fromBlockOrBlockhash?: string | number | undefined, 149 | toBlock?: string | number | undefined 150 | ): Promise>>; 151 | 152 | on( 153 | event: TCEvent, 154 | listener: TypedListener 155 | ): Promise; 156 | on( 157 | filter: TypedDeferredTopicFilter, 158 | listener: TypedListener 159 | ): Promise; 160 | 161 | once( 162 | event: TCEvent, 163 | listener: TypedListener 164 | ): Promise; 165 | once( 166 | filter: TypedDeferredTopicFilter, 167 | listener: TypedListener 168 | ): Promise; 169 | 170 | listeners( 171 | event: TCEvent 172 | ): Promise>>; 173 | listeners(eventName?: string): Promise>; 174 | removeAllListeners( 175 | event?: TCEvent 176 | ): Promise; 177 | 178 | allowance: TypedContractMethod< 179 | [owner: AddressLike, spender: AddressLike], 180 | [bigint], 181 | "view" 182 | >; 183 | 184 | approve: TypedContractMethod< 185 | [spender: AddressLike, value: BigNumberish], 186 | [boolean], 187 | "nonpayable" 188 | >; 189 | 190 | balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; 191 | 192 | burn: TypedContractMethod< 193 | [account: AddressLike, amount: BigNumberish], 194 | [void], 195 | "nonpayable" 196 | >; 197 | 198 | decimals: TypedContractMethod<[], [bigint], "view">; 199 | 200 | mint: TypedContractMethod< 201 | [account: AddressLike, amount: BigNumberish], 202 | [void], 203 | "nonpayable" 204 | >; 205 | 206 | name: TypedContractMethod<[], [string], "view">; 207 | 208 | symbol: TypedContractMethod<[], [string], "view">; 209 | 210 | totalSupply: TypedContractMethod<[], [bigint], "view">; 211 | 212 | transfer: TypedContractMethod< 213 | [to: AddressLike, value: BigNumberish], 214 | [boolean], 215 | "nonpayable" 216 | >; 217 | 218 | transferFrom: TypedContractMethod< 219 | [from: AddressLike, to: AddressLike, value: BigNumberish], 220 | [boolean], 221 | "nonpayable" 222 | >; 223 | 224 | getFunction( 225 | key: string | FunctionFragment 226 | ): T; 227 | 228 | getFunction( 229 | nameOrSignature: "allowance" 230 | ): TypedContractMethod< 231 | [owner: AddressLike, spender: AddressLike], 232 | [bigint], 233 | "view" 234 | >; 235 | getFunction( 236 | nameOrSignature: "approve" 237 | ): TypedContractMethod< 238 | [spender: AddressLike, value: BigNumberish], 239 | [boolean], 240 | "nonpayable" 241 | >; 242 | getFunction( 243 | nameOrSignature: "balanceOf" 244 | ): TypedContractMethod<[account: AddressLike], [bigint], "view">; 245 | getFunction( 246 | nameOrSignature: "burn" 247 | ): TypedContractMethod< 248 | [account: AddressLike, amount: BigNumberish], 249 | [void], 250 | "nonpayable" 251 | >; 252 | getFunction( 253 | nameOrSignature: "decimals" 254 | ): TypedContractMethod<[], [bigint], "view">; 255 | getFunction( 256 | nameOrSignature: "mint" 257 | ): TypedContractMethod< 258 | [account: AddressLike, amount: BigNumberish], 259 | [void], 260 | "nonpayable" 261 | >; 262 | getFunction( 263 | nameOrSignature: "name" 264 | ): TypedContractMethod<[], [string], "view">; 265 | getFunction( 266 | nameOrSignature: "symbol" 267 | ): TypedContractMethod<[], [string], "view">; 268 | getFunction( 269 | nameOrSignature: "totalSupply" 270 | ): TypedContractMethod<[], [bigint], "view">; 271 | getFunction( 272 | nameOrSignature: "transfer" 273 | ): TypedContractMethod< 274 | [to: AddressLike, value: BigNumberish], 275 | [boolean], 276 | "nonpayable" 277 | >; 278 | getFunction( 279 | nameOrSignature: "transferFrom" 280 | ): TypedContractMethod< 281 | [from: AddressLike, to: AddressLike, value: BigNumberish], 282 | [boolean], 283 | "nonpayable" 284 | >; 285 | 286 | getEvent( 287 | key: "Approval" 288 | ): TypedContractEvent< 289 | ApprovalEvent.InputTuple, 290 | ApprovalEvent.OutputTuple, 291 | ApprovalEvent.OutputObject 292 | >; 293 | getEvent( 294 | key: "Transfer" 295 | ): TypedContractEvent< 296 | TransferEvent.InputTuple, 297 | TransferEvent.OutputTuple, 298 | TransferEvent.OutputObject 299 | >; 300 | 301 | filters: { 302 | "Approval(address,address,uint256)": TypedContractEvent< 303 | ApprovalEvent.InputTuple, 304 | ApprovalEvent.OutputTuple, 305 | ApprovalEvent.OutputObject 306 | >; 307 | Approval: TypedContractEvent< 308 | ApprovalEvent.InputTuple, 309 | ApprovalEvent.OutputTuple, 310 | ApprovalEvent.OutputObject 311 | >; 312 | 313 | "Transfer(address,address,uint256)": TypedContractEvent< 314 | TransferEvent.InputTuple, 315 | TransferEvent.OutputTuple, 316 | TransferEvent.OutputObject 317 | >; 318 | Transfer: TypedContractEvent< 319 | TransferEvent.InputTuple, 320 | TransferEvent.OutputTuple, 321 | TransferEvent.OutputObject 322 | >; 323 | }; 324 | } 325 | -------------------------------------------------------------------------------- /typechain-types/contracts/CryptoSI.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../common"; 25 | 26 | export interface CryptoSIInterface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "allowance" 30 | | "approve" 31 | | "balanceOf" 32 | | "burn" 33 | | "decimals" 34 | | "mint" 35 | | "name" 36 | | "symbol" 37 | | "totalSupply" 38 | | "transfer" 39 | | "transferFrom" 40 | ): FunctionFragment; 41 | 42 | getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; 43 | 44 | encodeFunctionData( 45 | functionFragment: "allowance", 46 | values: [AddressLike, AddressLike] 47 | ): string; 48 | encodeFunctionData( 49 | functionFragment: "approve", 50 | values: [AddressLike, BigNumberish] 51 | ): string; 52 | encodeFunctionData( 53 | functionFragment: "balanceOf", 54 | values: [AddressLike] 55 | ): string; 56 | encodeFunctionData( 57 | functionFragment: "burn", 58 | values: [AddressLike, BigNumberish] 59 | ): string; 60 | encodeFunctionData(functionFragment: "decimals", values?: undefined): string; 61 | encodeFunctionData( 62 | functionFragment: "mint", 63 | values: [AddressLike, BigNumberish] 64 | ): string; 65 | encodeFunctionData(functionFragment: "name", values?: undefined): string; 66 | encodeFunctionData(functionFragment: "symbol", values?: undefined): string; 67 | encodeFunctionData( 68 | functionFragment: "totalSupply", 69 | values?: undefined 70 | ): string; 71 | encodeFunctionData( 72 | functionFragment: "transfer", 73 | values: [AddressLike, BigNumberish] 74 | ): string; 75 | encodeFunctionData( 76 | functionFragment: "transferFrom", 77 | values: [AddressLike, AddressLike, BigNumberish] 78 | ): string; 79 | 80 | decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; 81 | decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; 82 | decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; 83 | decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; 84 | decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; 85 | decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; 86 | decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; 87 | decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; 88 | decodeFunctionResult( 89 | functionFragment: "totalSupply", 90 | data: BytesLike 91 | ): Result; 92 | decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; 93 | decodeFunctionResult( 94 | functionFragment: "transferFrom", 95 | data: BytesLike 96 | ): Result; 97 | } 98 | 99 | export namespace ApprovalEvent { 100 | export type InputTuple = [ 101 | owner: AddressLike, 102 | spender: AddressLike, 103 | value: BigNumberish 104 | ]; 105 | export type OutputTuple = [owner: string, spender: string, value: bigint]; 106 | export interface OutputObject { 107 | owner: string; 108 | spender: string; 109 | value: bigint; 110 | } 111 | export type Event = TypedContractEvent; 112 | export type Filter = TypedDeferredTopicFilter; 113 | export type Log = TypedEventLog; 114 | export type LogDescription = TypedLogDescription; 115 | } 116 | 117 | export namespace TransferEvent { 118 | export type InputTuple = [ 119 | from: AddressLike, 120 | to: AddressLike, 121 | value: BigNumberish 122 | ]; 123 | export type OutputTuple = [from: string, to: string, value: bigint]; 124 | export interface OutputObject { 125 | from: string; 126 | to: string; 127 | value: bigint; 128 | } 129 | export type Event = TypedContractEvent; 130 | export type Filter = TypedDeferredTopicFilter; 131 | export type Log = TypedEventLog; 132 | export type LogDescription = TypedLogDescription; 133 | } 134 | 135 | export interface CryptoSI extends BaseContract { 136 | connect(runner?: ContractRunner | null): CryptoSI; 137 | waitForDeployment(): Promise; 138 | 139 | interface: CryptoSIInterface; 140 | 141 | queryFilter( 142 | event: TCEvent, 143 | fromBlockOrBlockhash?: string | number | undefined, 144 | toBlock?: string | number | undefined 145 | ): Promise>>; 146 | queryFilter( 147 | filter: TypedDeferredTopicFilter, 148 | fromBlockOrBlockhash?: string | number | undefined, 149 | toBlock?: string | number | undefined 150 | ): Promise>>; 151 | 152 | on( 153 | event: TCEvent, 154 | listener: TypedListener 155 | ): Promise; 156 | on( 157 | filter: TypedDeferredTopicFilter, 158 | listener: TypedListener 159 | ): Promise; 160 | 161 | once( 162 | event: TCEvent, 163 | listener: TypedListener 164 | ): Promise; 165 | once( 166 | filter: TypedDeferredTopicFilter, 167 | listener: TypedListener 168 | ): Promise; 169 | 170 | listeners( 171 | event: TCEvent 172 | ): Promise>>; 173 | listeners(eventName?: string): Promise>; 174 | removeAllListeners( 175 | event?: TCEvent 176 | ): Promise; 177 | 178 | allowance: TypedContractMethod< 179 | [owner: AddressLike, spender: AddressLike], 180 | [bigint], 181 | "view" 182 | >; 183 | 184 | approve: TypedContractMethod< 185 | [spender: AddressLike, value: BigNumberish], 186 | [boolean], 187 | "nonpayable" 188 | >; 189 | 190 | balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; 191 | 192 | burn: TypedContractMethod< 193 | [account: AddressLike, amount: BigNumberish], 194 | [void], 195 | "nonpayable" 196 | >; 197 | 198 | decimals: TypedContractMethod<[], [bigint], "view">; 199 | 200 | mint: TypedContractMethod< 201 | [account: AddressLike, amount: BigNumberish], 202 | [void], 203 | "nonpayable" 204 | >; 205 | 206 | name: TypedContractMethod<[], [string], "view">; 207 | 208 | symbol: TypedContractMethod<[], [string], "view">; 209 | 210 | totalSupply: TypedContractMethod<[], [bigint], "view">; 211 | 212 | transfer: TypedContractMethod< 213 | [to: AddressLike, value: BigNumberish], 214 | [boolean], 215 | "nonpayable" 216 | >; 217 | 218 | transferFrom: TypedContractMethod< 219 | [from: AddressLike, to: AddressLike, value: BigNumberish], 220 | [boolean], 221 | "nonpayable" 222 | >; 223 | 224 | getFunction( 225 | key: string | FunctionFragment 226 | ): T; 227 | 228 | getFunction( 229 | nameOrSignature: "allowance" 230 | ): TypedContractMethod< 231 | [owner: AddressLike, spender: AddressLike], 232 | [bigint], 233 | "view" 234 | >; 235 | getFunction( 236 | nameOrSignature: "approve" 237 | ): TypedContractMethod< 238 | [spender: AddressLike, value: BigNumberish], 239 | [boolean], 240 | "nonpayable" 241 | >; 242 | getFunction( 243 | nameOrSignature: "balanceOf" 244 | ): TypedContractMethod<[account: AddressLike], [bigint], "view">; 245 | getFunction( 246 | nameOrSignature: "burn" 247 | ): TypedContractMethod< 248 | [account: AddressLike, amount: BigNumberish], 249 | [void], 250 | "nonpayable" 251 | >; 252 | getFunction( 253 | nameOrSignature: "decimals" 254 | ): TypedContractMethod<[], [bigint], "view">; 255 | getFunction( 256 | nameOrSignature: "mint" 257 | ): TypedContractMethod< 258 | [account: AddressLike, amount: BigNumberish], 259 | [void], 260 | "nonpayable" 261 | >; 262 | getFunction( 263 | nameOrSignature: "name" 264 | ): TypedContractMethod<[], [string], "view">; 265 | getFunction( 266 | nameOrSignature: "symbol" 267 | ): TypedContractMethod<[], [string], "view">; 268 | getFunction( 269 | nameOrSignature: "totalSupply" 270 | ): TypedContractMethod<[], [bigint], "view">; 271 | getFunction( 272 | nameOrSignature: "transfer" 273 | ): TypedContractMethod< 274 | [to: AddressLike, value: BigNumberish], 275 | [boolean], 276 | "nonpayable" 277 | >; 278 | getFunction( 279 | nameOrSignature: "transferFrom" 280 | ): TypedContractMethod< 281 | [from: AddressLike, to: AddressLike, value: BigNumberish], 282 | [boolean], 283 | "nonpayable" 284 | >; 285 | 286 | getEvent( 287 | key: "Approval" 288 | ): TypedContractEvent< 289 | ApprovalEvent.InputTuple, 290 | ApprovalEvent.OutputTuple, 291 | ApprovalEvent.OutputObject 292 | >; 293 | getEvent( 294 | key: "Transfer" 295 | ): TypedContractEvent< 296 | TransferEvent.InputTuple, 297 | TransferEvent.OutputTuple, 298 | TransferEvent.OutputObject 299 | >; 300 | 301 | filters: { 302 | "Approval(address,address,uint256)": TypedContractEvent< 303 | ApprovalEvent.InputTuple, 304 | ApprovalEvent.OutputTuple, 305 | ApprovalEvent.OutputObject 306 | >; 307 | Approval: TypedContractEvent< 308 | ApprovalEvent.InputTuple, 309 | ApprovalEvent.OutputTuple, 310 | ApprovalEvent.OutputObject 311 | >; 312 | 313 | "Transfer(address,address,uint256)": TypedContractEvent< 314 | TransferEvent.InputTuple, 315 | TransferEvent.OutputTuple, 316 | TransferEvent.OutputObject 317 | >; 318 | Transfer: TypedContractEvent< 319 | TransferEvent.InputTuple, 320 | TransferEvent.OutputTuple, 321 | TransferEvent.OutputObject 322 | >; 323 | }; 324 | } 325 | -------------------------------------------------------------------------------- /typechain-types/contracts/SilverICO.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumberish, 7 | BytesLike, 8 | FunctionFragment, 9 | Result, 10 | Interface, 11 | EventFragment, 12 | AddressLike, 13 | ContractRunner, 14 | ContractMethod, 15 | Listener, 16 | } from "ethers"; 17 | import type { 18 | TypedContractEvent, 19 | TypedDeferredTopicFilter, 20 | TypedEventLog, 21 | TypedLogDescription, 22 | TypedListener, 23 | TypedContractMethod, 24 | } from "../common"; 25 | 26 | export interface SilverICOInterface extends Interface { 27 | getFunction( 28 | nameOrSignature: 29 | | "contributions" 30 | | "getPresaleRaised" 31 | | "owner" 32 | | "participate" 33 | | "presaleCap" 34 | | "presaleEndTime" 35 | | "presaleRate" 36 | | "presaleStartTime" 37 | | "renounceOwnership" 38 | | "silverDogeToken" 39 | | "transferOwnership" 40 | | "withdrawBNB" 41 | ): FunctionFragment; 42 | 43 | getEvent( 44 | nameOrSignatureOrTopic: "Contribution" | "OwnershipTransferred" 45 | ): EventFragment; 46 | 47 | encodeFunctionData( 48 | functionFragment: "contributions", 49 | values: [AddressLike] 50 | ): string; 51 | encodeFunctionData( 52 | functionFragment: "getPresaleRaised", 53 | values?: undefined 54 | ): string; 55 | encodeFunctionData(functionFragment: "owner", values?: undefined): string; 56 | encodeFunctionData( 57 | functionFragment: "participate", 58 | values?: undefined 59 | ): string; 60 | encodeFunctionData( 61 | functionFragment: "presaleCap", 62 | values?: undefined 63 | ): string; 64 | encodeFunctionData( 65 | functionFragment: "presaleEndTime", 66 | values?: undefined 67 | ): string; 68 | encodeFunctionData( 69 | functionFragment: "presaleRate", 70 | values?: undefined 71 | ): string; 72 | encodeFunctionData( 73 | functionFragment: "presaleStartTime", 74 | values?: undefined 75 | ): string; 76 | encodeFunctionData( 77 | functionFragment: "renounceOwnership", 78 | values?: undefined 79 | ): string; 80 | encodeFunctionData( 81 | functionFragment: "silverDogeToken", 82 | values?: undefined 83 | ): string; 84 | encodeFunctionData( 85 | functionFragment: "transferOwnership", 86 | values: [AddressLike] 87 | ): string; 88 | encodeFunctionData( 89 | functionFragment: "withdrawBNB", 90 | values?: undefined 91 | ): string; 92 | 93 | decodeFunctionResult( 94 | functionFragment: "contributions", 95 | data: BytesLike 96 | ): Result; 97 | decodeFunctionResult( 98 | functionFragment: "getPresaleRaised", 99 | data: BytesLike 100 | ): Result; 101 | decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; 102 | decodeFunctionResult( 103 | functionFragment: "participate", 104 | data: BytesLike 105 | ): Result; 106 | decodeFunctionResult(functionFragment: "presaleCap", data: BytesLike): Result; 107 | decodeFunctionResult( 108 | functionFragment: "presaleEndTime", 109 | data: BytesLike 110 | ): Result; 111 | decodeFunctionResult( 112 | functionFragment: "presaleRate", 113 | data: BytesLike 114 | ): Result; 115 | decodeFunctionResult( 116 | functionFragment: "presaleStartTime", 117 | data: BytesLike 118 | ): Result; 119 | decodeFunctionResult( 120 | functionFragment: "renounceOwnership", 121 | data: BytesLike 122 | ): Result; 123 | decodeFunctionResult( 124 | functionFragment: "silverDogeToken", 125 | data: BytesLike 126 | ): Result; 127 | decodeFunctionResult( 128 | functionFragment: "transferOwnership", 129 | data: BytesLike 130 | ): Result; 131 | decodeFunctionResult( 132 | functionFragment: "withdrawBNB", 133 | data: BytesLike 134 | ): Result; 135 | } 136 | 137 | export namespace ContributionEvent { 138 | export type InputTuple = [ 139 | contributor: AddressLike, 140 | amount: BigNumberish, 141 | tokensPurchased: BigNumberish 142 | ]; 143 | export type OutputTuple = [ 144 | contributor: string, 145 | amount: bigint, 146 | tokensPurchased: bigint 147 | ]; 148 | export interface OutputObject { 149 | contributor: string; 150 | amount: bigint; 151 | tokensPurchased: bigint; 152 | } 153 | export type Event = TypedContractEvent; 154 | export type Filter = TypedDeferredTopicFilter; 155 | export type Log = TypedEventLog; 156 | export type LogDescription = TypedLogDescription; 157 | } 158 | 159 | export namespace OwnershipTransferredEvent { 160 | export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; 161 | export type OutputTuple = [previousOwner: string, newOwner: string]; 162 | export interface OutputObject { 163 | previousOwner: string; 164 | newOwner: string; 165 | } 166 | export type Event = TypedContractEvent; 167 | export type Filter = TypedDeferredTopicFilter; 168 | export type Log = TypedEventLog; 169 | export type LogDescription = TypedLogDescription; 170 | } 171 | 172 | export interface SilverICO extends BaseContract { 173 | connect(runner?: ContractRunner | null): SilverICO; 174 | waitForDeployment(): Promise; 175 | 176 | interface: SilverICOInterface; 177 | 178 | queryFilter( 179 | event: TCEvent, 180 | fromBlockOrBlockhash?: string | number | undefined, 181 | toBlock?: string | number | undefined 182 | ): Promise>>; 183 | queryFilter( 184 | filter: TypedDeferredTopicFilter, 185 | fromBlockOrBlockhash?: string | number | undefined, 186 | toBlock?: string | number | undefined 187 | ): Promise>>; 188 | 189 | on( 190 | event: TCEvent, 191 | listener: TypedListener 192 | ): Promise; 193 | on( 194 | filter: TypedDeferredTopicFilter, 195 | listener: TypedListener 196 | ): Promise; 197 | 198 | once( 199 | event: TCEvent, 200 | listener: TypedListener 201 | ): Promise; 202 | once( 203 | filter: TypedDeferredTopicFilter, 204 | listener: TypedListener 205 | ): Promise; 206 | 207 | listeners( 208 | event: TCEvent 209 | ): Promise>>; 210 | listeners(eventName?: string): Promise>; 211 | removeAllListeners( 212 | event?: TCEvent 213 | ): Promise; 214 | 215 | contributions: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; 216 | 217 | getPresaleRaised: TypedContractMethod<[], [bigint], "view">; 218 | 219 | owner: TypedContractMethod<[], [string], "view">; 220 | 221 | participate: TypedContractMethod<[], [void], "payable">; 222 | 223 | presaleCap: TypedContractMethod<[], [bigint], "view">; 224 | 225 | presaleEndTime: TypedContractMethod<[], [bigint], "view">; 226 | 227 | presaleRate: TypedContractMethod<[], [bigint], "view">; 228 | 229 | presaleStartTime: TypedContractMethod<[], [bigint], "view">; 230 | 231 | renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; 232 | 233 | silverDogeToken: TypedContractMethod<[], [string], "view">; 234 | 235 | transferOwnership: TypedContractMethod< 236 | [newOwner: AddressLike], 237 | [void], 238 | "nonpayable" 239 | >; 240 | 241 | withdrawBNB: TypedContractMethod<[], [void], "nonpayable">; 242 | 243 | getFunction( 244 | key: string | FunctionFragment 245 | ): T; 246 | 247 | getFunction( 248 | nameOrSignature: "contributions" 249 | ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; 250 | getFunction( 251 | nameOrSignature: "getPresaleRaised" 252 | ): TypedContractMethod<[], [bigint], "view">; 253 | getFunction( 254 | nameOrSignature: "owner" 255 | ): TypedContractMethod<[], [string], "view">; 256 | getFunction( 257 | nameOrSignature: "participate" 258 | ): TypedContractMethod<[], [void], "payable">; 259 | getFunction( 260 | nameOrSignature: "presaleCap" 261 | ): TypedContractMethod<[], [bigint], "view">; 262 | getFunction( 263 | nameOrSignature: "presaleEndTime" 264 | ): TypedContractMethod<[], [bigint], "view">; 265 | getFunction( 266 | nameOrSignature: "presaleRate" 267 | ): TypedContractMethod<[], [bigint], "view">; 268 | getFunction( 269 | nameOrSignature: "presaleStartTime" 270 | ): TypedContractMethod<[], [bigint], "view">; 271 | getFunction( 272 | nameOrSignature: "renounceOwnership" 273 | ): TypedContractMethod<[], [void], "nonpayable">; 274 | getFunction( 275 | nameOrSignature: "silverDogeToken" 276 | ): TypedContractMethod<[], [string], "view">; 277 | getFunction( 278 | nameOrSignature: "transferOwnership" 279 | ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; 280 | getFunction( 281 | nameOrSignature: "withdrawBNB" 282 | ): TypedContractMethod<[], [void], "nonpayable">; 283 | 284 | getEvent( 285 | key: "Contribution" 286 | ): TypedContractEvent< 287 | ContributionEvent.InputTuple, 288 | ContributionEvent.OutputTuple, 289 | ContributionEvent.OutputObject 290 | >; 291 | getEvent( 292 | key: "OwnershipTransferred" 293 | ): TypedContractEvent< 294 | OwnershipTransferredEvent.InputTuple, 295 | OwnershipTransferredEvent.OutputTuple, 296 | OwnershipTransferredEvent.OutputObject 297 | >; 298 | 299 | filters: { 300 | "Contribution(address,uint256,uint256)": TypedContractEvent< 301 | ContributionEvent.InputTuple, 302 | ContributionEvent.OutputTuple, 303 | ContributionEvent.OutputObject 304 | >; 305 | Contribution: TypedContractEvent< 306 | ContributionEvent.InputTuple, 307 | ContributionEvent.OutputTuple, 308 | ContributionEvent.OutputObject 309 | >; 310 | 311 | "OwnershipTransferred(address,address)": TypedContractEvent< 312 | OwnershipTransferredEvent.InputTuple, 313 | OwnershipTransferredEvent.OutputTuple, 314 | OwnershipTransferredEvent.OutputObject 315 | >; 316 | OwnershipTransferred: TypedContractEvent< 317 | OwnershipTransferredEvent.InputTuple, 318 | OwnershipTransferredEvent.OutputTuple, 319 | OwnershipTransferredEvent.OutputObject 320 | >; 321 | }; 322 | } 323 | --------------------------------------------------------------------------------