Skip to content
Verified contractPartialMIT

BatteryCoinPresale

Address0x529a7fd649e58c17e8e2f24841fa2cd391e6ebce
Balance

0 ETH

 

Transactions

17

 

Compiler

solc 0.8.28

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.28+commit.7893614a
Language
solidity
Optimization
No
EVM version
cancun
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
21,083,948
Creation transaction
0x5a46ac2736…935aa3e9f4

Read24

  • ANNUAL_FEE_PERCENTAGE() → (uint256)
  • BATT() → (address)
  • MAX_PARTICIPATION_AMOUNT() → (uint256)
  • USDC() → (address)
  • USDT() → (address)
  • USDTDecimal() → (uint8)
  • VESTING_PERIOD_MONTHS() → (uint256)
  • batteryTokenDecimal() → (uint8)
  • coreOwnerList(address) → (bool)
  • getHashValuesByAddress(address) → (tuple[])
  • getLastHashValueByAddress(address) → (bytes32)
  • getLatestRound() → (tuple)
  • getPresaleInfo(bytes32) → (tuple)
  • isCoreOwner(address) → (bool)
  • isOwner(address) → (bool)
  • owner() → (address)
  • ownerList(address) → (bool)
  • paused() → (bool)
  • presaleRoundCount() → (uint256)
  • presaleRoundList(uint256) → (uint256,uint256,uint256,uint256,uint256,bool,bool)
  • tokenValueDecimals() → (uint8)
  • userParticipation(address) → (uint256)
  • vestingPeriodStartTime() → (uint256)
  • vestingPeriodStarted() → (bool)

Write17

  • addCoreOwner(address)
  • addOwner(address)
  • initializeRounds()
  • pause()
  • refundUser(bytes32)
  • releaseFunds(address,uint256,address)
  • releasePresaleAll(bool,uint256)
  • releasePresaleByHashValue(bytes32)
  • removeCoreOwner(address)
  • removeOwner(address)
  • renounceOwnership()
  • reserve(uint256,address)
  • reserveWithETH(uint256)
  • setBATTTokenAddress(address,uint8)
  • setRound(uint256,uint256)
  • transferOwnership(address)
  • unpause()

Events12

  • Debug(string)
  • MoneyReleased(address,uint256)
  • OwnerAdded(address)
  • OwnerRemoved(address)
  • OwnershipTransferred(address,address)
  • Paused(address)
  • PresaleReleased(bytes32,address,uint256)
  • Refunded(address,uint256)
  • Reserved(address,bytes32,uint256,uint256)
  • RoundSet(uint256,uint256)
  • TokenAddressSet(address)
  • Unpaused(address)

Errors5

  • EnforcedPause()
  • ExpectedPause()
  • OwnableInvalidOwner(address)
  • OwnableUnauthorizedAccount(address)
  • ReentrancyGuardReentrantCall()

ABI as JSON

