├── requirements.txt ├── wallet └── private_key.txt ├── utils.py ├── main.py ├── config └── config.py ├── client.py ├── tasks └── zkbridge.py └── ABI ├── claim.json ├── bridge.json └── nft.json /requirements.txt: -------------------------------------------------------------------------------- 1 | web3==6.5.0 -------------------------------------------------------------------------------- /wallet/private_key.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | from typing import Union, Optional 3 | 4 | 5 | def read_json(path: str, encoding: Optional[str] = None) -> list | dict: 6 | return json.load(open(path, encoding=encoding)) -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from web3 import Web3 2 | from client import Client 3 | from config.config import private_keys, bnb_rpc, opbnb_rpc 4 | from tasks.zkbridge import ZkBridge 5 | 6 | 7 | clients = [] 8 | for num, key in enumerate(private_keys): 9 | clients.append( 10 | Client(private_key=key, bnb_rpc=bnb_rpc, opbnb_prc=opbnb_rpc)) 11 | task = ZkBridge(clients[num]) 12 | task.mint_nft() 13 | task.approve_nft() 14 | task.bridge_nft() 15 | #task.claim_nft() -------------------------------------------------------------------------------- /config/config.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | from pathlib import Path 4 | 5 | 6 | # Путь к директории 7 | if getattr(sys, 'frozen', False): 8 | ROOT_DIR = Path(sys.executable).parent.absolute() 9 | else: 10 | ROOT_DIR = Path(__file__).parent.parent.absolute() 11 | 12 | 13 | # ABI контрактов 14 | ABIS_DIR = os.path.join(ROOT_DIR, 'ABI') 15 | NFT_ABI = os.path.join(ABIS_DIR, 'nft.json') 16 | BRIDGE_ABI = os.path.join(ABIS_DIR, 'bridge.json') 17 | CLAIM_ABI = os.path.join(ABIS_DIR, 'claim.json') 18 | 19 | 20 | # Приватные ключи 21 | PRIVATE_KEYS_FILE = os.path.join(f'{ROOT_DIR}\wallet\private_key.txt') 22 | with open(PRIVATE_KEYS_FILE) as private_key: 23 | private_keys = [key.strip() for key in private_key.readlines()] 24 | 25 | 26 | # RPC ноды 27 | bnb_rpc = 'https://bsc-dataseed1.defibit.io' 28 | opbnb_rpc = 'https://opbnb-testnet-rpc.bnbchain.org' 29 | -------------------------------------------------------------------------------- /client.py: -------------------------------------------------------------------------------- 1 | from web3 import Web3 2 | from web3.middleware import geth_poa_middleware 3 | 4 | from utils import read_json 5 | from config.config import NFT_ABI, BRIDGE_ABI 6 | 7 | 8 | class Client: 9 | nft_abi = read_json(NFT_ABI) 10 | bridge_abi = read_json(BRIDGE_ABI) 11 | claim_abi = None 12 | 13 | def __init__(self, private_key, bnb_rpc, opbnb_prc): 14 | self.private_key = private_key 15 | self.bnb_rpc = bnb_rpc 16 | self.opbnb_rpc = opbnb_prc 17 | self.w3_bnb = Web3(Web3.HTTPProvider(endpoint_uri=self.bnb_rpc)) 18 | self.w3_opbnb = Web3(Web3.HTTPProvider(endpoint_uri=self.opbnb_rpc)) 19 | self.address = Web3.to_checksum_address( 20 | self.w3_bnb.eth.account.from_key(private_key=private_key).address 21 | ) 22 | self.onion = self.w3_bnb.middleware_onion.inject(geth_poa_middleware, layer=0) 23 | 24 | def get_balance(self, web3): 25 | balance = Web3.from_wei( 26 | web3.eth.get_balance(self.address), 'ether') 27 | return balance 28 | 29 | def get_bnb_balance(self): 30 | balance = self.get_balance(self.w3_bnb) 31 | return balance 32 | 33 | def get_opbnb_balance(self): 34 | balance = self.get_balance(self.w3_opbnb) 35 | return balance -------------------------------------------------------------------------------- /tasks/zkbridge.py: -------------------------------------------------------------------------------- 1 | from web3 import Web3 2 | from config.config import NFT_ABI, BRIDGE_ABI, CLAIM_ABI 3 | from utils import read_json 4 | from client import Client 5 | from hexbytes import HexBytes 6 | from easydict import EasyDict as AttributeDict 7 | 8 | class ZkBridge: 9 | mintnft_contract = Web3.to_checksum_address('0x9885C17Dd44c00C37B98F510cdff099EfF437dcE') 10 | bridge_contract = Web3.to_checksum_address('0xE09828f0DA805523878Be66EA2a70240d312001e') 11 | claimnft_contract = Web3.to_checksum_address('0x4cc870c8fdfbc512943fe60c29c98d515f868ebf') 12 | 13 | mintnft_abi = read_json(NFT_ABI) 14 | bridge_abi = read_json(BRIDGE_ABI) 15 | nftclaim = read_json(CLAIM_ABI) 16 | 17 | def __init__(self, client: Client): 18 | self.client = client 19 | self.w3_bnb = self.client.w3_bnb 20 | self.w3_opbnb = self.client.w3_opbnb 21 | self.transaction_receipt = None 22 | self.token_id = None 23 | 24 | def check_transaction_cost(self, transaction_method, *args, value=None): 25 | gas_price = self.w3_bnb.eth.gas_price 26 | check_param = { 27 | 'from': self.client.address, 28 | } 29 | if value is not None: 30 | check_param['value'] = value 31 | gas_estimate = transaction_method(*args).estimate_gas(check_param) 32 | total_cost = self.w3_bnb.from_wei( 33 | gas_price * gas_estimate, 'ether') 34 | return gas_price, gas_estimate, total_cost 35 | 36 | def _send_transaction(self, transaction_method, *args, value=None): 37 | gas_price, gas_estimate, total_cost = self.check_transaction_cost(transaction_method, *args, value=value) 38 | if self.client.get_bnb_balance() < total_cost: 39 | print(f'{self.client.address} | Не хватит bnb для выполнения транзакции') 40 | return None 41 | transaction_param = { 42 | 'from': self.client.address, 43 | 'nonce': self.w3_bnb.eth.get_transaction_count(self.client.address), 44 | 'gas': int(gas_estimate * 1.2), 45 | 'gasPrice': gas_price, 46 | } 47 | if value is not None: 48 | transaction_param['value'] = value 49 | transaction = transaction_method(*args).build_transaction(transaction_param) 50 | 51 | signed_txn = self.w3_bnb.eth.account.sign_transaction(transaction, private_key=self.client.private_key) 52 | transaction_hash = self.w3_bnb.eth.send_raw_transaction(signed_txn.rawTransaction) 53 | return self.w3_bnb.eth.wait_for_transaction_receipt(transaction_hash) 54 | 55 | def mint_nft(self): 56 | contract = self.w3_bnb.eth.contract( 57 | abi=ZkBridge.mintnft_abi, 58 | address=ZkBridge.mintnft_contract 59 | ) 60 | self.transaction_receipt = self._send_transaction(contract.functions.mint) 61 | 62 | if self.transaction_receipt and self.transaction_receipt.status == 1: 63 | print(f'{self.client.address} | Успешно сминтил нфт') 64 | else: 65 | print(f'{self.client.address} | Не удалось сминить нфт') 66 | 67 | def approve_nft(self): 68 | contract = self.w3_bnb.eth.contract( 69 | abi=ZkBridge.mintnft_abi, 70 | address=ZkBridge.mintnft_contract 71 | ) 72 | token_id_hex = self.transaction_receipt['logs'][0]['topics'][3].hex() 73 | self.token_id = int(token_id_hex, 16) 74 | self.transaction_receipt = self._send_transaction( 75 | contract.functions.approve, 76 | self.bridge_contract, 77 | self.token_id) 78 | 79 | if self.transaction_receipt and self.transaction_receipt.status == 1: 80 | print(f'{self.client.address} | Успешно выполнил апрув') 81 | else: 82 | print(f'{self.client.address} | Не удалось выполнить апрув') 83 | 84 | def bridge_nft(self): 85 | recipient_chain = 116 86 | client_address_bytes32 = "0x" + self.client.address[2:].zfill(64) 87 | 88 | contract = self.w3_bnb.eth.contract( 89 | abi=ZkBridge.bridge_abi, 90 | address=ZkBridge.bridge_contract 91 | ) 92 | 93 | value = Web3.to_wei(0.001, 'ether') 94 | 95 | self.transaction_receipt = self._send_transaction( 96 | contract.functions.transferNFT, 97 | self.mintnft_contract, 98 | self.token_id, 99 | recipient_chain, 100 | client_address_bytes32, 101 | value=value, 102 | ) 103 | 104 | print(self.transaction_receipt) 105 | if self.transaction_receipt and self.transaction_receipt.status == 1: 106 | print(f'{self.client.address} | Успешно отправил нфт через мост') 107 | else: 108 | print(f'{self.client.address} | Не удалось отправить нфт') 109 | 110 | def claim_nft(self): 111 | pass 112 | # contract = self.w3_opbnb.eth.contract( 113 | # address=ZkBridge.claimnft_contract, 114 | # abi=self.nftclaim, 115 | # ) 116 | 117 | # transaction_receipt = AttributeDict({'blockHash': HexBytes('0xff99b634c11541f35f7775c5dcc413d50f743cb92036c7bf71874d423ab93e65'), 'blockNumber': 29284947, 'contractAddress': None, 'cumulativeGasUsed': 13798309, 'effectiveGasPrice': 3000000000, 'from': '0x27DA5E1f74d16DBc2E0A113b134EdAB5e2BcbB7d', 'gasUsed': 103435, 'logs': [AttributeDict({'address': '0x9885C17Dd44c00C37B98F510cdff099EfF437dcE', 'topics': [HexBytes('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'), HexBytes('0x00000000000000000000000027da5e1f74d16dbc2e0a113b134edab5e2bcbb7d'), HexBytes('0x000000000000000000000000e09828f0da805523878be66ea2a70240d312001e'), HexBytes('0x0000000000000000000000000000000000000000000000000000000000031066')], 'data': HexBytes('0x'), 'blockNumber': 29284947, 'transactionHash': HexBytes('0xa6a0ef47cfa2d41e13420a59dbf8f62386a891cac6f0e7b2ac2ae80d609bd58d'), 'transactionIndex': 80, 'blockHash': HexBytes('0xff99b634c11541f35f7775c5dcc413d50f743cb92036c7bf71874d423ab93e65'), 'logIndex': 284, 'removed': False}), AttributeDict({'address': '0xe9AD444cF80E1d6Ba062A2Dd6f53b740b5F0aa14', 'topics': [HexBytes('0xb8abfd5c33667c7440a4fc1153ae39a24833dbe44f7eb19cbe5cd5f2583e4940'), HexBytes('0x000000000000000000000000e09828f0da805523878be66ea2a70240d312001e'), HexBytes('0x0000000000000000000000000000000000000000000000000000000000000074'), HexBytes('0x0000000000000000000000000000000000000000000000000000000000108a49')], 'data': HexBytes('0x000000000000000000000000ba09fdf988d4113460dbdd96fefd33c8400e4e0d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000f6010000000000000000000000009885c17dd44c00c37b98f510cdff099eff437dce0003424e4220436861696e204c7562616e2055706772616465000000000000000000424e4220436861696e204c7562616e205570677261646500000000000000000000000000000000000000000000000000000000000000000000000000000310665068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d526e73764647334d524351785438534e346366544765504357724d535656436a357879335774325476316e7600000000000000000000000027da5e1f74d16dbc2e0a113b134edab5e2bcbb7d007400000000000000000000'), 'blockNumber': 29284947, 'transactionHash': HexBytes('0xa6a0ef47cfa2d41e13420a59dbf8f62386a891cac6f0e7b2ac2ae80d609bd58d'), 'transactionIndex': 80, 'blockHash': HexBytes('0xff99b634c11541f35f7775c5dcc413d50f743cb92036c7bf71874d423ab93e65'), 'logIndex': 285, 'removed': False}), AttributeDict({'address': '0xE09828f0DA805523878Be66EA2a70240d312001e', 'topics': [HexBytes('0xe11d2ca26838f15acb41450029a785bb3d6f909b7f622ebf9c45524ded76f411'), HexBytes('0x0000000000000000000000000000000000000000000000000000000000108a49')], 'data': HexBytes('0x0000000000000000000000009885c17dd44c00c37b98f510cdff099eff437dce0000000000000000000000000000000000000000000000000000000000031066000000000000000000000000000000000000000000000000000000000000007400000000000000000000000027da5e1f74d16dbc2e0a113b134edab5e2bcbb7d00000000000000000000000027da5e1f74d16dbc2e0a113b134edab5e2bcbb7d'), 'blockNumber': 29284947, 'transactionHash': HexBytes('0xa6a0ef47cfa2d41e13420a59dbf8f62386a891cac6f0e7b2ac2ae80d609bd58d'), 'transactionIndex': 80, 'blockHash': HexBytes('0xff99b634c11541f35f7775c5dcc413d50f743cb92036c7bf71874d423ab93e65'), 'logIndex': 286, 'removed': False})], 'logsBloom': HexBytes('0x00000000000000400000000002000400000000400000000000000000000000000000000000000000000000000000000008000800010000000000200000000000000000000100000000010008080002000000000000000000001000000000000080000000000000000000000000000100000000000000000000000010000000000000000000000000000000001400080000000000000040000000100000000000000000000080000000000000000000000000000804000000000000000080000000000002100008000000000100000000000000000000000000000000000000040000000020000000000000000000000000000000000000000000000000000000'), 'status': 1, 'to': '0xE09828f0DA805523878Be66EA2a70240d312001e', 'transactionHash': HexBytes('0xa6a0ef47cfa2d41e13420a59dbf8f62386a891cac6f0e7b2ac2ae80d609bd58d'), 'transactionIndex': 80, 'type': 0}) 118 | 119 | # srcChainId = 56 120 | # transaction_hash = transaction_receipt['transactionHash'].hex() 121 | # transaction_index = transaction_receipt['transactionIndex'] -------------------------------------------------------------------------------- /ABI/claim.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous":false, 4 | "inputs":[ 5 | { 6 | "indexed":false, 7 | "internalType":"address", 8 | "name":"previousAdmin", 9 | "type":"address" 10 | }, 11 | { 12 | "indexed":false, 13 | "internalType":"address", 14 | "name":"newAdmin", 15 | "type":"address" 16 | } 17 | ], 18 | "name":"AdminChanged", 19 | "type":"event" 20 | }, 21 | { 22 | "anonymous":false, 23 | "inputs":[ 24 | { 25 | "indexed":true, 26 | "internalType":"address", 27 | "name":"beacon", 28 | "type":"address" 29 | } 30 | ], 31 | "name":"BeaconUpgraded", 32 | "type":"event" 33 | }, 34 | { 35 | "anonymous":false, 36 | "inputs":[ 37 | { 38 | "indexed":true, 39 | "internalType":"address", 40 | "name":"oldContract", 41 | "type":"address" 42 | }, 43 | { 44 | "indexed":true, 45 | "internalType":"address", 46 | "name":"newContract", 47 | "type":"address" 48 | } 49 | ], 50 | "name":"ContractUpgraded", 51 | "type":"event" 52 | }, 53 | { 54 | "anonymous":false, 55 | "inputs":[ 56 | { 57 | "indexed":true, 58 | "internalType":"address", 59 | "name":"sender", 60 | "type":"address" 61 | }, 62 | { 63 | "indexed":true, 64 | "internalType":"uint16", 65 | "name":"srcChainId", 66 | "type":"uint16" 67 | }, 68 | { 69 | "indexed":true, 70 | "internalType":"uint64", 71 | "name":"sequence", 72 | "type":"uint64" 73 | }, 74 | { 75 | "indexed":false, 76 | "internalType":"address", 77 | "name":"dstAddress", 78 | "type":"address" 79 | }, 80 | { 81 | "indexed":false, 82 | "internalType":"bytes", 83 | "name":"payload", 84 | "type":"bytes" 85 | } 86 | ], 87 | "name":"ExecutedMessage", 88 | "type":"event" 89 | }, 90 | { 91 | "anonymous":false, 92 | "inputs":[ 93 | { 94 | "indexed":true, 95 | "internalType":"address", 96 | "name":"sender", 97 | "type":"address" 98 | }, 99 | { 100 | "indexed":true, 101 | "internalType":"uint16", 102 | "name":"dstChainId", 103 | "type":"uint16" 104 | }, 105 | { 106 | "indexed":true, 107 | "internalType":"uint64", 108 | "name":"sequence", 109 | "type":"uint64" 110 | }, 111 | { 112 | "indexed":false, 113 | "internalType":"address", 114 | "name":"dstAddress", 115 | "type":"address" 116 | }, 117 | { 118 | "indexed":false, 119 | "internalType":"bytes", 120 | "name":"payload", 121 | "type":"bytes" 122 | } 123 | ], 124 | "name":"MessagePublished", 125 | "type":"event" 126 | }, 127 | { 128 | "anonymous":false, 129 | "inputs":[ 130 | { 131 | "indexed":true, 132 | "internalType":"address", 133 | "name":"pendingImplementation", 134 | "type":"address" 135 | }, 136 | { 137 | "indexed":true, 138 | "internalType":"address", 139 | "name":"newImplementation", 140 | "type":"address" 141 | } 142 | ], 143 | "name":"NewPendingImplementation", 144 | "type":"event" 145 | }, 146 | { 147 | "anonymous":false, 148 | "inputs":[ 149 | { 150 | "indexed":true, 151 | "internalType":"address", 152 | "name":"implementation", 153 | "type":"address" 154 | } 155 | ], 156 | "name":"Upgraded", 157 | "type":"event" 158 | }, 159 | { 160 | "stateMutability":"payable", 161 | "type":"fallback" 162 | }, 163 | { 164 | "inputs":[ 165 | 166 | ], 167 | "name":"MESSAGE_TOPIC", 168 | "outputs":[ 169 | { 170 | "internalType":"bytes32", 171 | "name":"", 172 | "type":"bytes32" 173 | } 174 | ], 175 | "stateMutability":"view", 176 | "type":"function" 177 | }, 178 | { 179 | "inputs":[ 180 | 181 | ], 182 | "name":"MIN_LOCK_TIME", 183 | "outputs":[ 184 | { 185 | "internalType":"uint256", 186 | "name":"", 187 | "type":"uint256" 188 | } 189 | ], 190 | "stateMutability":"view", 191 | "type":"function" 192 | }, 193 | { 194 | "inputs":[ 195 | { 196 | "internalType":"uint16", 197 | "name":"chainId", 198 | "type":"uint16" 199 | } 200 | ], 201 | "name":"blockUpdater", 202 | "outputs":[ 203 | { 204 | "internalType":"contract IBlockUpdater", 205 | "name":"", 206 | "type":"address" 207 | } 208 | ], 209 | "stateMutability":"view", 210 | "type":"function" 211 | }, 212 | { 213 | "inputs":[ 214 | 215 | ], 216 | "name":"chainId", 217 | "outputs":[ 218 | { 219 | "internalType":"uint16", 220 | "name":"", 221 | "type":"uint16" 222 | } 223 | ], 224 | "stateMutability":"view", 225 | "type":"function" 226 | }, 227 | { 228 | "inputs":[ 229 | 230 | ], 231 | "name":"claimFees", 232 | "outputs":[ 233 | 234 | ], 235 | "stateMutability":"nonpayable", 236 | "type":"function" 237 | }, 238 | { 239 | "inputs":[ 240 | 241 | ], 242 | "name":"confirmContractUpgrade", 243 | "outputs":[ 244 | 245 | ], 246 | "stateMutability":"nonpayable", 247 | "type":"function" 248 | }, 249 | { 250 | "inputs":[ 251 | 252 | ], 253 | "name":"initialize", 254 | "outputs":[ 255 | 256 | ], 257 | "stateMutability":"nonpayable", 258 | "type":"function" 259 | }, 260 | { 261 | "inputs":[ 262 | { 263 | "internalType":"address", 264 | "name":"impl", 265 | "type":"address" 266 | } 267 | ], 268 | "name":"isInitialized", 269 | "outputs":[ 270 | { 271 | "internalType":"bool", 272 | "name":"", 273 | "type":"bool" 274 | } 275 | ], 276 | "stateMutability":"view", 277 | "type":"function" 278 | }, 279 | { 280 | "inputs":[ 281 | { 282 | "internalType":"bytes32", 283 | "name":"hash", 284 | "type":"bytes32" 285 | } 286 | ], 287 | "name":"isTransferCompleted", 288 | "outputs":[ 289 | { 290 | "internalType":"bool", 291 | "name":"", 292 | "type":"bool" 293 | } 294 | ], 295 | "stateMutability":"view", 296 | "type":"function" 297 | }, 298 | { 299 | "inputs":[ 300 | 301 | ], 302 | "name":"lockTime", 303 | "outputs":[ 304 | { 305 | "internalType":"uint256", 306 | "name":"", 307 | "type":"uint256" 308 | } 309 | ], 310 | "stateMutability":"view", 311 | "type":"function" 312 | }, 313 | { 314 | "inputs":[ 315 | { 316 | "internalType":"uint16", 317 | "name":"chainId", 318 | "type":"uint16" 319 | } 320 | ], 321 | "name":"mptVerifier", 322 | "outputs":[ 323 | { 324 | "internalType":"contract IMptVerifier", 325 | "name":"", 326 | "type":"address" 327 | } 328 | ], 329 | "stateMutability":"view", 330 | "type":"function" 331 | }, 332 | { 333 | "inputs":[ 334 | { 335 | "internalType":"bytes32", 336 | "name":"hash", 337 | "type":"bytes32" 338 | } 339 | ], 340 | "name":"nextSequence", 341 | "outputs":[ 342 | { 343 | "internalType":"uint64", 344 | "name":"", 345 | "type":"uint64" 346 | } 347 | ], 348 | "stateMutability":"view", 349 | "type":"function" 350 | }, 351 | { 352 | "inputs":[ 353 | 354 | ], 355 | "name":"owner", 356 | "outputs":[ 357 | { 358 | "internalType":"address", 359 | "name":"", 360 | "type":"address" 361 | } 362 | ], 363 | "stateMutability":"view", 364 | "type":"function" 365 | }, 366 | { 367 | "inputs":[ 368 | 369 | ], 370 | "name":"pendingImplementation", 371 | "outputs":[ 372 | { 373 | "internalType":"address", 374 | "name":"", 375 | "type":"address" 376 | } 377 | ], 378 | "stateMutability":"view", 379 | "type":"function" 380 | }, 381 | { 382 | "inputs":[ 383 | { 384 | "internalType":"uint16", 385 | "name":"chainId", 386 | "type":"uint16" 387 | }, 388 | { 389 | "internalType":"bytes32", 390 | "name":"bridgeContract", 391 | "type":"bytes32" 392 | } 393 | ], 394 | "name":"registerChain", 395 | "outputs":[ 396 | 397 | ], 398 | "stateMutability":"nonpayable", 399 | "type":"function" 400 | }, 401 | { 402 | "inputs":[ 403 | { 404 | "internalType":"uint16", 405 | "name":"dstChainId", 406 | "type":"uint16" 407 | }, 408 | { 409 | "internalType":"address", 410 | "name":"dstAddress", 411 | "type":"address" 412 | }, 413 | { 414 | "internalType":"bytes", 415 | "name":"payload", 416 | "type":"bytes" 417 | } 418 | ], 419 | "name":"send", 420 | "outputs":[ 421 | { 422 | "internalType":"uint64", 423 | "name":"sequence", 424 | "type":"uint64" 425 | } 426 | ], 427 | "stateMutability":"payable", 428 | "type":"function" 429 | }, 430 | { 431 | "inputs":[ 432 | { 433 | "internalType":"uint16", 434 | "name":"chainId", 435 | "type":"uint16" 436 | }, 437 | { 438 | "internalType":"address", 439 | "name":"blockUpdater", 440 | "type":"address" 441 | } 442 | ], 443 | "name":"setBlockUpdater", 444 | "outputs":[ 445 | 446 | ], 447 | "stateMutability":"nonpayable", 448 | "type":"function" 449 | }, 450 | { 451 | "inputs":[ 452 | { 453 | "internalType":"uint256", 454 | "name":"lockTime", 455 | "type":"uint256" 456 | } 457 | ], 458 | "name":"setLockTime", 459 | "outputs":[ 460 | 461 | ], 462 | "stateMutability":"nonpayable", 463 | "type":"function" 464 | }, 465 | { 466 | "inputs":[ 467 | { 468 | "internalType":"uint16", 469 | "name":"chainId", 470 | "type":"uint16" 471 | }, 472 | { 473 | "internalType":"address", 474 | "name":"mptVerifier", 475 | "type":"address" 476 | } 477 | ], 478 | "name":"setMptVerifier", 479 | "outputs":[ 480 | 481 | ], 482 | "stateMutability":"nonpayable", 483 | "type":"function" 484 | }, 485 | { 486 | "inputs":[ 487 | { 488 | "internalType":"address", 489 | "name":"newImplementation", 490 | "type":"address" 491 | } 492 | ], 493 | "name":"submitContractUpgrade", 494 | "outputs":[ 495 | 496 | ], 497 | "stateMutability":"nonpayable", 498 | "type":"function" 499 | }, 500 | { 501 | "inputs":[ 502 | 503 | ], 504 | "name":"toUpdateTime", 505 | "outputs":[ 506 | { 507 | "internalType":"uint256", 508 | "name":"", 509 | "type":"uint256" 510 | } 511 | ], 512 | "stateMutability":"view", 513 | "type":"function" 514 | }, 515 | { 516 | "inputs":[ 517 | { 518 | "internalType":"uint16", 519 | "name":"srcChainId", 520 | "type":"uint16" 521 | }, 522 | { 523 | "internalType":"bytes32", 524 | "name":"srcBlockHash", 525 | "type":"bytes32" 526 | }, 527 | { 528 | "internalType":"uint256", 529 | "name":"logIndex", 530 | "type":"uint256" 531 | }, 532 | { 533 | "internalType":"bytes", 534 | "name":"mptProof", 535 | "type":"bytes" 536 | } 537 | ], 538 | "name":"validateTransactionProof", 539 | "outputs":[ 540 | 541 | ], 542 | "stateMutability":"nonpayable", 543 | "type":"function" 544 | }, 545 | { 546 | "inputs":[ 547 | { 548 | "internalType":"uint16", 549 | "name":"chainId", 550 | "type":"uint16" 551 | } 552 | ], 553 | "name":"zkBridgeContracts", 554 | "outputs":[ 555 | { 556 | "internalType":"bytes32", 557 | "name":"", 558 | "type":"bytes32" 559 | } 560 | ], 561 | "stateMutability":"view", 562 | "type":"function" 563 | }, 564 | { 565 | "stateMutability":"payable", 566 | "type":"receive" 567 | } 568 | ] -------------------------------------------------------------------------------- /ABI/bridge.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous":false, 4 | "inputs":[ 5 | { 6 | "indexed":false, 7 | "internalType":"address", 8 | "name":"previousAdmin", 9 | "type":"address" 10 | }, 11 | { 12 | "indexed":false, 13 | "internalType":"address", 14 | "name":"newAdmin", 15 | "type":"address" 16 | } 17 | ], 18 | "name":"AdminChanged", 19 | "type":"event" 20 | }, 21 | { 22 | "anonymous":false, 23 | "inputs":[ 24 | { 25 | "indexed":true, 26 | "internalType":"address", 27 | "name":"beacon", 28 | "type":"address" 29 | } 30 | ], 31 | "name":"BeaconUpgraded", 32 | "type":"event" 33 | }, 34 | { 35 | "anonymous":false, 36 | "inputs":[ 37 | { 38 | "indexed":true, 39 | "internalType":"address", 40 | "name":"oldContract", 41 | "type":"address" 42 | }, 43 | { 44 | "indexed":true, 45 | "internalType":"address", 46 | "name":"newContract", 47 | "type":"address" 48 | } 49 | ], 50 | "name":"ContractUpgraded", 51 | "type":"event" 52 | }, 53 | { 54 | "anonymous":false, 55 | "inputs":[ 56 | { 57 | "indexed":true, 58 | "internalType":"address", 59 | "name":"pendingImplementation", 60 | "type":"address" 61 | }, 62 | { 63 | "indexed":true, 64 | "internalType":"address", 65 | "name":"newImplementation", 66 | "type":"address" 67 | } 68 | ], 69 | "name":"NewPendingImplementation", 70 | "type":"event" 71 | }, 72 | { 73 | "anonymous":false, 74 | "inputs":[ 75 | { 76 | "indexed":true, 77 | "internalType":"uint64", 78 | "name":"sequence", 79 | "type":"uint64" 80 | }, 81 | { 82 | "indexed":false, 83 | "internalType":"address", 84 | "name":"sourceToken", 85 | "type":"address" 86 | }, 87 | { 88 | "indexed":false, 89 | "internalType":"address", 90 | "name":"token", 91 | "type":"address" 92 | }, 93 | { 94 | "indexed":false, 95 | "internalType":"uint256", 96 | "name":"tokenID", 97 | "type":"uint256" 98 | }, 99 | { 100 | "indexed":false, 101 | "internalType":"uint16", 102 | "name":"sourceChain", 103 | "type":"uint16" 104 | }, 105 | { 106 | "indexed":false, 107 | "internalType":"uint16", 108 | "name":"sendChain", 109 | "type":"uint16" 110 | }, 111 | { 112 | "indexed":false, 113 | "internalType":"address", 114 | "name":"recipient", 115 | "type":"address" 116 | } 117 | ], 118 | "name":"ReceiveNFT", 119 | "type":"event" 120 | }, 121 | { 122 | "anonymous":false, 123 | "inputs":[ 124 | { 125 | "indexed":false, 126 | "internalType":"uint16", 127 | "name":"chainId", 128 | "type":"uint16" 129 | }, 130 | { 131 | "indexed":false, 132 | "internalType":"address", 133 | "name":"nftBridge", 134 | "type":"address" 135 | } 136 | ], 137 | "name":"RegisterChain", 138 | "type":"event" 139 | }, 140 | { 141 | "anonymous":false, 142 | "inputs":[ 143 | { 144 | "indexed":true, 145 | "internalType":"uint64", 146 | "name":"sequence", 147 | "type":"uint64" 148 | }, 149 | { 150 | "indexed":false, 151 | "internalType":"address", 152 | "name":"token", 153 | "type":"address" 154 | }, 155 | { 156 | "indexed":false, 157 | "internalType":"uint256", 158 | "name":"tokenID", 159 | "type":"uint256" 160 | }, 161 | { 162 | "indexed":false, 163 | "internalType":"uint16", 164 | "name":"recipientChain", 165 | "type":"uint16" 166 | }, 167 | { 168 | "indexed":false, 169 | "internalType":"address", 170 | "name":"sender", 171 | "type":"address" 172 | }, 173 | { 174 | "indexed":false, 175 | "internalType":"address", 176 | "name":"recipient", 177 | "type":"address" 178 | } 179 | ], 180 | "name":"TransferNFT", 181 | "type":"event" 182 | }, 183 | { 184 | "anonymous":false, 185 | "inputs":[ 186 | { 187 | "indexed":true, 188 | "internalType":"address", 189 | "name":"implementation", 190 | "type":"address" 191 | } 192 | ], 193 | "name":"Upgraded", 194 | "type":"event" 195 | }, 196 | { 197 | "inputs":[ 198 | 199 | ], 200 | "name":"MIN_LOCK_TIME", 201 | "outputs":[ 202 | { 203 | "internalType":"uint256", 204 | "name":"", 205 | "type":"uint256" 206 | } 207 | ], 208 | "stateMutability":"view", 209 | "type":"function" 210 | }, 211 | { 212 | "inputs":[ 213 | { 214 | "internalType":"uint16", 215 | "name":"chainId_", 216 | "type":"uint16" 217 | } 218 | ], 219 | "name":"bridgeContracts", 220 | "outputs":[ 221 | { 222 | "internalType":"address", 223 | "name":"", 224 | "type":"address" 225 | } 226 | ], 227 | "stateMutability":"view", 228 | "type":"function" 229 | }, 230 | { 231 | "inputs":[ 232 | 233 | ], 234 | "name":"chainId", 235 | "outputs":[ 236 | { 237 | "internalType":"uint16", 238 | "name":"", 239 | "type":"uint16" 240 | } 241 | ], 242 | "stateMutability":"view", 243 | "type":"function" 244 | }, 245 | { 246 | "inputs":[ 247 | 248 | ], 249 | "name":"confirmContractUpgrade", 250 | "outputs":[ 251 | 252 | ], 253 | "stateMutability":"nonpayable", 254 | "type":"function" 255 | }, 256 | { 257 | "inputs":[ 258 | { 259 | "internalType":"uint16", 260 | "name":"destChainId", 261 | "type":"uint16" 262 | } 263 | ], 264 | "name":"fee", 265 | "outputs":[ 266 | { 267 | "internalType":"uint256", 268 | "name":"", 269 | "type":"uint256" 270 | } 271 | ], 272 | "stateMutability":"view", 273 | "type":"function" 274 | }, 275 | { 276 | "inputs":[ 277 | 278 | ], 279 | "name":"implementation", 280 | "outputs":[ 281 | { 282 | "internalType":"address", 283 | "name":"", 284 | "type":"address" 285 | } 286 | ], 287 | "stateMutability":"view", 288 | "type":"function" 289 | }, 290 | { 291 | "inputs":[ 292 | 293 | ], 294 | "name":"initialize", 295 | "outputs":[ 296 | 297 | ], 298 | "stateMutability":"nonpayable", 299 | "type":"function" 300 | }, 301 | { 302 | "inputs":[ 303 | { 304 | "internalType":"address", 305 | "name":"impl", 306 | "type":"address" 307 | } 308 | ], 309 | "name":"isInitialized", 310 | "outputs":[ 311 | { 312 | "internalType":"bool", 313 | "name":"", 314 | "type":"bool" 315 | } 316 | ], 317 | "stateMutability":"view", 318 | "type":"function" 319 | }, 320 | { 321 | "inputs":[ 322 | { 323 | "internalType":"address", 324 | "name":"token", 325 | "type":"address" 326 | } 327 | ], 328 | "name":"isWrappedAsset", 329 | "outputs":[ 330 | { 331 | "internalType":"bool", 332 | "name":"", 333 | "type":"bool" 334 | } 335 | ], 336 | "stateMutability":"view", 337 | "type":"function" 338 | }, 339 | { 340 | "inputs":[ 341 | 342 | ], 343 | "name":"lockTime", 344 | "outputs":[ 345 | { 346 | "internalType":"uint256", 347 | "name":"", 348 | "type":"uint256" 349 | } 350 | ], 351 | "stateMutability":"view", 352 | "type":"function" 353 | }, 354 | { 355 | "inputs":[ 356 | { 357 | "internalType":"address", 358 | "name":"operator", 359 | "type":"address" 360 | }, 361 | { 362 | "internalType":"address", 363 | "name":"", 364 | "type":"address" 365 | }, 366 | { 367 | "internalType":"uint256", 368 | "name":"", 369 | "type":"uint256" 370 | }, 371 | { 372 | "internalType":"bytes", 373 | "name":"", 374 | "type":"bytes" 375 | } 376 | ], 377 | "name":"onERC721Received", 378 | "outputs":[ 379 | { 380 | "internalType":"bytes4", 381 | "name":"", 382 | "type":"bytes4" 383 | } 384 | ], 385 | "stateMutability":"view", 386 | "type":"function" 387 | }, 388 | { 389 | "inputs":[ 390 | 391 | ], 392 | "name":"owner", 393 | "outputs":[ 394 | { 395 | "internalType":"address", 396 | "name":"", 397 | "type":"address" 398 | } 399 | ], 400 | "stateMutability":"view", 401 | "type":"function" 402 | }, 403 | { 404 | "inputs":[ 405 | 406 | ], 407 | "name":"pendingImplementation", 408 | "outputs":[ 409 | { 410 | "internalType":"address", 411 | "name":"", 412 | "type":"address" 413 | } 414 | ], 415 | "stateMutability":"view", 416 | "type":"function" 417 | }, 418 | { 419 | "inputs":[ 420 | { 421 | "internalType":"uint16", 422 | "name":"chainId", 423 | "type":"uint16" 424 | }, 425 | { 426 | "internalType":"address", 427 | "name":"contractAddress", 428 | "type":"address" 429 | } 430 | ], 431 | "name":"registerChain", 432 | "outputs":[ 433 | 434 | ], 435 | "stateMutability":"nonpayable", 436 | "type":"function" 437 | }, 438 | { 439 | "inputs":[ 440 | { 441 | "internalType":"uint16", 442 | "name":"destChainId", 443 | "type":"uint16" 444 | }, 445 | { 446 | "internalType":"uint256", 447 | "name":"fee", 448 | "type":"uint256" 449 | } 450 | ], 451 | "name":"setFee", 452 | "outputs":[ 453 | 454 | ], 455 | "stateMutability":"nonpayable", 456 | "type":"function" 457 | }, 458 | { 459 | "inputs":[ 460 | { 461 | "internalType":"uint256", 462 | "name":"lockTime", 463 | "type":"uint256" 464 | } 465 | ], 466 | "name":"setLockTime", 467 | "outputs":[ 468 | 469 | ], 470 | "stateMutability":"nonpayable", 471 | "type":"function" 472 | }, 473 | { 474 | "inputs":[ 475 | { 476 | "internalType":"address", 477 | "name":"zkBridge", 478 | "type":"address" 479 | } 480 | ], 481 | "name":"setZkBridge", 482 | "outputs":[ 483 | 484 | ], 485 | "stateMutability":"nonpayable", 486 | "type":"function" 487 | }, 488 | { 489 | "inputs":[ 490 | { 491 | "internalType":"address", 492 | "name":"newImplementation", 493 | "type":"address" 494 | } 495 | ], 496 | "name":"submitContractUpgrade", 497 | "outputs":[ 498 | 499 | ], 500 | "stateMutability":"nonpayable", 501 | "type":"function" 502 | }, 503 | { 504 | "inputs":[ 505 | 506 | ], 507 | "name":"toUpdateTime", 508 | "outputs":[ 509 | { 510 | "internalType":"uint256", 511 | "name":"", 512 | "type":"uint256" 513 | } 514 | ], 515 | "stateMutability":"view", 516 | "type":"function" 517 | }, 518 | { 519 | "inputs":[ 520 | 521 | ], 522 | "name":"tokenImplementation", 523 | "outputs":[ 524 | { 525 | "internalType":"address", 526 | "name":"", 527 | "type":"address" 528 | } 529 | ], 530 | "stateMutability":"view", 531 | "type":"function" 532 | }, 533 | { 534 | "inputs":[ 535 | { 536 | "internalType":"address", 537 | "name":"token", 538 | "type":"address" 539 | }, 540 | { 541 | "internalType":"uint256", 542 | "name":"tokenID", 543 | "type":"uint256" 544 | }, 545 | { 546 | "internalType":"uint16", 547 | "name":"recipientChain", 548 | "type":"uint16" 549 | }, 550 | { 551 | "internalType":"bytes32", 552 | "name":"recipient", 553 | "type":"bytes32" 554 | } 555 | ], 556 | "name":"transferNFT", 557 | "outputs":[ 558 | { 559 | "internalType":"uint64", 560 | "name":"sequence", 561 | "type":"uint64" 562 | } 563 | ], 564 | "stateMutability":"payable", 565 | "type":"function" 566 | }, 567 | { 568 | "inputs":[ 569 | { 570 | "internalType":"uint16", 571 | "name":"tokenChainId", 572 | "type":"uint16" 573 | }, 574 | { 575 | "internalType":"bytes32", 576 | "name":"tokenAddress", 577 | "type":"bytes32" 578 | } 579 | ], 580 | "name":"wrappedAsset", 581 | "outputs":[ 582 | { 583 | "internalType":"address", 584 | "name":"", 585 | "type":"address" 586 | } 587 | ], 588 | "stateMutability":"view", 589 | "type":"function" 590 | }, 591 | { 592 | "inputs":[ 593 | 594 | ], 595 | "name":"zkBridge", 596 | "outputs":[ 597 | { 598 | "internalType":"contract IZKBridge", 599 | "name":"", 600 | "type":"address" 601 | } 602 | ], 603 | "stateMutability":"view", 604 | "type":"function" 605 | }, 606 | { 607 | "inputs":[ 608 | { 609 | "internalType":"uint16", 610 | "name":"srcChainId", 611 | "type":"uint16" 612 | }, 613 | { 614 | "internalType":"address", 615 | "name":"srcAddress", 616 | "type":"address" 617 | }, 618 | { 619 | "internalType":"uint64", 620 | "name":"sequence", 621 | "type":"uint64" 622 | }, 623 | { 624 | "internalType":"bytes", 625 | "name":"payload", 626 | "type":"bytes" 627 | } 628 | ], 629 | "name":"zkReceive", 630 | "outputs":[ 631 | 632 | ], 633 | "stateMutability":"nonpayable", 634 | "type":"function" 635 | } 636 | ] -------------------------------------------------------------------------------- /ABI/nft.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs":[ 4 | { 5 | "internalType":"uint256", 6 | "name":"_mintStartTime", 7 | "type":"uint256" 8 | }, 9 | { 10 | "internalType":"uint256", 11 | "name":"_mintEndTime", 12 | "type":"uint256" 13 | }, 14 | { 15 | "internalType":"uint256", 16 | "name":"_mintLimit", 17 | "type":"uint256" 18 | }, 19 | { 20 | "internalType":"string", 21 | "name":"_metadataUri", 22 | "type":"string" 23 | } 24 | ], 25 | "stateMutability":"nonpayable", 26 | "type":"constructor" 27 | }, 28 | { 29 | "inputs":[ 30 | 31 | ], 32 | "name":"ApprovalCallerNotOwnerNorApproved", 33 | "type":"error" 34 | }, 35 | { 36 | "inputs":[ 37 | 38 | ], 39 | "name":"ApprovalQueryForNonexistentToken", 40 | "type":"error" 41 | }, 42 | { 43 | "inputs":[ 44 | 45 | ], 46 | "name":"BalanceQueryForZeroAddress", 47 | "type":"error" 48 | }, 49 | { 50 | "inputs":[ 51 | 52 | ], 53 | "name":"InvalidQueryRange", 54 | "type":"error" 55 | }, 56 | { 57 | "inputs":[ 58 | 59 | ], 60 | "name":"MintERC2309QuantityExceedsLimit", 61 | "type":"error" 62 | }, 63 | { 64 | "inputs":[ 65 | 66 | ], 67 | "name":"MintToZeroAddress", 68 | "type":"error" 69 | }, 70 | { 71 | "inputs":[ 72 | 73 | ], 74 | "name":"MintZeroQuantity", 75 | "type":"error" 76 | }, 77 | { 78 | "inputs":[ 79 | 80 | ], 81 | "name":"OwnerQueryForNonexistentToken", 82 | "type":"error" 83 | }, 84 | { 85 | "inputs":[ 86 | 87 | ], 88 | "name":"OwnershipNotInitializedForExtraData", 89 | "type":"error" 90 | }, 91 | { 92 | "inputs":[ 93 | 94 | ], 95 | "name":"TransferCallerNotOwnerNorApproved", 96 | "type":"error" 97 | }, 98 | { 99 | "inputs":[ 100 | 101 | ], 102 | "name":"TransferFromIncorrectOwner", 103 | "type":"error" 104 | }, 105 | { 106 | "inputs":[ 107 | 108 | ], 109 | "name":"TransferToNonERC721ReceiverImplementer", 110 | "type":"error" 111 | }, 112 | { 113 | "inputs":[ 114 | 115 | ], 116 | "name":"TransferToZeroAddress", 117 | "type":"error" 118 | }, 119 | { 120 | "inputs":[ 121 | 122 | ], 123 | "name":"URIQueryForNonexistentToken", 124 | "type":"error" 125 | }, 126 | { 127 | "anonymous":false, 128 | "inputs":[ 129 | { 130 | "indexed":true, 131 | "internalType":"address", 132 | "name":"owner", 133 | "type":"address" 134 | }, 135 | { 136 | "indexed":true, 137 | "internalType":"address", 138 | "name":"approved", 139 | "type":"address" 140 | }, 141 | { 142 | "indexed":true, 143 | "internalType":"uint256", 144 | "name":"tokenId", 145 | "type":"uint256" 146 | } 147 | ], 148 | "name":"Approval", 149 | "type":"event" 150 | }, 151 | { 152 | "anonymous":false, 153 | "inputs":[ 154 | { 155 | "indexed":true, 156 | "internalType":"address", 157 | "name":"owner", 158 | "type":"address" 159 | }, 160 | { 161 | "indexed":true, 162 | "internalType":"address", 163 | "name":"operator", 164 | "type":"address" 165 | }, 166 | { 167 | "indexed":false, 168 | "internalType":"bool", 169 | "name":"approved", 170 | "type":"bool" 171 | } 172 | ], 173 | "name":"ApprovalForAll", 174 | "type":"event" 175 | }, 176 | { 177 | "anonymous":false, 178 | "inputs":[ 179 | { 180 | "indexed":true, 181 | "internalType":"uint256", 182 | "name":"fromTokenId", 183 | "type":"uint256" 184 | }, 185 | { 186 | "indexed":false, 187 | "internalType":"uint256", 188 | "name":"toTokenId", 189 | "type":"uint256" 190 | }, 191 | { 192 | "indexed":true, 193 | "internalType":"address", 194 | "name":"from", 195 | "type":"address" 196 | }, 197 | { 198 | "indexed":true, 199 | "internalType":"address", 200 | "name":"to", 201 | "type":"address" 202 | } 203 | ], 204 | "name":"ConsecutiveTransfer", 205 | "type":"event" 206 | }, 207 | { 208 | "anonymous":false, 209 | "inputs":[ 210 | { 211 | "indexed":true, 212 | "internalType":"address", 213 | "name":"previousOwner", 214 | "type":"address" 215 | }, 216 | { 217 | "indexed":true, 218 | "internalType":"address", 219 | "name":"newOwner", 220 | "type":"address" 221 | } 222 | ], 223 | "name":"OwnershipTransferred", 224 | "type":"event" 225 | }, 226 | { 227 | "anonymous":false, 228 | "inputs":[ 229 | { 230 | "indexed":true, 231 | "internalType":"address", 232 | "name":"from", 233 | "type":"address" 234 | }, 235 | { 236 | "indexed":true, 237 | "internalType":"address", 238 | "name":"to", 239 | "type":"address" 240 | }, 241 | { 242 | "indexed":true, 243 | "internalType":"uint256", 244 | "name":"tokenId", 245 | "type":"uint256" 246 | } 247 | ], 248 | "name":"Transfer", 249 | "type":"event" 250 | }, 251 | { 252 | "inputs":[ 253 | { 254 | "internalType":"address", 255 | "name":"to", 256 | "type":"address" 257 | }, 258 | { 259 | "internalType":"uint256", 260 | "name":"tokenId", 261 | "type":"uint256" 262 | } 263 | ], 264 | "name":"approve", 265 | "outputs":[ 266 | 267 | ], 268 | "stateMutability":"payable", 269 | "type":"function" 270 | }, 271 | { 272 | "inputs":[ 273 | { 274 | "internalType":"address", 275 | "name":"owner", 276 | "type":"address" 277 | } 278 | ], 279 | "name":"balanceOf", 280 | "outputs":[ 281 | { 282 | "internalType":"uint256", 283 | "name":"", 284 | "type":"uint256" 285 | } 286 | ], 287 | "stateMutability":"view", 288 | "type":"function" 289 | }, 290 | { 291 | "inputs":[ 292 | { 293 | "internalType":"uint256", 294 | "name":"tokenId", 295 | "type":"uint256" 296 | } 297 | ], 298 | "name":"explicitOwnershipOf", 299 | "outputs":[ 300 | { 301 | "components":[ 302 | { 303 | "internalType":"address", 304 | "name":"addr", 305 | "type":"address" 306 | }, 307 | { 308 | "internalType":"uint64", 309 | "name":"startTimestamp", 310 | "type":"uint64" 311 | }, 312 | { 313 | "internalType":"bool", 314 | "name":"burned", 315 | "type":"bool" 316 | }, 317 | { 318 | "internalType":"uint24", 319 | "name":"extraData", 320 | "type":"uint24" 321 | } 322 | ], 323 | "internalType":"struct IERC721A.TokenOwnership", 324 | "name":"", 325 | "type":"tuple" 326 | } 327 | ], 328 | "stateMutability":"view", 329 | "type":"function" 330 | }, 331 | { 332 | "inputs":[ 333 | { 334 | "internalType":"uint256[]", 335 | "name":"tokenIds", 336 | "type":"uint256[]" 337 | } 338 | ], 339 | "name":"explicitOwnershipsOf", 340 | "outputs":[ 341 | { 342 | "components":[ 343 | { 344 | "internalType":"address", 345 | "name":"addr", 346 | "type":"address" 347 | }, 348 | { 349 | "internalType":"uint64", 350 | "name":"startTimestamp", 351 | "type":"uint64" 352 | }, 353 | { 354 | "internalType":"bool", 355 | "name":"burned", 356 | "type":"bool" 357 | }, 358 | { 359 | "internalType":"uint24", 360 | "name":"extraData", 361 | "type":"uint24" 362 | } 363 | ], 364 | "internalType":"struct IERC721A.TokenOwnership[]", 365 | "name":"", 366 | "type":"tuple[]" 367 | } 368 | ], 369 | "stateMutability":"view", 370 | "type":"function" 371 | }, 372 | { 373 | "inputs":[ 374 | { 375 | "internalType":"uint256", 376 | "name":"tokenId", 377 | "type":"uint256" 378 | } 379 | ], 380 | "name":"getApproved", 381 | "outputs":[ 382 | { 383 | "internalType":"address", 384 | "name":"", 385 | "type":"address" 386 | } 387 | ], 388 | "stateMutability":"view", 389 | "type":"function" 390 | }, 391 | { 392 | "inputs":[ 393 | { 394 | "internalType":"address", 395 | "name":"userAddress", 396 | "type":"address" 397 | } 398 | ], 399 | "name":"getMintSurplus", 400 | "outputs":[ 401 | { 402 | "internalType":"uint256", 403 | "name":"", 404 | "type":"uint256" 405 | } 406 | ], 407 | "stateMutability":"view", 408 | "type":"function" 409 | }, 410 | { 411 | "inputs":[ 412 | { 413 | "internalType":"address", 414 | "name":"owner", 415 | "type":"address" 416 | }, 417 | { 418 | "internalType":"address", 419 | "name":"operator", 420 | "type":"address" 421 | } 422 | ], 423 | "name":"isApprovedForAll", 424 | "outputs":[ 425 | { 426 | "internalType":"bool", 427 | "name":"", 428 | "type":"bool" 429 | } 430 | ], 431 | "stateMutability":"view", 432 | "type":"function" 433 | }, 434 | { 435 | "inputs":[ 436 | 437 | ], 438 | "name":"mint", 439 | "outputs":[ 440 | 441 | ], 442 | "stateMutability":"nonpayable", 443 | "type":"function" 444 | }, 445 | { 446 | "inputs":[ 447 | 448 | ], 449 | "name":"mintEndTime", 450 | "outputs":[ 451 | { 452 | "internalType":"uint256", 453 | "name":"", 454 | "type":"uint256" 455 | } 456 | ], 457 | "stateMutability":"view", 458 | "type":"function" 459 | }, 460 | { 461 | "inputs":[ 462 | 463 | ], 464 | "name":"mintLimit", 465 | "outputs":[ 466 | { 467 | "internalType":"uint256", 468 | "name":"", 469 | "type":"uint256" 470 | } 471 | ], 472 | "stateMutability":"view", 473 | "type":"function" 474 | }, 475 | { 476 | "inputs":[ 477 | 478 | ], 479 | "name":"mintStartTime", 480 | "outputs":[ 481 | { 482 | "internalType":"uint256", 483 | "name":"", 484 | "type":"uint256" 485 | } 486 | ], 487 | "stateMutability":"view", 488 | "type":"function" 489 | }, 490 | { 491 | "inputs":[ 492 | 493 | ], 494 | "name":"name", 495 | "outputs":[ 496 | { 497 | "internalType":"string", 498 | "name":"", 499 | "type":"string" 500 | } 501 | ], 502 | "stateMutability":"view", 503 | "type":"function" 504 | }, 505 | { 506 | "inputs":[ 507 | 508 | ], 509 | "name":"owner", 510 | "outputs":[ 511 | { 512 | "internalType":"address", 513 | "name":"", 514 | "type":"address" 515 | } 516 | ], 517 | "stateMutability":"view", 518 | "type":"function" 519 | }, 520 | { 521 | "inputs":[ 522 | { 523 | "internalType":"uint256", 524 | "name":"tokenId", 525 | "type":"uint256" 526 | } 527 | ], 528 | "name":"ownerOf", 529 | "outputs":[ 530 | { 531 | "internalType":"address", 532 | "name":"", 533 | "type":"address" 534 | } 535 | ], 536 | "stateMutability":"view", 537 | "type":"function" 538 | }, 539 | { 540 | "inputs":[ 541 | 542 | ], 543 | "name":"renounceOwnership", 544 | "outputs":[ 545 | 546 | ], 547 | "stateMutability":"nonpayable", 548 | "type":"function" 549 | }, 550 | { 551 | "inputs":[ 552 | { 553 | "internalType":"address", 554 | "name":"from", 555 | "type":"address" 556 | }, 557 | { 558 | "internalType":"address", 559 | "name":"to", 560 | "type":"address" 561 | }, 562 | { 563 | "internalType":"uint256", 564 | "name":"tokenId", 565 | "type":"uint256" 566 | } 567 | ], 568 | "name":"safeTransferFrom", 569 | "outputs":[ 570 | 571 | ], 572 | "stateMutability":"payable", 573 | "type":"function" 574 | }, 575 | { 576 | "inputs":[ 577 | { 578 | "internalType":"address", 579 | "name":"from", 580 | "type":"address" 581 | }, 582 | { 583 | "internalType":"address", 584 | "name":"to", 585 | "type":"address" 586 | }, 587 | { 588 | "internalType":"uint256", 589 | "name":"tokenId", 590 | "type":"uint256" 591 | }, 592 | { 593 | "internalType":"bytes", 594 | "name":"_data", 595 | "type":"bytes" 596 | } 597 | ], 598 | "name":"safeTransferFrom", 599 | "outputs":[ 600 | 601 | ], 602 | "stateMutability":"payable", 603 | "type":"function" 604 | }, 605 | { 606 | "inputs":[ 607 | { 608 | "internalType":"address", 609 | "name":"operator", 610 | "type":"address" 611 | }, 612 | { 613 | "internalType":"bool", 614 | "name":"approved", 615 | "type":"bool" 616 | } 617 | ], 618 | "name":"setApprovalForAll", 619 | "outputs":[ 620 | 621 | ], 622 | "stateMutability":"nonpayable", 623 | "type":"function" 624 | }, 625 | { 626 | "inputs":[ 627 | { 628 | "internalType":"string", 629 | "name":"_newMetadataUri", 630 | "type":"string" 631 | } 632 | ], 633 | "name":"setMetadataUri", 634 | "outputs":[ 635 | 636 | ], 637 | "stateMutability":"nonpayable", 638 | "type":"function" 639 | }, 640 | { 641 | "inputs":[ 642 | { 643 | "internalType":"uint256", 644 | "name":"_mintLimit", 645 | "type":"uint256" 646 | } 647 | ], 648 | "name":"setMintLimit", 649 | "outputs":[ 650 | 651 | ], 652 | "stateMutability":"nonpayable", 653 | "type":"function" 654 | }, 655 | { 656 | "inputs":[ 657 | { 658 | "internalType":"uint256", 659 | "name":"_mintStartTime", 660 | "type":"uint256" 661 | }, 662 | { 663 | "internalType":"uint256", 664 | "name":"_mintEndTime", 665 | "type":"uint256" 666 | } 667 | ], 668 | "name":"setMintTimes", 669 | "outputs":[ 670 | 671 | ], 672 | "stateMutability":"nonpayable", 673 | "type":"function" 674 | }, 675 | { 676 | "inputs":[ 677 | { 678 | "internalType":"bytes4", 679 | "name":"interfaceId", 680 | "type":"bytes4" 681 | } 682 | ], 683 | "name":"supportsInterface", 684 | "outputs":[ 685 | { 686 | "internalType":"bool", 687 | "name":"", 688 | "type":"bool" 689 | } 690 | ], 691 | "stateMutability":"view", 692 | "type":"function" 693 | }, 694 | { 695 | "inputs":[ 696 | 697 | ], 698 | "name":"symbol", 699 | "outputs":[ 700 | { 701 | "internalType":"string", 702 | "name":"", 703 | "type":"string" 704 | } 705 | ], 706 | "stateMutability":"view", 707 | "type":"function" 708 | }, 709 | { 710 | "inputs":[ 711 | { 712 | "internalType":"uint256", 713 | "name":"_tokenId", 714 | "type":"uint256" 715 | } 716 | ], 717 | "name":"tokenURI", 718 | "outputs":[ 719 | { 720 | "internalType":"string", 721 | "name":"", 722 | "type":"string" 723 | } 724 | ], 725 | "stateMutability":"view", 726 | "type":"function" 727 | }, 728 | { 729 | "inputs":[ 730 | { 731 | "internalType":"address", 732 | "name":"owner", 733 | "type":"address" 734 | } 735 | ], 736 | "name":"tokensOfOwner", 737 | "outputs":[ 738 | { 739 | "internalType":"uint256[]", 740 | "name":"", 741 | "type":"uint256[]" 742 | } 743 | ], 744 | "stateMutability":"view", 745 | "type":"function" 746 | }, 747 | { 748 | "inputs":[ 749 | { 750 | "internalType":"address", 751 | "name":"owner", 752 | "type":"address" 753 | }, 754 | { 755 | "internalType":"uint256", 756 | "name":"start", 757 | "type":"uint256" 758 | }, 759 | { 760 | "internalType":"uint256", 761 | "name":"stop", 762 | "type":"uint256" 763 | } 764 | ], 765 | "name":"tokensOfOwnerIn", 766 | "outputs":[ 767 | { 768 | "internalType":"uint256[]", 769 | "name":"", 770 | "type":"uint256[]" 771 | } 772 | ], 773 | "stateMutability":"view", 774 | "type":"function" 775 | }, 776 | { 777 | "inputs":[ 778 | 779 | ], 780 | "name":"totalSupply", 781 | "outputs":[ 782 | { 783 | "internalType":"uint256", 784 | "name":"", 785 | "type":"uint256" 786 | } 787 | ], 788 | "stateMutability":"view", 789 | "type":"function" 790 | }, 791 | { 792 | "inputs":[ 793 | { 794 | "internalType":"address", 795 | "name":"from", 796 | "type":"address" 797 | }, 798 | { 799 | "internalType":"address", 800 | "name":"to", 801 | "type":"address" 802 | }, 803 | { 804 | "internalType":"uint256", 805 | "name":"tokenId", 806 | "type":"uint256" 807 | } 808 | ], 809 | "name":"transferFrom", 810 | "outputs":[ 811 | 812 | ], 813 | "stateMutability":"payable", 814 | "type":"function" 815 | }, 816 | { 817 | "inputs":[ 818 | { 819 | "internalType":"address", 820 | "name":"newOwner", 821 | "type":"address" 822 | } 823 | ], 824 | "name":"transferOwnership", 825 | "outputs":[ 826 | 827 | ], 828 | "stateMutability":"nonpayable", 829 | "type":"function" 830 | } 831 | ] --------------------------------------------------------------------------------