├── .gitignore ├── src ├── config │ └── config.js ├── core │ ├── rpc.js │ ├── rivalz.js │ └── fragment.js ├── utils │ ├── logger.js │ ├── twist.js │ └── helper.js └── api │ └── api.js ├── account_tmp.js ├── package.json ├── README.md └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | account.js 3 | log/* 4 | .DS_Store 5 | package-lock.json -------------------------------------------------------------------------------- /src/config/config.js: -------------------------------------------------------------------------------- 1 | export class Config { 2 | static fragmentToClaim = 20; //numb of fragment to claim 3 | } 4 | -------------------------------------------------------------------------------- /account_tmp.js: -------------------------------------------------------------------------------- 1 | export const account = [ 2 | "WALLET SEED PHASE", 3 | "WALLET PRIVATE KEY", 4 | "WALLET SEED PHASE", 5 | "WALLET SEED PHASE", 6 | "WALLET PRIVATE KEY", 7 | "WALLET PRIVATE KEY", 8 | ]; 9 | -------------------------------------------------------------------------------- /src/core/rpc.js: -------------------------------------------------------------------------------- 1 | import { ethers } from "ethers"; 2 | 3 | export class RPC { 4 | static RPC_URL = "https://rivalz2.rpc.caldera.xyz/http"; 5 | static provider = new ethers.JsonRpcProvider(this.RPC_URL); 6 | } 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lake-tx-bot", 3 | "version": "1.0.0", 4 | "type": "module", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "description": "", 14 | "dependencies": { 15 | "bip39": "^3.1.0", 16 | "ethers": "^6.13.1", 17 | "twisters": "^1.1.0", 18 | "winston": "^3.13.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RIVALZ FRAGMENT CLAIMER 2 | 3 | RIVALZ Fragment Auto Claim bot claim your daily rivalz fragment 4 | 5 | ## BOT FEATURE 6 | 7 | - Auto Claim 8 | 9 | ## PREREQUISITE 10 | 11 | - Git 12 | - Node JS > v22 13 | - Eth Testnet Balance 14 | 15 | ## SETUP 16 | 17 | - run `git clone https://github.com/Widiskel/rivalz-fragment-claimer.git` 18 | - run `cd rivalz-fragment-claimer` 19 | - run `npm install` 20 | - run `cp account_tmp.js account.js` 21 | - fill up account.js `nano account.js` fill with your account Private Key or Seed Phrase 22 | 23 | ## CONFIGURATION 24 | 25 | im adding config file for you to configure, open `src config/config.js` and adjust config. Here some configurable variables. 26 | 27 | ```js 28 | fragmentToClaim = 20; 29 | ``` 30 | 31 | ## HOW TO UPDATE 32 | 33 | to update just run `git pull` or if it failed because of unstaged commit, just run `git stash` and then `git pull`. after that do `npm install` or `npm update`. 34 | 35 | ## CONTRIBUTE 36 | 37 | Feel free to fork and contribute adding more feature thanks. 38 | 39 | ## SUPPORT 40 | 41 | want to support me for creating another bot ? star my repo or 42 | buy me a coffee on 43 | 44 | EVM : `0x0fd08d2d42ff086bf8c6d057d02d802bf217559a` 45 | 46 | SOLANA : `3tE3Hs7P2wuRyVxyMD7JSf8JTAmEekdNsQWqAnayE1CN` 47 | -------------------------------------------------------------------------------- /src/utils/logger.js: -------------------------------------------------------------------------------- 1 | import { createLogger, format, transports } from "winston"; 2 | import fs from "fs"; 3 | 4 | const { combine, timestamp, printf, colorize } = format; 5 | 6 | const customFormat = printf(({ level, message, timestamp }) => { 7 | return `${timestamp} [${level}]: ${message}`; 8 | }); 9 | 10 | class Logger { 11 | constructor() { 12 | this.logger = createLogger({ 13 | level: "debug", 14 | format: combine( 15 | timestamp({ 16 | format: "YYYY-MM-DD HH:mm:ss", 17 | }), 18 | colorize(), 19 | customFormat 20 | ), 21 | transports: [new transports.File({ filename: "log/app.log" })], 22 | exceptionHandlers: [new transports.File({ filename: "log/app.log" })], 23 | rejectionHandlers: [new transports.File({ filename: "log/app.log" })], 24 | }); 25 | } 26 | 27 | info(message) { 28 | this.logger.info(message); 29 | } 30 | 31 | warn(message) { 32 | this.logger.warn(message); 33 | } 34 | 35 | error(message) { 36 | this.logger.error(message); 37 | } 38 | 39 | debug(message) { 40 | this.logger.debug(message); 41 | } 42 | 43 | setLevel(level) { 44 | this.logger.level = level; 45 | } 46 | 47 | clear() { 48 | fs.truncate("log/app.log", 0, (err) => { 49 | if (err) { 50 | this.logger.error("Failed to clear the log file: " + err.message); 51 | } else { 52 | this.logger.info("Log file cleared"); 53 | } 54 | }); 55 | } 56 | } 57 | 58 | export default new Logger(); 59 | -------------------------------------------------------------------------------- /src/utils/twist.js: -------------------------------------------------------------------------------- 1 | import { Twisters } from "twisters"; 2 | import logger from "./logger.js"; 3 | import { Rivalz } from "../core/rivalz.js"; 4 | import { account } from "../../account.js"; 5 | 6 | class Twist { 7 | constructor() { 8 | /** @type {Twisters}*/ 9 | this.twisters = new Twisters({}); 10 | } 11 | 12 | /** 13 | * @param {string} acc 14 | * @param {Rivalz} rivalz 15 | * @param {string} msg 16 | * @param {string} delay 17 | */ 18 | log(msg = "", acc = "", rivalz = new Rivalz(), delay) { 19 | if (delay == undefined) { 20 | logger.info(`Account ${account.indexOf(acc) + 1} - ${msg}`); 21 | delay = "-"; 22 | } 23 | 24 | const wallet = rivalz.wallet ?? {}; 25 | const address = wallet.address ?? "-"; 26 | const balance = rivalz.balance ?? "-"; 27 | const ETHBalance = balance.ETH ?? "-"; 28 | 29 | this.twisters.put(acc, { 30 | text: ` 31 | ================= Account ${account.indexOf(acc) + 1} ============= 32 | Address : ${address} 33 | Balance : ${ETHBalance} ETH 34 | 35 | Status : ${msg} 36 | Delay : ${delay} 37 | ==============================================`, 38 | }); 39 | } 40 | 41 | clear(acc) { 42 | this.twisters.remove(acc); 43 | } 44 | 45 | /** 46 | * @param {string} msg 47 | */ 48 | info(msg = "") { 49 | this.twisters.put(2, { 50 | text: ` 51 | ============================================== 52 | Info : ${msg} 53 | ==============================================`, 54 | }); 55 | return; 56 | } 57 | 58 | cleanInfo() { 59 | this.twisters.remove(2); 60 | } 61 | } 62 | export default new Twist(); 63 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import { account } from "./account.js"; 2 | import { Config } from "./src/config/config.js"; 3 | import { Rivalz } from "./src/core/rivalz.js"; 4 | import { Helper } from "./src/utils/helper.js"; 5 | import logger from "./src/utils/logger.js"; 6 | import twist from "./src/utils/twist.js"; 7 | 8 | async function operation(acc) { 9 | try { 10 | const rivalz = new Rivalz(acc); 11 | await rivalz.connectWallet(); 12 | await rivalz.getBalance(); 13 | 14 | let itr = 1; 15 | for (const claim of Array(Config.fragmentToClaim)) { 16 | await rivalz.claimFragment(itr, Array(Config.fragmentToClaim).length); 17 | itr += 1; 18 | if (rivalz.claimError) { 19 | break; 20 | } 21 | } 22 | 23 | await Helper.delay( 24 | 50000, 25 | acc, 26 | `All Fragment Claimed and Account ${ 27 | account.indexOf(acc) + 1 28 | } Processing Complete...`, 29 | rivalz 30 | ); 31 | twist.clear(acc); 32 | } catch (error) { 33 | await Helper.delay( 34 | 5000, 35 | acc, 36 | `Error processing Accoung ${account.indexOf(acc) + 1} : ${JSON.stringify( 37 | error 38 | )}` 39 | ); 40 | } 41 | } 42 | 43 | /** Processing Bot */ 44 | async function process() { 45 | logger.clear(); 46 | logger.info(`BOT STARTED`); 47 | const promiseList = account.map(async (acc) => { 48 | await operation(acc); 49 | }); 50 | await Promise.all(promiseList); 51 | logger.info(`BOT FINISHED`); 52 | twist.cleanInfo(); 53 | await Helper.delay( 54 | 60000 * 60 * 24, 55 | undefined, 56 | `All Account processed Delaying for ${Helper.msToTime(60000 * 60 * 24)}` 57 | ); 58 | twist.cleanInfo(); 59 | await process(); 60 | } 61 | 62 | (async () => { 63 | console.log("Rivalz Fragment Claimer Bot"); 64 | console.log("By : Widiskel"); 65 | console.log("Note : Don't forget to run git pull to keep up-to-date"); 66 | console.log(); 67 | await process(); 68 | })(); 69 | -------------------------------------------------------------------------------- /src/api/api.js: -------------------------------------------------------------------------------- 1 | import { Helper } from "../utils/helper.js"; 2 | import logger from "../utils/logger.js"; 3 | 4 | export class API { 5 | constructor(url) { 6 | this.url = url; 7 | this.ua = Helper.randomUserAgent(); 8 | } 9 | 10 | generateHeaders(token) { 11 | const headers = { 12 | Accept: "*/*", 13 | "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8", 14 | "Content-Type": "application/json", 15 | "User-Agent": this.ua, 16 | }; 17 | 18 | if (this.token) { 19 | headers.Authorization = token; 20 | } 21 | // console.log(headers); 22 | return headers; 23 | } 24 | 25 | async fetch( 26 | endpoint, 27 | method, 28 | token, 29 | body = {}, 30 | additionalHeader = {}, 31 | customUrl = undefined 32 | ) { 33 | try { 34 | const url = `${customUrl == undefined ? this.url : customUrl}${endpoint}`; 35 | let headers = this.generateHeaders(token); 36 | headers = Object.assign(headers, additionalHeader); 37 | const options = { 38 | cache: "default", 39 | headers, 40 | method, 41 | mode: "cors", 42 | redirect: "follow", 43 | referrer: this.url, 44 | referrerPolicy: "strict-origin-when-cross-origin", 45 | }; 46 | 47 | if (method !== "GET") { 48 | options.body = `${JSON.stringify(body)}`; 49 | } 50 | logger.info(`${method} : ${url}`); 51 | logger.info(`Request Header : ${JSON.stringify(headers)}`); 52 | logger.info(`Request Body : ${JSON.stringify(body)}`); 53 | 54 | const res = await fetch(url, options); 55 | 56 | logger.info(`Response : ${res.status} ${res.statusText}`); 57 | 58 | if (res.ok || res.status == 400) { 59 | const data = await res.json(); 60 | logger.info(`Response Data : ${JSON.stringify(data)}`); 61 | return data; 62 | } else { 63 | throw new Error(res.statusText); 64 | } 65 | } catch (err) { 66 | logger.error(`Error : ${err.message}`); 67 | throw err; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/utils/helper.js: -------------------------------------------------------------------------------- 1 | import bip39 from "bip39"; 2 | import twist from "./twist.js"; 3 | 4 | export class Helper { 5 | static delay = (ms, acc, msg, obj) => { 6 | return new Promise((resolve) => { 7 | let remainingMilliseconds = ms; 8 | 9 | if (acc) { 10 | twist.log(msg, acc, obj, `Delaying for ${this.msToTime(ms)}`); 11 | } else { 12 | twist.info(`Delaying for ${this.msToTime(ms)}`); 13 | } 14 | 15 | const interval = setInterval(() => { 16 | remainingMilliseconds -= 1000; 17 | if (acc) { 18 | twist.log( 19 | msg, 20 | acc, 21 | obj, 22 | `Delaying for ${this.msToTime(remainingMilliseconds)}` 23 | ); 24 | } else { 25 | twist.info(`Delaying for ${this.msToTime(remainingMilliseconds)}`); 26 | } 27 | 28 | if (remainingMilliseconds <= 0) { 29 | clearInterval(interval); 30 | resolve(); 31 | } 32 | }, 1000); 33 | 34 | setTimeout(() => { 35 | clearInterval(interval); 36 | twist.cleanInfo(); 37 | twist.log(msg, acc, obj); 38 | resolve(); 39 | }, ms); 40 | }); 41 | }; 42 | 43 | static msToTime(milliseconds) { 44 | const hours = Math.floor(milliseconds / (1000 * 60 * 60)); 45 | const remainingMillisecondsAfterHours = milliseconds % (1000 * 60 * 60); 46 | const minutes = Math.floor(remainingMillisecondsAfterHours / (1000 * 60)); 47 | const remainingMillisecondsAfterMinutes = 48 | remainingMillisecondsAfterHours % (1000 * 60); 49 | const seconds = Math.round(remainingMillisecondsAfterMinutes / 1000); 50 | 51 | return `${hours} Hours ${minutes} Minutes ${seconds} Seconds`; 52 | } 53 | 54 | static random(min, max) { 55 | const rand = Math.floor(Math.random() * (max - min + 1)) + min; 56 | return rand; 57 | } 58 | 59 | static randomUserAgent() { 60 | const list_useragent = [ 61 | "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1", 62 | "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 EdgiOS/125.2535.60 Mobile/15E148 Safari/605.1.15", 63 | "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.6422.113 Mobile Safari/537.36 EdgA/124.0.2478.104", 64 | "Mozilla/5.0 (Linux; Android 10; Pixel 3 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.6422.113 Mobile Safari/537.36 EdgA/124.0.2478.104", 65 | "Mozilla/5.0 (Linux; Android 10; VOG-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.6422.113 Mobile Safari/537.36 OPR/76.2.4027.73374", 66 | "Mozilla/5.0 (Linux; Android 10; SM-N975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.6422.113 Mobile Safari/537.36 OPR/76.2.4027.73374", 67 | ]; 68 | return list_useragent[Math.floor(Math.random() * list_useragent.length)]; 69 | } 70 | 71 | static serializeBigInt = (obj) => { 72 | return JSON.parse( 73 | JSON.stringify(obj, (key, value) => 74 | typeof value === "bigint" ? value.toString() : value 75 | ) 76 | ); 77 | }; 78 | 79 | static isMnemonic(input) { 80 | return bip39.validateMnemonic(input); 81 | } 82 | 83 | static isPrivateKey(input) { 84 | const regex = /^[a-fA-F0-9]{64}$/; 85 | return regex.test(input); 86 | } 87 | 88 | static determineType(input) { 89 | if (this.isMnemonic(input)) { 90 | return "Secret Phrase"; 91 | } else if (this.isPrivateKey(input)) { 92 | return "Private Key"; 93 | } else { 94 | return "Unknown"; 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/core/rivalz.js: -------------------------------------------------------------------------------- 1 | import { ethers } from "ethers"; 2 | import { Helper } from "../utils/helper.js"; 3 | import logger from "../utils/logger.js"; 4 | import { account } from "../../account.js"; 5 | import { API } from "../api/api.js"; 6 | import { RPC } from "./rpc.js"; 7 | import { Config } from "../config/config.js"; 8 | import { Fragment } from "./fragment.js"; 9 | import { ContractTransactionResponse } from "ethers"; 10 | 11 | export class Rivalz extends API { 12 | constructor(acc) { 13 | super("https://be.rivalz.ai/api-v1"); 14 | 15 | this.acc = acc; 16 | this.provider = RPC.provider; 17 | this.attempt = 0; 18 | this.maxRetries = Config.maxErrorCount; 19 | this.ok = false; 20 | } 21 | 22 | async connectWallet() { 23 | try { 24 | const data = this.acc.replace(/^0x/, ""); 25 | await Helper.delay( 26 | 1000, 27 | this.acc, 28 | `Connecting to Account : ${account.indexOf(this.acc) + 1}`, 29 | this 30 | ); 31 | const type = Helper.determineType(data); 32 | logger.info(`Account Type : ${type}`); 33 | if (type == "Secret Phrase") { 34 | /** 35 | * @type {Wallet} 36 | */ 37 | this.wallet = new ethers.Wallet.fromPhrase(data, this.provider); 38 | } else if (type == "Private Key") { 39 | /** 40 | * @type {Wallet} 41 | */ 42 | this.wallet = new ethers.Wallet(data.trim(), this.provider); 43 | } else { 44 | throw Error("Invalid account Secret Phrase or Private Key"); 45 | } 46 | await Helper.delay( 47 | 1000, 48 | this.acc, 49 | `Wallet connected ${JSON.stringify(this.wallet.address)}`, 50 | this 51 | ); 52 | } catch (error) { 53 | throw error; 54 | } 55 | } 56 | 57 | async getBalance(update = false) { 58 | try { 59 | if (!update) { 60 | await Helper.delay( 61 | 500, 62 | this.acc, 63 | `Getting Wallet Balance of ${this.wallet.address}`, 64 | this 65 | ); 66 | } 67 | const ethBalance = ethers.formatEther( 68 | await this.provider.getBalance(this.wallet.address) 69 | ); 70 | 71 | this.balance = { 72 | ETH: ethBalance, 73 | }; 74 | if (!update) { 75 | await Helper.delay( 76 | 500, 77 | this.acc, 78 | `Sucessfully Get Wallet Balance of ${this.wallet.address}`, 79 | this 80 | ); 81 | } 82 | } catch (error) { 83 | throw error; 84 | } 85 | } 86 | 87 | async claimFragment(itr, total) { 88 | try { 89 | this.claimError = false; 90 | await Helper.delay( 91 | 500, 92 | this.acc, 93 | `Claiming Fragment ${itr} of ${total}...`, 94 | this 95 | ); 96 | const fragmentContract = new ethers.Contract( 97 | Fragment.FRAGMENTCONTRACTADDRESS, 98 | Fragment.FRAGMENTABI, 99 | this.wallet 100 | ); 101 | 102 | const res = await fragmentContract.claim(); 103 | await this.printTx(res); 104 | 105 | await Helper.delay(500, this.acc, `Sucessfully Claim Fragment`, this); 106 | } catch (error) { 107 | await Helper.delay( 108 | 5000, 109 | this.acc, 110 | `Error during claim fragment, posibly all fragment claimed or not enough fee`, 111 | this 112 | ); 113 | this.claimError = true; 114 | } 115 | } 116 | 117 | async executeTx(tx) { 118 | try { 119 | await Helper.delay(500, this.acc, `Building Tx...`, this); 120 | logger.info(`TX : ${JSON.stringify(Helper.serializeBigInt(tx))}`); 121 | const txRes = await this.wallet.sendTransaction(tx); 122 | await Helper.delay(500, this.acc, `Transaction Sended ...`, this); 123 | await Helper.delay( 124 | 500, 125 | this.acc, 126 | `Waiting Transaction Confirmation ...`, 127 | this 128 | ); 129 | const txRev = await txRes.wait(); 130 | logger.info(JSON.stringify(Helper.serializeBigInt(txRev))); 131 | await Helper.delay( 132 | 2000, 133 | this.acc, 134 | `Transaction Success \nhttps://rivalz2.explorer.caldera.xyz/tx/${txRev.hash}`, 135 | this 136 | ); 137 | await this.getBalance(true); 138 | } catch (error) { 139 | throw error; 140 | } 141 | } 142 | 143 | /** 144 | * @param {ContractTransactionResponse} tx 145 | */ 146 | async printTx(tx) { 147 | logger.info(`TX : ${JSON.stringify(Helper.serializeBigInt(tx))}`); 148 | if (tx.hash) { 149 | await Helper.delay(500, this.acc, `Transaction Sended ...`, this); 150 | await Helper.delay( 151 | 500, 152 | this.acc, 153 | `Waiting Transaction Confirmation ...`, 154 | this 155 | ); 156 | await Helper.delay( 157 | 2000, 158 | this.acc, 159 | `Transaction Success \nhttps://rivalz2.explorer.caldera.xyz/tx/${tx.hash}`, 160 | this 161 | ); 162 | } else { 163 | throw Error("Error executing TX"); 164 | } 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /src/core/fragment.js: -------------------------------------------------------------------------------- 1 | export class Fragment { 2 | static FRAGMENTCONTRACTADDRESS = "0xeBBa6Ffff611b7530b57Ed07569E9695B98e6c82"; 3 | static FRAGMENTABI = [ 4 | { 5 | type: "function", 6 | selector: "0xe985e9c5", 7 | sig: "isApprovedForAll(address,address)", 8 | name: "isApprovedForAll", 9 | constant: false, 10 | payable: false, 11 | inputs: [ 12 | { 13 | type: "address", 14 | name: "", 15 | }, 16 | { 17 | type: "address", 18 | name: "", 19 | }, 20 | ], 21 | }, 22 | { 23 | type: "function", 24 | selector: "0xeb91e651", 25 | sig: "removeBlacklist(address)", 26 | name: "removeBlacklist", 27 | constant: false, 28 | payable: false, 29 | inputs: [ 30 | { 31 | type: "address", 32 | name: "", 33 | }, 34 | ], 35 | }, 36 | { 37 | type: "function", 38 | selector: "0xf242432a", 39 | sig: "safeTransferFrom(address,address,uint256,uint256,bytes)", 40 | name: "safeTransferFrom", 41 | constant: false, 42 | payable: false, 43 | inputs: [ 44 | { 45 | type: "address", 46 | name: "", 47 | }, 48 | { 49 | type: "address", 50 | name: "", 51 | }, 52 | { 53 | type: "uint256", 54 | name: "", 55 | }, 56 | { 57 | type: "uint256", 58 | name: "", 59 | }, 60 | { 61 | type: "bytes", 62 | name: "", 63 | }, 64 | ], 65 | }, 66 | { 67 | type: "function", 68 | selector: "0xf5298aca", 69 | sig: "burn(address,uint256,uint256)", 70 | name: "burn", 71 | constant: false, 72 | payable: false, 73 | inputs: [ 74 | { 75 | type: "address", 76 | name: "", 77 | }, 78 | { 79 | type: "uint256", 80 | name: "", 81 | }, 82 | { 83 | type: "uint256", 84 | name: "", 85 | }, 86 | ], 87 | }, 88 | { 89 | type: "function", 90 | selector: "0xbd85b039", 91 | sig: "totalSupply(uint256)", 92 | name: "totalSupply", 93 | constant: false, 94 | payable: false, 95 | inputs: [ 96 | { 97 | type: "uint256", 98 | name: "", 99 | }, 100 | ], 101 | }, 102 | { 103 | type: "function", 104 | selector: "0xd5391393", 105 | sig: "MINTER_ROLE()", 106 | name: "MINTER_ROLE", 107 | constant: false, 108 | payable: false, 109 | inputs: [], 110 | }, 111 | { 112 | type: "function", 113 | selector: "0xd547741f", 114 | sig: "revokeRole(bytes32,address)", 115 | name: "revokeRole", 116 | constant: false, 117 | payable: false, 118 | inputs: [ 119 | { 120 | type: "bytes32", 121 | name: "", 122 | }, 123 | { 124 | type: "address", 125 | name: "", 126 | }, 127 | ], 128 | }, 129 | 130 | { 131 | type: "function", 132 | selector: "0xa217fddf", 133 | sig: "DEFAULT_ADMIN_ROLE()", 134 | name: "DEFAULT_ADMIN_ROLE", 135 | constant: false, 136 | payable: false, 137 | inputs: [], 138 | }, 139 | { 140 | type: "function", 141 | selector: "0xa22cb465", 142 | sig: "setApprovalForAll(address,bool)", 143 | name: "setApprovalForAll", 144 | constant: false, 145 | payable: false, 146 | inputs: [ 147 | { 148 | type: "address", 149 | name: "", 150 | }, 151 | { 152 | type: "bool", 153 | name: "", 154 | }, 155 | ], 156 | }, 157 | { 158 | type: "function", 159 | selector: "0x91d14854", 160 | sig: "hasRole(bytes32,address)", 161 | name: "hasRole", 162 | constant: false, 163 | payable: false, 164 | inputs: [ 165 | { 166 | type: "bytes32", 167 | name: "", 168 | }, 169 | { 170 | type: "address", 171 | name: "", 172 | }, 173 | ], 174 | }, 175 | 176 | { 177 | type: "function", 178 | selector: "0x9c324b27", 179 | sig: "removeTokenId(uint256)", 180 | name: "removeTokenId", 181 | constant: false, 182 | payable: false, 183 | inputs: [ 184 | { 185 | type: "uint256", 186 | name: "", 187 | }, 188 | ], 189 | }, 190 | { 191 | type: "function", 192 | selector: "0x9cd23707", 193 | sig: "setTransferable(bool)", 194 | name: "setTransferable", 195 | constant: false, 196 | payable: false, 197 | inputs: [ 198 | { 199 | type: "bool", 200 | name: "", 201 | }, 202 | ], 203 | }, 204 | { 205 | type: "function", 206 | selector: "0x9cfe42da", 207 | sig: "addBlacklist(address)", 208 | name: "addBlacklist", 209 | constant: false, 210 | payable: false, 211 | inputs: [ 212 | { 213 | type: "address", 214 | name: "", 215 | }, 216 | ], 217 | }, 218 | { 219 | type: "function", 220 | selector: "0x4f558e79", 221 | sig: "exists(uint256)", 222 | name: "exists", 223 | constant: false, 224 | payable: false, 225 | inputs: [ 226 | { 227 | type: "uint256", 228 | name: "", 229 | }, 230 | ], 231 | }, 232 | { 233 | type: "function", 234 | selector: "0x6b20c454", 235 | sig: "burnBatch(address,uint256[],uint256[])", 236 | name: "burnBatch", 237 | constant: false, 238 | payable: false, 239 | inputs: [ 240 | { 241 | type: "address", 242 | name: "", 243 | }, 244 | { 245 | type: "uint256[]", 246 | name: "", 247 | }, 248 | { 249 | type: "uint256[]", 250 | name: "", 251 | }, 252 | ], 253 | }, 254 | { 255 | type: "function", 256 | selector: "0x731133e9", 257 | sig: "mint(address,uint256,uint256,bytes)", 258 | name: "mint", 259 | constant: false, 260 | payable: false, 261 | inputs: [ 262 | { 263 | type: "address", 264 | name: "", 265 | }, 266 | { 267 | type: "uint256", 268 | name: "", 269 | }, 270 | { 271 | type: "uint256", 272 | name: "", 273 | }, 274 | { 275 | type: "bytes", 276 | name: "", 277 | }, 278 | ], 279 | }, 280 | { 281 | type: "function", 282 | selector: "0x89885049", 283 | sig: "claimableAmount(address)", 284 | name: "claimableAmount", 285 | constant: false, 286 | payable: false, 287 | inputs: [ 288 | { 289 | type: "address", 290 | name: "", 291 | }, 292 | ], 293 | }, 294 | { 295 | type: "function", 296 | selector: "0x2f2ff15d", 297 | sig: "grantRole(bytes32,address)", 298 | name: "grantRole", 299 | constant: false, 300 | payable: false, 301 | inputs: [ 302 | { 303 | type: "bytes32", 304 | name: "", 305 | }, 306 | { 307 | type: "address", 308 | name: "", 309 | }, 310 | ], 311 | }, 312 | { 313 | type: "function", 314 | selector: "0x36568abe", 315 | sig: "renounceRole(bytes32,address)", 316 | name: "renounceRole", 317 | constant: false, 318 | payable: false, 319 | inputs: [ 320 | { 321 | type: "bytes32", 322 | name: "", 323 | }, 324 | { 325 | type: "address", 326 | name: "", 327 | }, 328 | ], 329 | }, 330 | { 331 | type: "function", 332 | selector: "0x482f64b9", 333 | sig: "getTokenIdLength()", 334 | name: "getTokenIdLength", 335 | constant: false, 336 | payable: false, 337 | inputs: [], 338 | }, 339 | { 340 | type: "function", 341 | selector: "0x4e1273f4", 342 | sig: "balanceOfBatch(address[],uint256[])", 343 | name: "balanceOfBatch", 344 | constant: false, 345 | payable: false, 346 | inputs: [ 347 | { 348 | type: "address[]", 349 | name: "", 350 | }, 351 | { 352 | type: "uint256[]", 353 | name: "", 354 | }, 355 | ], 356 | }, 357 | { 358 | type: "function", 359 | selector: "0x4e71d92d", 360 | sig: "claim()", 361 | name: "claim", 362 | constant: false, 363 | payable: false, 364 | inputs: [], 365 | }, 366 | { 367 | type: "function", 368 | selector: "0x14ff5ea3", 369 | sig: "getTokenId(uint256)", 370 | name: "getTokenId", 371 | constant: false, 372 | payable: false, 373 | inputs: [ 374 | { 375 | type: "uint256", 376 | name: "", 377 | }, 378 | ], 379 | }, 380 | { 381 | type: "function", 382 | selector: "0x18160ddd", 383 | sig: "totalSupply()", 384 | name: "totalSupply", 385 | constant: false, 386 | payable: false, 387 | inputs: [], 388 | }, 389 | { 390 | type: "function", 391 | selector: "0x1f7fdffa", 392 | sig: "mintBatch(address,uint256[],uint256[],bytes)", 393 | name: "mintBatch", 394 | constant: false, 395 | payable: false, 396 | inputs: [ 397 | { 398 | type: "address", 399 | name: "", 400 | }, 401 | { 402 | type: "uint256[]", 403 | name: "", 404 | }, 405 | { 406 | type: "uint256[]", 407 | name: "", 408 | }, 409 | { 410 | type: "bytes", 411 | name: "", 412 | }, 413 | ], 414 | }, 415 | { 416 | type: "function", 417 | selector: "0x248a9ca3", 418 | sig: "getRoleAdmin(bytes32)", 419 | name: "getRoleAdmin", 420 | constant: false, 421 | payable: false, 422 | inputs: [ 423 | { 424 | type: "bytes32", 425 | name: "", 426 | }, 427 | ], 428 | }, 429 | { 430 | type: "function", 431 | selector: "0x2eb2c2d6", 432 | sig: "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)", 433 | name: "safeBatchTransferFrom", 434 | constant: false, 435 | payable: false, 436 | inputs: [ 437 | { 438 | type: "address", 439 | name: "", 440 | }, 441 | { 442 | type: "address", 443 | name: "", 444 | }, 445 | { 446 | type: "uint256[]", 447 | name: "", 448 | }, 449 | { 450 | type: "uint256[]", 451 | name: "", 452 | }, 453 | { 454 | type: "bytes", 455 | name: "", 456 | }, 457 | ], 458 | }, 459 | { 460 | type: "function", 461 | selector: "0x00fdd58e", 462 | sig: "balanceOf(address,uint256)", 463 | name: "balanceOf", 464 | constant: false, 465 | payable: false, 466 | inputs: [ 467 | { 468 | type: "address", 469 | name: "", 470 | }, 471 | { 472 | type: "uint256", 473 | name: "", 474 | }, 475 | ], 476 | }, 477 | { 478 | type: "function", 479 | selector: "0x01ffc9a7", 480 | sig: "supportsInterface(bytes4)", 481 | name: "supportsInterface", 482 | constant: false, 483 | payable: false, 484 | inputs: [ 485 | { 486 | type: "bytes4", 487 | name: "", 488 | }, 489 | ], 490 | }, 491 | 492 | { 493 | type: "function", 494 | selector: "0x02fe5305", 495 | sig: "setURI(string)", 496 | name: "setURI", 497 | constant: false, 498 | payable: false, 499 | inputs: [ 500 | { 501 | type: "string", 502 | name: "", 503 | }, 504 | ], 505 | }, 506 | { 507 | type: "function", 508 | selector: "0x0e89341c", 509 | sig: "uri(uint256)", 510 | name: "uri", 511 | constant: false, 512 | payable: false, 513 | inputs: [ 514 | { 515 | type: "uint256", 516 | name: "", 517 | }, 518 | ], 519 | }, 520 | ]; 521 | } 522 | --------------------------------------------------------------------------------