├── .gitignore ├── src ├── wallet.js ├── utils.js ├── claim.js └── abi.js ├── package.json ├── LICENSE ├── README.md └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | package-lock.json 4 | privateKeys.json -------------------------------------------------------------------------------- /src/wallet.js: -------------------------------------------------------------------------------- 1 | const { Wallet, Contract } = require('ethers'); 2 | const { RIVALZ_ABI } = require('./abi'); 3 | 4 | function createWallet(privateKey, provider) { 5 | return new Wallet(privateKey, provider); 6 | } 7 | 8 | function createContract(wallet, contractAddress) { 9 | return new Contract(contractAddress, RIVALZ_ABI, wallet); 10 | } 11 | 12 | module.exports = { 13 | createWallet, 14 | createContract, 15 | }; 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rivalz-ai-bot", 3 | "version": "2.0.0", 4 | "description": "A bot for interacting with the Rivalz Fragmentz claimer using Ethereum wallets.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node index.js" 9 | }, 10 | "keywords": [], 11 | "author": "Dante4rt", 12 | "license": "MIT", 13 | "dependencies": { 14 | "axios": "^1.7.2", 15 | "colors": "^1.4.0", 16 | "cron": "^3.1.7", 17 | "ethers": "^6.13.1", 18 | "inquirer": "^8.2.6", 19 | "moment": "^2.30.1", 20 | "readline-sync": "^1.4.10" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | const RPC_URL = 'https://rivalz2.rpc.caldera.xyz/infra-partner-http'; 2 | 3 | function displayHeader() { 4 | process.stdout.write('\x1Bc'); 5 | console.log('========================================'.cyan); 6 | console.log('= Rivalz Fragmentz Claimer Bot ='.cyan); 7 | console.log('= Created by HappyCuanAirdrop ='.cyan); 8 | console.log('= https://t.me/HappyCuanAirdrop ='.cyan); 9 | console.log('========================================'.cyan); 10 | console.log(); 11 | } 12 | 13 | async function checkBalance(provider, address) { 14 | const balance = await provider.getBalance(address); 15 | return balance; 16 | } 17 | 18 | const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); 19 | 20 | module.exports = { 21 | displayHeader, 22 | checkBalance, 23 | RPC_URL, 24 | delay, 25 | }; 26 | -------------------------------------------------------------------------------- /src/claim.js: -------------------------------------------------------------------------------- 1 | const moment = require('moment'); 2 | const { delay } = require('./utils'); 3 | 4 | async function claimFragmentz(contract, numClaims) { 5 | for (let i = 0; i < numClaims; i++) { 6 | try { 7 | const responseContract = await contract.claim(); 8 | 9 | if (responseContract.hash) { 10 | console.log( 11 | `[ ${moment().format( 12 | 'HH:mm:ss' 13 | )} ] Successfully claimed Fragmentz for address ${ 14 | responseContract.from 15 | }`.green 16 | ); 17 | console.log( 18 | `[ ${moment().format( 19 | 'HH:mm:ss' 20 | )} ] Check your hash here: https://rivalz2.explorer.caldera.xyz/tx/${ 21 | responseContract.hash 22 | }`.green 23 | ); 24 | } 25 | await delay(5000); 26 | } catch (error) { 27 | console.log( 28 | `[ ${moment().format('HH:mm:ss')} ] Error claiming Fragmentz: ${ 29 | error.message 30 | }`.red 31 | ); 32 | } 33 | } 34 | } 35 | 36 | module.exports = { 37 | claimFragmentz, 38 | }; 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Dante4rt 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rivalz AI Bot 2 | 3 | This repository contains a bot for interacting with the Rivalz Fragmentz claimer using Ethereum wallets. 4 | 5 | ## Features 6 | 7 | - Check wallet balances 8 | - Claim Fragmentz 9 | - One-time claim 10 | - Recurring claim every 12 hours 11 | - Interactive CLI interface 12 | 13 | ## Getting Started 14 | 15 | Follow these steps to set up and run the bot. 16 | 17 | ### Prerequisites 18 | 19 | - Node.js (version 16 or higher) 20 | - npm 21 | 22 | ### Installation 23 | 24 | 1. Clone the repository: 25 | 26 | ```bash 27 | git clone https://github.com/dante4rt/rivalz-ai-bot.git 28 | cd rivalz-ai-bot 29 | ``` 30 | 31 | 2. Install dependencies: 32 | 33 | ```bash 34 | npm install 35 | ``` 36 | 37 | ### Setting Up Wallets 38 | 39 | You need to provide your Ethereum private keys or mnemonics in either `privateKeys.json` or `accounts.json` in the following formats: 40 | 41 | - For private keys (array of strings): 42 | 43 | ```json 44 | [ 45 | "private_key_1", 46 | "private_key_2" 47 | ] 48 | ``` 49 | 50 | - For mnemonics (array of strings): 51 | 52 | ```json 53 | [ 54 | "banana apple boat monkey", 55 | "chicken dog cat ball" 56 | ] 57 | ``` 58 | 59 | ### Usage 60 | 61 | To start the bot, run: 62 | 63 | ```bash 64 | npm start 65 | ``` 66 | 67 | #### Options 68 | 69 | 1. **Check Balances**: Enter `0` to check the balance of each wallet. 70 | 2. **Claim Fragmentz**: Enter `1` to claim Fragmentz. 71 | - **One-time Claim**: Enter `1` to claim once. 72 | - **Recurring Claim**: Enter `2` to perform an initial claim and set up a recurring job that runs every 12 hours. 73 | 74 | ## Donations 75 | 76 | If you would like to support the development of this project, you can make a donation using the following addresses: 77 | 78 | - **Solana**: `GLQMG8j23ookY8Af1uLUg4CQzuQYhXcx56rkpZkyiJvP` 79 | - **EVM**: `0x960EDa0D16f4D70df60629117ad6e5F1E13B8F44` 80 | - **BTC**: `bc1p9za9ctgwwvc7amdng8gvrjpwhnhnwaxzj3nfv07szqwrsrudfh6qvvxrj8` 81 | 82 | ## License 83 | 84 | This project is licensed under the [MIT License](LICENSE). 85 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | require('colors'); 2 | const fs = require('fs'); 3 | const readlineSync = require('readline-sync'); 4 | const inquirer = require('inquirer'); 5 | const { displayHeader, checkBalance } = require('./src/utils'); 6 | const { createWallet, createContract } = require('./src/wallet'); 7 | const { claimFragmentz } = require('./src/claim'); 8 | const { RPC_URL } = require('./src/utils'); 9 | const { JsonRpcProvider, ethers } = require('ethers'); 10 | const moment = require('moment'); 11 | const { CronJob } = require('cron'); 12 | const CONTRACT_ADDRESS = '0xF0a66d18b46D4D5dd9947914ab3B2DDbdC19C2C0'; 13 | 14 | let recurringSettings = {}; 15 | 16 | async function claimProcess(seedPhrasesOrKeys, method, provider, numClaims) { 17 | for (const keyOrPhrase of seedPhrasesOrKeys) { 18 | let wallet; 19 | if (method === '0') { 20 | wallet = createWallet(keyOrPhrase, provider); 21 | } else { 22 | wallet = createWallet(keyOrPhrase, provider); 23 | } 24 | 25 | const senderAddress = wallet.address; 26 | console.log(`\nProcessing transactions for address: ${senderAddress}`.cyan); 27 | 28 | const contract = createContract(wallet, CONTRACT_ADDRESS); 29 | try { 30 | await claimFragmentz(contract, numClaims); 31 | console.log( 32 | `\nSuccessfully claimed ${numClaims} Fragmentz for ${senderAddress}` 33 | .green 34 | ); 35 | } catch (error) { 36 | console.log( 37 | `[ ${moment().format( 38 | 'HH:mm:ss' 39 | )} ] Error claiming Fragmentz for ${senderAddress}: ${error.message}` 40 | .red 41 | ); 42 | } 43 | } 44 | } 45 | 46 | async function setupRecurringClaim( 47 | seedPhrasesOrKeys, 48 | method, 49 | provider, 50 | numClaims 51 | ) { 52 | console.log('Setting up recurring claim every 12 hours...'.green); 53 | 54 | const job = new CronJob('0 */12 * * *', async function () { 55 | await claimProcess(seedPhrasesOrKeys, method, provider, numClaims); 56 | console.log( 57 | `[ ${moment().format('HH:mm:ss')} ] Recurring claim executed.`.green 58 | ); 59 | }); 60 | 61 | job.start(); 62 | console.log('Cron job successfully set up.'.green); 63 | } 64 | 65 | async function main() { 66 | displayHeader(); 67 | 68 | const provider = new JsonRpcProvider(RPC_URL); 69 | 70 | while (true) { 71 | const { action } = await inquirer.prompt([ 72 | { 73 | type: 'list', 74 | name: 'action', 75 | message: 'Select an option:', 76 | choices: [ 77 | { name: 'Check balance', value: '0' }, 78 | { name: 'Claim Fragmentz', value: '1' }, 79 | { name: 'Exit', value: '2' }, 80 | ], 81 | }, 82 | ]); 83 | 84 | if (action === '2') { 85 | console.log('Exiting...'.cyan); 86 | break; 87 | } 88 | 89 | try { 90 | let claimOption = null; 91 | if (action === '0') { 92 | const privateKeys = JSON.parse( 93 | fs.readFileSync('privateKeys.json', 'utf-8') 94 | ); 95 | if (!Array.isArray(privateKeys) || privateKeys.length === 0) { 96 | throw new Error( 97 | 'privateKeys.json is not set correctly or is empty'.red 98 | ); 99 | } 100 | 101 | for (const privateKey of privateKeys) { 102 | const wallet = createWallet(privateKey, provider); 103 | const senderAddress = wallet.address; 104 | 105 | const balance = await checkBalance(provider, senderAddress); 106 | console.log( 107 | `Address: ${senderAddress} - Balance: ${ethers.formatEther( 108 | balance 109 | )} ETH`.yellow 110 | ); 111 | console.log( 112 | `Claim faucet here: https://rivalz2.hub.caldera.xyz/`.yellow 113 | ); 114 | } 115 | } else if (action === '1') { 116 | let method, seedPhrasesOrKeys; 117 | 118 | if (recurringSettings.claimOption === '2') { 119 | claimOption = '2'; 120 | method = recurringSettings.method; 121 | seedPhrasesOrKeys = recurringSettings.seedPhrasesOrKeys; 122 | } else { 123 | ({ claimOption } = await inquirer.prompt([ 124 | { 125 | type: 'list', 126 | name: 'claimOption', 127 | message: 'Select claim type:', 128 | choices: [ 129 | { name: 'One-time claim', value: '1' }, 130 | { name: '12 hours recurring claim', value: '2' }, 131 | ], 132 | }, 133 | ])); 134 | 135 | ({ method } = await inquirer.prompt([ 136 | { 137 | type: 'list', 138 | name: 'method', 139 | message: 'Select input method:', 140 | choices: [ 141 | { name: 'Use mnemonics', value: '0' }, 142 | { name: 'Use private keys', value: '1' }, 143 | ], 144 | }, 145 | ])); 146 | 147 | if (method === '0') { 148 | seedPhrasesOrKeys = JSON.parse( 149 | fs.readFileSync('accounts.json', 'utf-8') 150 | ); 151 | if ( 152 | !Array.isArray(seedPhrasesOrKeys) || 153 | seedPhrasesOrKeys.length === 0 154 | ) { 155 | throw new Error( 156 | 'accounts.json is not set correctly or is empty'.red 157 | ); 158 | } 159 | } else if (method === '1') { 160 | seedPhrasesOrKeys = JSON.parse( 161 | fs.readFileSync('privateKeys.json', 'utf-8') 162 | ); 163 | if ( 164 | !Array.isArray(seedPhrasesOrKeys) || 165 | seedPhrasesOrKeys.length === 0 166 | ) { 167 | throw new Error( 168 | 'privateKeys.json is not set correctly or is empty'.red 169 | ); 170 | } 171 | } else { 172 | throw new Error('Invalid input method selected'.red); 173 | } 174 | } 175 | 176 | const numClaims = readlineSync.questionInt( 177 | 'How many Fragmentz do you want to claim? ' 178 | ); 179 | 180 | console.log(''); 181 | 182 | await claimProcess(seedPhrasesOrKeys, method, provider, numClaims); 183 | console.log('\nInitial claim completed.'.green); 184 | 185 | if (claimOption === '2') { 186 | recurringSettings = { claimOption, method, seedPhrasesOrKeys }; 187 | await setupRecurringClaim( 188 | seedPhrasesOrKeys, 189 | method, 190 | provider, 191 | numClaims 192 | ); 193 | console.log( 194 | 'Bot is now running in idle mode. It will perform claims every 12 hours.' 195 | .green 196 | ); 197 | break; 198 | } 199 | } 200 | } catch (error) { 201 | console.log( 202 | `[ ${moment().format('HH:mm:ss')} ] Error in main loop: ${ 203 | error.message 204 | }`.red 205 | ); 206 | } 207 | } 208 | } 209 | 210 | main(); 211 | -------------------------------------------------------------------------------- /src/abi.js: -------------------------------------------------------------------------------- 1 | const RIVALZ_ABI = [ 2 | { 3 | inputs: [ 4 | { internalType: 'address', name: 'defaultAdmin', type: 'address' }, 5 | { internalType: 'address', name: 'minter', type: 'address' }, 6 | ], 7 | stateMutability: 'nonpayable', 8 | type: 'constructor', 9 | }, 10 | { inputs: [], name: 'AccessControlBadConfirmation', type: 'error' }, 11 | { 12 | inputs: [ 13 | { internalType: 'address', name: 'account', type: 'address' }, 14 | { internalType: 'bytes32', name: 'neededRole', type: 'bytes32' }, 15 | ], 16 | name: 'AccessControlUnauthorizedAccount', 17 | type: 'error', 18 | }, 19 | { 20 | inputs: [ 21 | { internalType: 'address', name: 'sender', type: 'address' }, 22 | { internalType: 'uint256', name: 'balance', type: 'uint256' }, 23 | { internalType: 'uint256', name: 'needed', type: 'uint256' }, 24 | { internalType: 'uint256', name: 'tokenId', type: 'uint256' }, 25 | ], 26 | name: 'ERC1155InsufficientBalance', 27 | type: 'error', 28 | }, 29 | { 30 | inputs: [{ internalType: 'address', name: 'approver', type: 'address' }], 31 | name: 'ERC1155InvalidApprover', 32 | type: 'error', 33 | }, 34 | { 35 | inputs: [ 36 | { internalType: 'uint256', name: 'idsLength', type: 'uint256' }, 37 | { internalType: 'uint256', name: 'valuesLength', type: 'uint256' }, 38 | ], 39 | name: 'ERC1155InvalidArrayLength', 40 | type: 'error', 41 | }, 42 | { 43 | inputs: [{ internalType: 'address', name: 'operator', type: 'address' }], 44 | name: 'ERC1155InvalidOperator', 45 | type: 'error', 46 | }, 47 | { 48 | inputs: [{ internalType: 'address', name: 'receiver', type: 'address' }], 49 | name: 'ERC1155InvalidReceiver', 50 | type: 'error', 51 | }, 52 | { 53 | inputs: [{ internalType: 'address', name: 'sender', type: 'address' }], 54 | name: 'ERC1155InvalidSender', 55 | type: 'error', 56 | }, 57 | { 58 | inputs: [ 59 | { internalType: 'address', name: 'operator', type: 'address' }, 60 | { internalType: 'address', name: 'owner', type: 'address' }, 61 | ], 62 | name: 'ERC1155MissingApprovalForAll', 63 | type: 'error', 64 | }, 65 | { inputs: [], name: 'ExceedTokenInPeriod', type: 'error' }, 66 | { inputs: [], name: 'TransferIsDisable', type: 'error' }, 67 | { inputs: [], name: 'UserInBlacklist', type: 'error' }, 68 | { 69 | anonymous: false, 70 | inputs: [ 71 | { 72 | indexed: true, 73 | internalType: 'address', 74 | name: 'account', 75 | type: 'address', 76 | }, 77 | { 78 | indexed: true, 79 | internalType: 'address', 80 | name: 'operator', 81 | type: 'address', 82 | }, 83 | { indexed: false, internalType: 'bool', name: 'approved', type: 'bool' }, 84 | ], 85 | name: 'ApprovalForAll', 86 | type: 'event', 87 | }, 88 | { 89 | anonymous: false, 90 | inputs: [ 91 | { 92 | indexed: false, 93 | internalType: 'address', 94 | name: 'user', 95 | type: 'address', 96 | }, 97 | ], 98 | name: 'BlacklistAdded', 99 | type: 'event', 100 | }, 101 | { 102 | anonymous: false, 103 | inputs: [ 104 | { 105 | indexed: false, 106 | internalType: 'address', 107 | name: 'user', 108 | type: 'address', 109 | }, 110 | ], 111 | name: 'BlacklistRemoved', 112 | type: 'event', 113 | }, 114 | { 115 | anonymous: false, 116 | inputs: [ 117 | { 118 | indexed: false, 119 | internalType: 'uint256', 120 | name: 'period', 121 | type: 'uint256', 122 | }, 123 | { 124 | indexed: false, 125 | internalType: 'uint256', 126 | name: 'amount', 127 | type: 'uint256', 128 | }, 129 | ], 130 | name: 'ClaimInforSet', 131 | type: 'event', 132 | }, 133 | { 134 | anonymous: false, 135 | inputs: [ 136 | { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, 137 | { 138 | indexed: true, 139 | internalType: 'bytes32', 140 | name: 'previousAdminRole', 141 | type: 'bytes32', 142 | }, 143 | { 144 | indexed: true, 145 | internalType: 'bytes32', 146 | name: 'newAdminRole', 147 | type: 'bytes32', 148 | }, 149 | ], 150 | name: 'RoleAdminChanged', 151 | type: 'event', 152 | }, 153 | { 154 | anonymous: false, 155 | inputs: [ 156 | { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, 157 | { 158 | indexed: true, 159 | internalType: 'address', 160 | name: 'account', 161 | type: 'address', 162 | }, 163 | { 164 | indexed: true, 165 | internalType: 'address', 166 | name: 'sender', 167 | type: 'address', 168 | }, 169 | ], 170 | name: 'RoleGranted', 171 | type: 'event', 172 | }, 173 | { 174 | anonymous: false, 175 | inputs: [ 176 | { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, 177 | { 178 | indexed: true, 179 | internalType: 'address', 180 | name: 'account', 181 | type: 'address', 182 | }, 183 | { 184 | indexed: true, 185 | internalType: 'address', 186 | name: 'sender', 187 | type: 'address', 188 | }, 189 | ], 190 | name: 'RoleRevoked', 191 | type: 'event', 192 | }, 193 | { 194 | anonymous: false, 195 | inputs: [ 196 | { indexed: false, internalType: 'uint256', name: 'id', type: 'uint256' }, 197 | ], 198 | name: 'TokenIdAdded', 199 | type: 'event', 200 | }, 201 | { 202 | anonymous: false, 203 | inputs: [ 204 | { indexed: false, internalType: 'uint256', name: 'id', type: 'uint256' }, 205 | ], 206 | name: 'TokenIdRemoved', 207 | type: 'event', 208 | }, 209 | { 210 | anonymous: false, 211 | inputs: [ 212 | { 213 | indexed: true, 214 | internalType: 'address', 215 | name: 'operator', 216 | type: 'address', 217 | }, 218 | { indexed: true, internalType: 'address', name: 'from', type: 'address' }, 219 | { indexed: true, internalType: 'address', name: 'to', type: 'address' }, 220 | { 221 | indexed: false, 222 | internalType: 'uint256[]', 223 | name: 'ids', 224 | type: 'uint256[]', 225 | }, 226 | { 227 | indexed: false, 228 | internalType: 'uint256[]', 229 | name: 'values', 230 | type: 'uint256[]', 231 | }, 232 | ], 233 | name: 'TransferBatch', 234 | type: 'event', 235 | }, 236 | { 237 | anonymous: false, 238 | inputs: [ 239 | { 240 | indexed: true, 241 | internalType: 'address', 242 | name: 'operator', 243 | type: 'address', 244 | }, 245 | { indexed: true, internalType: 'address', name: 'from', type: 'address' }, 246 | { indexed: true, internalType: 'address', name: 'to', type: 'address' }, 247 | { indexed: false, internalType: 'uint256', name: 'id', type: 'uint256' }, 248 | { 249 | indexed: false, 250 | internalType: 'uint256', 251 | name: 'value', 252 | type: 'uint256', 253 | }, 254 | ], 255 | name: 'TransferSingle', 256 | type: 'event', 257 | }, 258 | { 259 | anonymous: false, 260 | inputs: [ 261 | { indexed: false, internalType: 'string', name: 'value', type: 'string' }, 262 | { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, 263 | ], 264 | name: 'URI', 265 | type: 'event', 266 | }, 267 | { 268 | anonymous: false, 269 | inputs: [ 270 | { 271 | indexed: false, 272 | internalType: 'address', 273 | name: 'sender', 274 | type: 'address', 275 | }, 276 | { 277 | indexed: true, 278 | internalType: 'uint256', 279 | name: 'tokenId', 280 | type: 'uint256', 281 | }, 282 | ], 283 | name: 'UserClaimed', 284 | type: 'event', 285 | }, 286 | { 287 | inputs: [], 288 | name: 'DEFAULT_ADMIN_ROLE', 289 | outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], 290 | stateMutability: 'view', 291 | type: 'function', 292 | }, 293 | { 294 | inputs: [], 295 | name: 'MINTER_ROLE', 296 | outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], 297 | stateMutability: 'view', 298 | type: 'function', 299 | }, 300 | { 301 | inputs: [{ internalType: 'address', name: 'user', type: 'address' }], 302 | name: 'addBlacklist', 303 | outputs: [], 304 | stateMutability: 'nonpayable', 305 | type: 'function', 306 | }, 307 | { 308 | inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }], 309 | name: 'addTokenId', 310 | outputs: [], 311 | stateMutability: 'nonpayable', 312 | type: 'function', 313 | }, 314 | { 315 | inputs: [ 316 | { internalType: 'address', name: 'account', type: 'address' }, 317 | { internalType: 'uint256', name: 'id', type: 'uint256' }, 318 | ], 319 | name: 'balanceOf', 320 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 321 | stateMutability: 'view', 322 | type: 'function', 323 | }, 324 | { 325 | inputs: [ 326 | { internalType: 'address[]', name: 'accounts', type: 'address[]' }, 327 | { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' }, 328 | ], 329 | name: 'balanceOfBatch', 330 | outputs: [{ internalType: 'uint256[]', name: '', type: 'uint256[]' }], 331 | stateMutability: 'view', 332 | type: 'function', 333 | }, 334 | { 335 | inputs: [ 336 | { internalType: 'address', name: 'account', type: 'address' }, 337 | { internalType: 'uint256', name: 'id', type: 'uint256' }, 338 | { internalType: 'uint256', name: 'value', type: 'uint256' }, 339 | ], 340 | name: 'burn', 341 | outputs: [], 342 | stateMutability: 'nonpayable', 343 | type: 'function', 344 | }, 345 | { 346 | inputs: [ 347 | { internalType: 'address', name: 'account', type: 'address' }, 348 | { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' }, 349 | { internalType: 'uint256[]', name: 'values', type: 'uint256[]' }, 350 | ], 351 | name: 'burnBatch', 352 | outputs: [], 353 | stateMutability: 'nonpayable', 354 | type: 'function', 355 | }, 356 | { 357 | inputs: [], 358 | name: 'claim', 359 | outputs: [], 360 | stateMutability: 'nonpayable', 361 | type: 'function', 362 | }, 363 | { 364 | inputs: [{ internalType: 'address', name: 'user', type: 'address' }], 365 | name: 'claimableAmount', 366 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 367 | stateMutability: 'view', 368 | type: 'function', 369 | }, 370 | { 371 | inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }], 372 | name: 'exists', 373 | outputs: [{ internalType: 'bool', name: '', type: 'bool' }], 374 | stateMutability: 'view', 375 | type: 'function', 376 | }, 377 | { 378 | inputs: [{ internalType: 'bytes32', name: 'role', type: 'bytes32' }], 379 | name: 'getRoleAdmin', 380 | outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], 381 | stateMutability: 'view', 382 | type: 'function', 383 | }, 384 | { 385 | inputs: [ 386 | { internalType: 'bytes32', name: 'role', type: 'bytes32' }, 387 | { internalType: 'address', name: 'account', type: 'address' }, 388 | ], 389 | name: 'grantRole', 390 | outputs: [], 391 | stateMutability: 'nonpayable', 392 | type: 'function', 393 | }, 394 | { 395 | inputs: [ 396 | { internalType: 'bytes32', name: 'role', type: 'bytes32' }, 397 | { internalType: 'address', name: 'account', type: 'address' }, 398 | ], 399 | name: 'hasRole', 400 | outputs: [{ internalType: 'bool', name: '', type: 'bool' }], 401 | stateMutability: 'view', 402 | type: 'function', 403 | }, 404 | { 405 | inputs: [ 406 | { internalType: 'address', name: 'account', type: 'address' }, 407 | { internalType: 'address', name: 'operator', type: 'address' }, 408 | ], 409 | name: 'isApprovedForAll', 410 | outputs: [{ internalType: 'bool', name: '', type: 'bool' }], 411 | stateMutability: 'view', 412 | type: 'function', 413 | }, 414 | { 415 | inputs: [ 416 | { internalType: 'address', name: 'account', type: 'address' }, 417 | { internalType: 'uint256', name: 'id', type: 'uint256' }, 418 | { internalType: 'uint256', name: 'amount', type: 'uint256' }, 419 | { internalType: 'bytes', name: 'data', type: 'bytes' }, 420 | ], 421 | name: 'mint', 422 | outputs: [], 423 | stateMutability: 'nonpayable', 424 | type: 'function', 425 | }, 426 | { 427 | inputs: [ 428 | { internalType: 'address', name: 'to', type: 'address' }, 429 | { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' }, 430 | { internalType: 'uint256[]', name: 'amounts', type: 'uint256[]' }, 431 | { internalType: 'bytes', name: 'data', type: 'bytes' }, 432 | ], 433 | name: 'mintBatch', 434 | outputs: [], 435 | stateMutability: 'nonpayable', 436 | type: 'function', 437 | }, 438 | { 439 | inputs: [{ internalType: 'address', name: 'user', type: 'address' }], 440 | name: 'removeBlacklist', 441 | outputs: [], 442 | stateMutability: 'nonpayable', 443 | type: 'function', 444 | }, 445 | { 446 | inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }], 447 | name: 'removeTokenId', 448 | outputs: [], 449 | stateMutability: 'nonpayable', 450 | type: 'function', 451 | }, 452 | { 453 | inputs: [ 454 | { internalType: 'bytes32', name: 'role', type: 'bytes32' }, 455 | { internalType: 'address', name: 'callerConfirmation', type: 'address' }, 456 | ], 457 | name: 'renounceRole', 458 | outputs: [], 459 | stateMutability: 'nonpayable', 460 | type: 'function', 461 | }, 462 | { 463 | inputs: [ 464 | { internalType: 'bytes32', name: 'role', type: 'bytes32' }, 465 | { internalType: 'address', name: 'account', type: 'address' }, 466 | ], 467 | name: 'revokeRole', 468 | outputs: [], 469 | stateMutability: 'nonpayable', 470 | type: 'function', 471 | }, 472 | { 473 | inputs: [{ internalType: 'address', name: '', type: 'address' }], 474 | name: 'sBlacklist', 475 | outputs: [{ internalType: 'bool', name: '', type: 'bool' }], 476 | stateMutability: 'view', 477 | type: 'function', 478 | }, 479 | { 480 | inputs: [], 481 | name: 'sClaimPeriod', 482 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 483 | stateMutability: 'view', 484 | type: 'function', 485 | }, 486 | { 487 | inputs: [{ internalType: 'address', name: '', type: 'address' }], 488 | name: 'sNextClaims', 489 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 490 | stateMutability: 'view', 491 | type: 'function', 492 | }, 493 | { 494 | inputs: [{ internalType: 'address', name: '', type: 'address' }], 495 | name: 'sTokenClaimedInPeriod', 496 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 497 | stateMutability: 'view', 498 | type: 'function', 499 | }, 500 | { 501 | inputs: [], 502 | name: 'sTransferable', 503 | outputs: [{ internalType: 'bool', name: '', type: 'bool' }], 504 | stateMutability: 'view', 505 | type: 'function', 506 | }, 507 | { 508 | inputs: [ 509 | { internalType: 'address', name: 'from', type: 'address' }, 510 | { internalType: 'address', name: 'to', type: 'address' }, 511 | { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' }, 512 | { internalType: 'uint256[]', name: 'values', type: 'uint256[]' }, 513 | { internalType: 'bytes', name: 'data', type: 'bytes' }, 514 | ], 515 | name: 'safeBatchTransferFrom', 516 | outputs: [], 517 | stateMutability: 'nonpayable', 518 | type: 'function', 519 | }, 520 | { 521 | inputs: [ 522 | { internalType: 'address', name: 'from', type: 'address' }, 523 | { internalType: 'address', name: 'to', type: 'address' }, 524 | { internalType: 'uint256', name: 'id', type: 'uint256' }, 525 | { internalType: 'uint256', name: 'value', type: 'uint256' }, 526 | { internalType: 'bytes', name: 'data', type: 'bytes' }, 527 | ], 528 | name: 'safeTransferFrom', 529 | outputs: [], 530 | stateMutability: 'nonpayable', 531 | type: 'function', 532 | }, 533 | { 534 | inputs: [ 535 | { internalType: 'address', name: 'operator', type: 'address' }, 536 | { internalType: 'bool', name: 'approved', type: 'bool' }, 537 | ], 538 | name: 'setApprovalForAll', 539 | outputs: [], 540 | stateMutability: 'nonpayable', 541 | type: 'function', 542 | }, 543 | { 544 | inputs: [ 545 | { internalType: 'uint256', name: 'period', type: 'uint256' }, 546 | { internalType: 'uint256', name: 'amount', type: 'uint256' }, 547 | ], 548 | name: 'setClaimInfor', 549 | outputs: [], 550 | stateMutability: 'nonpayable', 551 | type: 'function', 552 | }, 553 | { 554 | inputs: [{ internalType: 'bool', name: 'enable', type: 'bool' }], 555 | name: 'setTransferable', 556 | outputs: [], 557 | stateMutability: 'nonpayable', 558 | type: 'function', 559 | }, 560 | { 561 | inputs: [{ internalType: 'string', name: 'newuri', type: 'string' }], 562 | name: 'setURI', 563 | outputs: [], 564 | stateMutability: 'nonpayable', 565 | type: 'function', 566 | }, 567 | { 568 | inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }], 569 | name: 'supportsInterface', 570 | outputs: [{ internalType: 'bool', name: '', type: 'bool' }], 571 | stateMutability: 'view', 572 | type: 'function', 573 | }, 574 | { 575 | inputs: [], 576 | name: 'totalSupply', 577 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 578 | stateMutability: 'view', 579 | type: 'function', 580 | }, 581 | { 582 | inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }], 583 | name: 'totalSupply', 584 | outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 585 | stateMutability: 'view', 586 | type: 'function', 587 | }, 588 | { 589 | inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], 590 | name: 'uri', 591 | outputs: [{ internalType: 'string', name: '', type: 'string' }], 592 | stateMutability: 'view', 593 | type: 'function', 594 | }, 595 | ]; 596 | 597 | module.exports = { RIVALZ_ABI }; 598 | --------------------------------------------------------------------------------