[
  {
    "type": "constructor",
    "inputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "EnforcedPause",
    "type": "error",
    "inputs": []
  },
  {
    "name": "ExpectedPause",
    "type": "error",
    "inputs": []
  },
  {
    "name": "OwnableInvalidOwner",
    "type": "error",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "name": "OwnableUnauthorizedAccount",
    "type": "error",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "name": "ReentrancyGuardReentrantCall",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Debug",
    "type": "event",
    "inputs": [
      {
        "name": "message",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      }
    ],
    "anonymous": false
  },
  {
    "name": "MoneyReleased",
    "type": "event",
    "inputs": [
      {
        "name": "to",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "OwnerAdded",
    "type": "event",
    "inputs": [
      {
        "name": "newOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "OwnerRemoved",
    "type": "event",
    "inputs": [
      {
        "name": "removedOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "OwnershipTransferred",
    "type": "event",
    "inputs": [
      {
        "name": "previousOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Paused",
    "type": "event",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "PresaleReleased",
    "type": "event",
    "inputs": [
      {
        "name": "hashValue",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "user",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Refunded",
    "type": "event",
    "inputs": [
      {
        "name": "user",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Reserved",
    "type": "event",
    "inputs": [
      {
        "name": "user",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "hashValue",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "price",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "RoundSet",
    "type": "event",
    "inputs": [
      {
        "name": "roundNo",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "startDate",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "TokenAddressSet",
    "type": "event",
    "inputs": [
      {
        "name": "tokenAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Unpaused",
    "type": "event",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ANNUAL_FEE_PERCENTAGE",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "BATT",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IERC20"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "MAX_PARTICIPATION_AMOUNT",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "USDC",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IERC20"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "USDT",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IERC20"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "USDTDecimal",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "VESTING_PERIOD_MONTHS",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "addCoreOwner",
    "type": "function",
    "inputs": [
      {
        "name": "_newCoreOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "addOwner",
    "type": "function",
    "inputs": [
      {
        "name": "_newOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "batteryTokenDecimal",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "coreOwnerList",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getHashValuesByAddress",
    "type": "function",
    "inputs": [
      {
        "name": "userAddress",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple[]",
        "components": [
          {
            "name": "userAddress",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "roundNo",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hashValue",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "reserveDate",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "totalBATTAmount",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "tokenPrice",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "tokenSymbol",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "totalPaidAmount",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "isReleased",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "vestingStart",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "vestingClaimedMonths",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "isRefunded",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "releasedBATTAmount",
            "type": "uint256",
            "internalType": "uint256"
          }
        ],
        "internalType": "struct BatteryCoinPresale.HashValue[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getLastHashValueByAddress",
    "type": "function",
    "inputs": [
      {
        "name": "userAddress",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getLatestRound",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "components": [
          {
            "name": "startDate",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "roundNo",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "roundPrice",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "totalTokenAmount",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "remainAmount",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "isStarted",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "isFinished",
            "type": "bool",
            "internalType": "bool"
          }
        ],
        "internalType": "struct BatteryCoinPresale.PresaleRound"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getPresaleInfo",
    "type": "function",
    "inputs": [
      {
        "name": "_hashValue",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "components": [
          {
            "name": "userAddress",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "roundNo",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hashValue",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "reserveDate",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "totalBATTAmount",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "tokenPrice",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "tokenSymbol",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "totalPaidAmount",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "isReleased",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "vestingStart",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "vestingClaimedMonths",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "isRefunded",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "releasedBATTAmount",
            "type": "uint256",
            "internalType": "uint256"
          }
        ],
        "internalType": "struct BatteryCoinPresale.HashValue"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "initializeRounds",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "isCoreOwner",
    "type": "function",
    "inputs": [
      {
        "name": "_address",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "isOwner",
    "type": "function",
    "inputs": [
      {
        "name": "_address",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "owner",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "ownerList",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "pause",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "paused",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "presaleRoundCount",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "presaleRoundList",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "startDate",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "roundNo",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "roundPrice",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalTokenAmount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "remainAmount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "isStarted",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "isFinished",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "refundUser",
    "type": "function",
    "inputs": [
      {
        "name": "_hashValue",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "releaseFunds",
    "type": "function",
    "inputs": [
      {
        "name": "_to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_amount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_token",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "releasePresaleAll",
    "type": "function",
    "inputs": [
      {
        "name": "isReleaseOneTime",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "releaseGroupNumber",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "releasePresaleByHashValue",
    "type": "function",
    "inputs": [
      {
        "name": "_hashValue",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "removeCoreOwner",
    "type": "function",
    "inputs": [
      {
        "name": "_coreOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "removeOwner",
    "type": "function",
    "inputs": [
      {
        "name": "_owner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "renounceOwnership",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "reserve",
    "type": "function",
    "inputs": [
      {
        "name": "_amount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_token",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "reserveWithETH",
    "type": "function",
    "inputs": [
      {
        "name": "_amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "name": "setBATTTokenAddress",
    "type": "function",
    "inputs": [
      {
        "name": "_tokenAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_decimal",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setRound",
    "type": "function",
    "inputs": [
      {
        "name": "_roundNo",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_startDate",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "tokenValueDecimals",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "transferOwnership",
    "type": "function",
    "inputs": [
      {
        "name": "newOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "unpause",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "userParticipation",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "vestingPeriodStartTime",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "vestingPeriodStarted",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  }
]

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.