Best JavaScript code snippet using synthetixio-synpress
abi.ts
Source:abi.ts
1export const ensResolverABI = [2 {3 inputs: [{ internalType: 'contract ENS', name: '_ens', type: 'address' }],4 payable: false,5 stateMutability: 'nonpayable',6 type: 'constructor',7 },8 {9 anonymous: false,10 inputs: [11 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },12 { indexed: true, internalType: 'uint256', name: 'contentType', type: 'uint256' },13 ],14 name: 'ABIChanged',15 type: 'event',16 },17 {18 anonymous: false,19 inputs: [20 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },21 { indexed: false, internalType: 'address', name: 'a', type: 'address' },22 ],23 name: 'AddrChanged',24 type: 'event',25 },26 {27 anonymous: false,28 inputs: [29 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },30 { indexed: false, internalType: 'uint256', name: 'coinType', type: 'uint256' },31 { indexed: false, internalType: 'bytes', name: 'newAddress', type: 'bytes' },32 ],33 name: 'AddressChanged',34 type: 'event',35 },36 {37 anonymous: false,38 inputs: [39 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },40 { indexed: true, internalType: 'address', name: 'owner', type: 'address' },41 { indexed: true, internalType: 'address', name: 'target', type: 'address' },42 { indexed: false, internalType: 'bool', name: 'isAuthorised', type: 'bool' },43 ],44 name: 'AuthorisationChanged',45 type: 'event',46 },47 {48 anonymous: false,49 inputs: [50 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },51 { indexed: false, internalType: 'bytes', name: 'hash', type: 'bytes' },52 ],53 name: 'ContenthashChanged',54 type: 'event',55 },56 {57 anonymous: false,58 inputs: [59 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },60 { indexed: false, internalType: 'bytes', name: 'name', type: 'bytes' },61 { indexed: false, internalType: 'uint16', name: 'resource', type: 'uint16' },62 { indexed: false, internalType: 'bytes', name: 'record', type: 'bytes' },63 ],64 name: 'DNSRecordChanged',65 type: 'event',66 },67 {68 anonymous: false,69 inputs: [70 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },71 { indexed: false, internalType: 'bytes', name: 'name', type: 'bytes' },72 { indexed: false, internalType: 'uint16', name: 'resource', type: 'uint16' },73 ],74 name: 'DNSRecordDeleted',75 type: 'event',76 },77 {78 anonymous: false,79 inputs: [{ indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' }],80 name: 'DNSZoneCleared',81 type: 'event',82 },83 {84 anonymous: false,85 inputs: [86 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },87 { indexed: true, internalType: 'bytes4', name: 'interfaceID', type: 'bytes4' },88 { indexed: false, internalType: 'address', name: 'implementer', type: 'address' },89 ],90 name: 'InterfaceChanged',91 type: 'event',92 },93 {94 anonymous: false,95 inputs: [96 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },97 { indexed: false, internalType: 'string', name: 'name', type: 'string' },98 ],99 name: 'NameChanged',100 type: 'event',101 },102 {103 anonymous: false,104 inputs: [105 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },106 { indexed: false, internalType: 'bytes32', name: 'x', type: 'bytes32' },107 { indexed: false, internalType: 'bytes32', name: 'y', type: 'bytes32' },108 ],109 name: 'PubkeyChanged',110 type: 'event',111 },112 {113 anonymous: false,114 inputs: [115 { indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32' },116 { indexed: true, internalType: 'string', name: 'indexedKey', type: 'string' },117 { indexed: false, internalType: 'string', name: 'key', type: 'string' },118 ],119 name: 'TextChanged',120 type: 'event',121 },122 {123 constant: true,124 inputs: [125 { internalType: 'bytes32', name: 'node', type: 'bytes32' },126 { internalType: 'uint256', name: 'contentTypes', type: 'uint256' },127 ],128 name: 'ABI',129 outputs: [130 { internalType: 'uint256', name: '', type: 'uint256' },131 { internalType: 'bytes', name: '', type: 'bytes' },132 ],133 payable: false,134 stateMutability: 'view',135 type: 'function',136 },137 {138 constant: true,139 inputs: [{ internalType: 'bytes32', name: 'node', type: 'bytes32' }],140 name: 'addr',141 outputs: [{ internalType: 'address payable', name: '', type: 'address' }],142 payable: false,143 stateMutability: 'view',144 type: 'function',145 },146 {147 constant: true,148 inputs: [149 { internalType: 'bytes32', name: 'node', type: 'bytes32' },150 { internalType: 'uint256', name: 'coinType', type: 'uint256' },151 ],152 name: 'addr',153 outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],154 payable: false,155 stateMutability: 'view',156 type: 'function',157 },158 {159 constant: true,160 inputs: [161 { internalType: 'bytes32', name: '', type: 'bytes32' },162 { internalType: 'address', name: '', type: 'address' },163 { internalType: 'address', name: '', type: 'address' },164 ],165 name: 'authorisations',166 outputs: [{ internalType: 'bool', name: '', type: 'bool' }],167 payable: false,168 stateMutability: 'view',169 type: 'function',170 },171 {172 constant: false,173 inputs: [{ internalType: 'bytes32', name: 'node', type: 'bytes32' }],174 name: 'clearDNSZone',175 outputs: [],176 payable: false,177 stateMutability: 'nonpayable',178 type: 'function',179 },180 {181 constant: true,182 inputs: [{ internalType: 'bytes32', name: 'node', type: 'bytes32' }],183 name: 'contenthash',184 outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],185 payable: false,186 stateMutability: 'view',187 type: 'function',188 },189 {190 constant: true,191 inputs: [192 { internalType: 'bytes32', name: 'node', type: 'bytes32' },193 { internalType: 'bytes32', name: 'name', type: 'bytes32' },194 { internalType: 'uint16', name: 'resource', type: 'uint16' },195 ],196 name: 'dnsRecord',197 outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],198 payable: false,199 stateMutability: 'view',200 type: 'function',201 },202 {203 constant: true,204 inputs: [205 { internalType: 'bytes32', name: 'node', type: 'bytes32' },206 { internalType: 'bytes32', name: 'name', type: 'bytes32' },207 ],208 name: 'hasDNSRecords',209 outputs: [{ internalType: 'bool', name: '', type: 'bool' }],210 payable: false,211 stateMutability: 'view',212 type: 'function',213 },214 {215 constant: true,216 inputs: [217 { internalType: 'bytes32', name: 'node', type: 'bytes32' },218 { internalType: 'bytes4', name: 'interfaceID', type: 'bytes4' },219 ],220 name: 'interfaceImplementer',221 outputs: [{ internalType: 'address', name: '', type: 'address' }],222 payable: false,223 stateMutability: 'view',224 type: 'function',225 },226 {227 constant: false,228 inputs: [{ internalType: 'bytes[]', name: 'data', type: 'bytes[]' }],229 name: 'multicall',230 outputs: [{ internalType: 'bytes[]', name: 'results', type: 'bytes[]' }],231 payable: false,232 stateMutability: 'nonpayable',233 type: 'function',234 },235 {236 constant: true,237 inputs: [{ internalType: 'bytes32', name: 'node', type: 'bytes32' }],238 name: 'name',239 outputs: [{ internalType: 'string', name: '', type: 'string' }],240 payable: false,241 stateMutability: 'view',242 type: 'function',243 },244 {245 constant: true,246 inputs: [{ internalType: 'bytes32', name: 'node', type: 'bytes32' }],247 name: 'pubkey',248 outputs: [249 { internalType: 'bytes32', name: 'x', type: 'bytes32' },250 { internalType: 'bytes32', name: 'y', type: 'bytes32' },251 ],252 payable: false,253 stateMutability: 'view',254 type: 'function',255 },256 {257 constant: false,258 inputs: [259 { internalType: 'bytes32', name: 'node', type: 'bytes32' },260 { internalType: 'uint256', name: 'contentType', type: 'uint256' },261 { internalType: 'bytes', name: 'data', type: 'bytes' },262 ],263 name: 'setABI',264 outputs: [],265 payable: false,266 stateMutability: 'nonpayable',267 type: 'function',268 },269 {270 constant: false,271 inputs: [272 { internalType: 'bytes32', name: 'node', type: 'bytes32' },273 { internalType: 'uint256', name: 'coinType', type: 'uint256' },274 { internalType: 'bytes', name: 'a', type: 'bytes' },275 ],276 name: 'setAddr',277 outputs: [],278 payable: false,279 stateMutability: 'nonpayable',280 type: 'function',281 },282 {283 constant: false,284 inputs: [285 { internalType: 'bytes32', name: 'node', type: 'bytes32' },286 { internalType: 'address', name: 'a', type: 'address' },287 ],288 name: 'setAddr',289 outputs: [],290 payable: false,291 stateMutability: 'nonpayable',292 type: 'function',293 },294 {295 constant: false,296 inputs: [297 { internalType: 'bytes32', name: 'node', type: 'bytes32' },298 { internalType: 'address', name: 'target', type: 'address' },299 { internalType: 'bool', name: 'isAuthorised', type: 'bool' },300 ],301 name: 'setAuthorisation',302 outputs: [],303 payable: false,304 stateMutability: 'nonpayable',305 type: 'function',306 },307 {308 constant: false,309 inputs: [310 { internalType: 'bytes32', name: 'node', type: 'bytes32' },311 { internalType: 'bytes', name: 'hash', type: 'bytes' },312 ],313 name: 'setContenthash',314 outputs: [],315 payable: false,316 stateMutability: 'nonpayable',317 type: 'function',318 },319 {320 constant: false,321 inputs: [322 { internalType: 'bytes32', name: 'node', type: 'bytes32' },323 { internalType: 'bytes', name: 'data', type: 'bytes' },324 ],325 name: 'setDNSRecords',326 outputs: [],327 payable: false,328 stateMutability: 'nonpayable',329 type: 'function',330 },331 {332 constant: false,333 inputs: [334 { internalType: 'bytes32', name: 'node', type: 'bytes32' },335 { internalType: 'bytes4', name: 'interfaceID', type: 'bytes4' },336 { internalType: 'address', name: 'implementer', type: 'address' },337 ],338 name: 'setInterface',339 outputs: [],340 payable: false,341 stateMutability: 'nonpayable',342 type: 'function',343 },344 {345 constant: false,346 inputs: [347 { internalType: 'bytes32', name: 'node', type: 'bytes32' },348 { internalType: 'string', name: 'name', type: 'string' },349 ],350 name: 'setName',351 outputs: [],352 payable: false,353 stateMutability: 'nonpayable',354 type: 'function',355 },356 {357 constant: false,358 inputs: [359 { internalType: 'bytes32', name: 'node', type: 'bytes32' },360 { internalType: 'bytes32', name: 'x', type: 'bytes32' },361 { internalType: 'bytes32', name: 'y', type: 'bytes32' },362 ],363 name: 'setPubkey',364 outputs: [],365 payable: false,366 stateMutability: 'nonpayable',367 type: 'function',368 },369 {370 constant: false,371 inputs: [372 { internalType: 'bytes32', name: 'node', type: 'bytes32' },373 { internalType: 'string', name: 'key', type: 'string' },374 { internalType: 'string', name: 'value', type: 'string' },375 ],376 name: 'setText',377 outputs: [],378 payable: false,379 stateMutability: 'nonpayable',380 type: 'function',381 },382 {383 constant: true,384 inputs: [{ internalType: 'bytes4', name: 'interfaceID', type: 'bytes4' }],385 name: 'supportsInterface',386 outputs: [{ internalType: 'bool', name: '', type: 'bool' }],387 payable: false,388 stateMutability: 'pure',389 type: 'function',390 },391 {392 constant: true,393 inputs: [394 { internalType: 'bytes32', name: 'node', type: 'bytes32' },395 { internalType: 'string', name: 'key', type: 'string' },396 ],397 name: 'text',398 outputs: [{ internalType: 'string', name: '', type: 'string' }],399 payable: false,400 stateMutability: 'view',401 type: 'function',402 },403];404export const interrepABI = [405 {406 anonymous: false,407 inputs: [408 {409 indexed: true,410 internalType: 'bytes32',411 name: 'provider',412 type: 'bytes32',413 },414 {415 indexed: false,416 internalType: 'bytes32',417 name: 'name',418 type: 'bytes32',419 },420 {421 indexed: false,422 internalType: 'uint8',423 name: 'depth',424 type: 'uint8',425 },426 ],427 name: 'GroupAdded',428 type: 'event',429 },430 {431 anonymous: false,432 inputs: [433 {434 indexed: true,435 internalType: 'bytes32',436 name: 'provider',437 type: 'bytes32',438 },439 {440 indexed: true,441 internalType: 'bytes32',442 name: 'name',443 type: 'bytes32',444 },445 {446 indexed: false,447 internalType: 'uint256',448 name: 'identityCommitment',449 type: 'uint256',450 },451 {452 indexed: false,453 internalType: 'uint256',454 name: 'root',455 type: 'uint256',456 },457 ],458 name: 'IdentityCommitmentAdded',459 type: 'event',460 },461 {462 anonymous: false,463 inputs: [464 {465 indexed: true,466 internalType: 'bytes32',467 name: 'provider',468 type: 'bytes32',469 },470 {471 indexed: true,472 internalType: 'bytes32',473 name: 'name',474 type: 'bytes32',475 },476 {477 indexed: false,478 internalType: 'uint256',479 name: 'identityCommitment',480 type: 'uint256',481 },482 {483 indexed: false,484 internalType: 'uint256',485 name: 'root',486 type: 'uint256',487 },488 ],489 name: 'IdentityCommitmentDeleted',490 type: 'event',491 },492 {493 anonymous: false,494 inputs: [495 {496 indexed: true,497 internalType: 'address',498 name: 'previousOwner',499 type: 'address',500 },501 {502 indexed: true,503 internalType: 'address',504 name: 'newOwner',505 type: 'address',506 },507 ],508 name: 'OwnershipTransferred',509 type: 'event',510 },511 {512 inputs: [513 {514 internalType: 'bytes32',515 name: 'provider',516 type: 'bytes32',517 },518 {519 internalType: 'bytes32',520 name: 'name',521 type: 'bytes32',522 },523 {524 internalType: 'uint256',525 name: 'identityCommitment',526 type: 'uint256',527 },528 ],529 name: 'addIdentityCommitment',530 outputs: [],531 stateMutability: 'nonpayable',532 type: 'function',533 },534 {535 inputs: [536 {537 internalType: 'bytes32',538 name: 'provider',539 type: 'bytes32',540 },541 {542 internalType: 'bytes32[]',543 name: 'names',544 type: 'bytes32[]',545 },546 {547 internalType: 'uint256[]',548 name: 'identityCommitments',549 type: 'uint256[]',550 },551 ],552 name: 'batchAddIdentityCommitment',553 outputs: [],554 stateMutability: 'nonpayable',555 type: 'function',556 },557 {558 inputs: [559 {560 internalType: 'bytes32',561 name: 'provider',562 type: 'bytes32',563 },564 {565 internalType: 'bytes32[]',566 name: 'names',567 type: 'bytes32[]',568 },569 {570 internalType: 'uint8[]',571 name: 'depths',572 type: 'uint8[]',573 },574 {575 internalType: 'address[]',576 name: 'admins',577 type: 'address[]',578 },579 ],580 name: 'batchCreateGroup',581 outputs: [],582 stateMutability: 'nonpayable',583 type: 'function',584 },585 {586 inputs: [587 {588 internalType: 'bytes32',589 name: 'provider',590 type: 'bytes32',591 },592 {593 internalType: 'bytes32',594 name: 'name',595 type: 'bytes32',596 },597 {598 internalType: 'uint8',599 name: 'depth',600 type: 'uint8',601 },602 {603 internalType: 'address',604 name: 'admin',605 type: 'address',606 },607 ],608 name: 'createGroup',609 outputs: [],610 stateMutability: 'nonpayable',611 type: 'function',612 },613 {614 inputs: [615 {616 internalType: 'bytes32',617 name: 'provider',618 type: 'bytes32',619 },620 {621 internalType: 'bytes32',622 name: 'name',623 type: 'bytes32',624 },625 {626 internalType: 'uint256',627 name: 'identityCommitment',628 type: 'uint256',629 },630 {631 internalType: 'uint256[]',632 name: 'pathSiblingNodes',633 type: 'uint256[]',634 },635 {636 internalType: 'uint8[]',637 name: 'pathPositions',638 type: 'uint8[]',639 },640 ],641 name: 'deleteIdentityCommitment',642 outputs: [],643 stateMutability: 'nonpayable',644 type: 'function',645 },646 {647 inputs: [648 {649 internalType: 'bytes32',650 name: 'provider',651 type: 'bytes32',652 },653 {654 internalType: 'bytes32',655 name: 'name',656 type: 'bytes32',657 },658 ],659 name: 'getRoot',660 outputs: [661 {662 internalType: 'uint256',663 name: '',664 type: 'uint256',665 },666 ],667 stateMutability: 'view',668 type: 'function',669 },670 {671 inputs: [672 {673 internalType: 'bytes32',674 name: 'provider',675 type: 'bytes32',676 },677 {678 internalType: 'bytes32',679 name: 'name',680 type: 'bytes32',681 },682 ],683 name: 'getSize',684 outputs: [685 {686 internalType: 'uint256',687 name: '',688 type: 'uint256',689 },690 ],691 stateMutability: 'view',692 type: 'function',693 },694 {695 inputs: [],696 name: 'initialize',697 outputs: [],698 stateMutability: 'nonpayable',699 type: 'function',700 },701 {702 inputs: [],703 name: 'owner',704 outputs: [705 {706 internalType: 'address',707 name: '',708 type: 'address',709 },710 ],711 stateMutability: 'view',712 type: 'function',713 },714 {715 inputs: [],716 name: 'renounceOwnership',717 outputs: [],718 stateMutability: 'nonpayable',719 type: 'function',720 },721 {722 inputs: [723 {724 internalType: 'address',725 name: 'newOwner',726 type: 'address',727 },728 ],729 name: 'transferOwnership',730 outputs: [],731 stateMutability: 'nonpayable',732 type: 'function',733 },734];735export const arbRegistrarABI = [736 {737 anonymous: false,738 inputs: [739 {740 indexed: true,741 internalType: 'address',742 name: 'account',743 type: 'address',744 },745 {746 indexed: false,747 internalType: 'bytes',748 name: 'value',749 type: 'bytes',750 },751 {752 indexed: false,753 internalType: 'bytes',754 name: 'proof',755 type: 'bytes',756 },757 {758 indexed: false,759 internalType: 'address',760 name: 'relayer',761 type: 'address',762 },763 ],764 name: 'RecordUpdatedFor',765 type: 'event',766 },767 {768 inputs: [769 {770 internalType: 'address',771 name: '',772 type: 'address',773 },774 ],775 name: 'nonces',776 outputs: [777 {778 internalType: 'uint256',779 name: '',780 type: 'uint256',781 },782 ],783 stateMutability: 'view',784 type: 'function',785 constant: true,786 },787 {788 inputs: [789 {790 internalType: 'address',791 name: 'account',792 type: 'address',793 },794 {795 internalType: 'bytes',796 name: 'value',797 type: 'bytes',798 },799 {800 internalType: 'bytes',801 name: 'proof',802 type: 'bytes',803 },804 ],805 name: 'updateFor',806 outputs: [],807 stateMutability: 'nonpayable',808 type: 'function',809 },810 {811 inputs: [812 {813 internalType: 'bytes32',814 name: 'msgHash',815 type: 'bytes32',816 },817 {818 internalType: 'bytes',819 name: 'proof',820 type: 'bytes',821 },822 ],823 name: 'recoverSigner',824 outputs: [825 {826 internalType: 'address',827 name: '',828 type: 'address',829 },830 ],831 stateMutability: 'pure',832 type: 'function',833 constant: true,834 },835 {836 inputs: [837 {838 internalType: 'bytes',839 name: 'sig',840 type: 'bytes',841 },842 ],843 name: 'splitSignature',844 outputs: [845 {846 internalType: 'bytes32',847 name: 'r',848 type: 'bytes32',849 },850 {851 internalType: 'bytes32',852 name: 's',853 type: 'bytes32',854 },855 {856 internalType: 'uint8',857 name: 'v',858 type: 'uint8',859 },860 ],861 stateMutability: 'pure',862 type: 'function',863 constant: true,864 },865 {866 inputs: [867 {868 internalType: 'bytes32',869 name: '_messageHash',870 type: 'bytes32',871 },872 ],873 name: 'getEthSignedMessageHash',874 outputs: [875 {876 internalType: 'bytes32',877 name: '',878 type: 'bytes32',879 },880 ],881 stateMutability: 'pure',882 type: 'function',883 constant: true,884 },885];886export const semaphoreABI = [887 {888 inputs: [889 {890 components: [891 { internalType: 'address', name: 'contractAddress', type: 'address' },892 { internalType: 'uint256', name: 'merkleTreeDepth', type: 'uint256' },893 ],894 internalType: 'struct ISemaphore.Verifier[]',895 name: '_verifiers',896 type: 'tuple[]',897 },898 ],899 stateMutability: 'nonpayable',900 type: 'constructor',901 },902 { inputs: [], name: 'Semaphore__CallerIsNotTheGroupAdmin', type: 'error' },903 { inputs: [], name: 'Semaphore__GroupAlreadyExists', type: 'error' },904 { inputs: [], name: 'Semaphore__GroupDoesNotExist', type: 'error' },905 { inputs: [], name: 'Semaphore__GroupIdIsNotLessThanSnarkScalarField', type: 'error' },906 { inputs: [], name: 'Semaphore__MerkleTreeDepthIsNotSupported', type: 'error' },907 { inputs: [], name: 'Semaphore__MerkleTreeRootIsExpired', type: 'error' },908 { inputs: [], name: 'Semaphore__MerkleTreeRootIsNotPartOfTheGroup', type: 'error' },909 { inputs: [], name: 'Semaphore__YouAreUsingTheSameNillifierTwice', type: 'error' },910 {911 anonymous: false,912 inputs: [913 { indexed: true, internalType: 'uint256', name: 'groupId', type: 'uint256' },914 { indexed: true, internalType: 'address', name: 'oldAdmin', type: 'address' },915 { indexed: true, internalType: 'address', name: 'newAdmin', type: 'address' },916 ],917 name: 'GroupAdminUpdated',918 type: 'event',919 },920 {921 anonymous: false,922 inputs: [923 { indexed: true, internalType: 'uint256', name: 'groupId', type: 'uint256' },924 { indexed: false, internalType: 'uint256', name: 'merkleTreeDepth', type: 'uint256' },925 { indexed: false, internalType: 'uint256', name: 'zeroValue', type: 'uint256' },926 ],927 name: 'GroupCreated',928 type: 'event',929 },930 {931 anonymous: false,932 inputs: [933 { indexed: true, internalType: 'uint256', name: 'groupId', type: 'uint256' },934 { indexed: false, internalType: 'uint256', name: 'index', type: 'uint256' },935 {936 indexed: false,937 internalType: 'uint256',938 name: 'identityCommitment',939 type: 'uint256',940 },941 { indexed: false, internalType: 'uint256', name: 'merkleTreeRoot', type: 'uint256' },942 ],943 name: 'MemberAdded',944 type: 'event',945 },946 {947 anonymous: false,948 inputs: [949 { indexed: true, internalType: 'uint256', name: 'groupId', type: 'uint256' },950 { indexed: false, internalType: 'uint256', name: 'index', type: 'uint256' },951 {952 indexed: false,953 internalType: 'uint256',954 name: 'identityCommitment',955 type: 'uint256',956 },957 { indexed: false, internalType: 'uint256', name: 'merkleTreeRoot', type: 'uint256' },958 ],959 name: 'MemberRemoved',960 type: 'event',961 },962 {963 anonymous: false,964 inputs: [965 { indexed: true, internalType: 'uint256', name: 'groupId', type: 'uint256' },966 { indexed: false, internalType: 'uint256', name: 'index', type: 'uint256' },967 {968 indexed: false,969 internalType: 'uint256',970 name: 'identityCommitment',971 type: 'uint256',972 },973 {974 indexed: false,975 internalType: 'uint256',976 name: 'newIdentityCommitment',977 type: 'uint256',978 },979 { indexed: false, internalType: 'uint256', name: 'merkleTreeRoot', type: 'uint256' },980 ],981 name: 'MemberUpdated',982 type: 'event',983 },984 {985 anonymous: false,986 inputs: [{ indexed: false, internalType: 'uint256', name: 'nullifierHash', type: 'uint256' }],987 name: 'NullifierHashAdded',988 type: 'event',989 },990 {991 anonymous: false,992 inputs: [993 { indexed: true, internalType: 'uint256', name: 'groupId', type: 'uint256' },994 { indexed: false, internalType: 'uint256', name: 'merkleTreeRoot', type: 'uint256' },995 { indexed: false, internalType: 'uint256', name: 'externalNullifier', type: 'uint256' },996 { indexed: false, internalType: 'uint256', name: 'nullifierHash', type: 'uint256' },997 { indexed: false, internalType: 'bytes32', name: 'signal', type: 'bytes32' },998 ],999 name: 'ProofVerified',1000 type: 'event',1001 },1002 {1003 inputs: [1004 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1005 { internalType: 'uint256', name: 'identityCommitment', type: 'uint256' },1006 ],1007 name: 'addMember',1008 outputs: [],1009 stateMutability: 'nonpayable',1010 type: 'function',1011 },1012 {1013 inputs: [1014 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1015 { internalType: 'uint256[]', name: 'identityCommitments', type: 'uint256[]' },1016 ],1017 name: 'addMembers',1018 outputs: [],1019 stateMutability: 'nonpayable',1020 type: 'function',1021 },1022 {1023 inputs: [1024 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1025 { internalType: 'uint256', name: 'merkleTreeDepth', type: 'uint256' },1026 { internalType: 'uint256', name: 'zeroValue', type: 'uint256' },1027 { internalType: 'address', name: 'admin', type: 'address' },1028 ],1029 name: 'createGroup',1030 outputs: [],1031 stateMutability: 'nonpayable',1032 type: 'function',1033 },1034 {1035 inputs: [1036 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1037 { internalType: 'uint256', name: 'merkleTreeDepth', type: 'uint256' },1038 { internalType: 'uint256', name: 'zeroValue', type: 'uint256' },1039 { internalType: 'address', name: 'admin', type: 'address' },1040 { internalType: 'uint256', name: 'merkleTreeRootDuration', type: 'uint256' },1041 ],1042 name: 'createGroup',1043 outputs: [],1044 stateMutability: 'nonpayable',1045 type: 'function',1046 },1047 {1048 inputs: [{ internalType: 'uint256', name: 'groupId', type: 'uint256' }],1049 name: 'getMerkleTreeDepth',1050 outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],1051 stateMutability: 'view',1052 type: 'function',1053 },1054 {1055 inputs: [{ internalType: 'uint256', name: 'groupId', type: 'uint256' }],1056 name: 'getMerkleTreeRoot',1057 outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],1058 stateMutability: 'view',1059 type: 'function',1060 },1061 {1062 inputs: [{ internalType: 'uint256', name: 'groupId', type: 'uint256' }],1063 name: 'getNumberOfMerkleTreeLeaves',1064 outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],1065 stateMutability: 'view',1066 type: 'function',1067 },1068 {1069 inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],1070 name: 'groups',1071 outputs: [1072 { internalType: 'address', name: 'admin', type: 'address' },1073 { internalType: 'uint256', name: 'merkleRootDuration', type: 'uint256' },1074 ],1075 stateMutability: 'view',1076 type: 'function',1077 },1078 {1079 inputs: [1080 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1081 { internalType: 'uint256', name: 'identityCommitment', type: 'uint256' },1082 { internalType: 'uint256[]', name: 'proofSiblings', type: 'uint256[]' },1083 { internalType: 'uint8[]', name: 'proofPathIndices', type: 'uint8[]' },1084 ],1085 name: 'removeMember',1086 outputs: [],1087 stateMutability: 'nonpayable',1088 type: 'function',1089 },1090 {1091 inputs: [1092 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1093 { internalType: 'address', name: 'newAdmin', type: 'address' },1094 ],1095 name: 'updateGroupAdmin',1096 outputs: [],1097 stateMutability: 'nonpayable',1098 type: 'function',1099 },1100 {1101 inputs: [1102 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1103 { internalType: 'uint256', name: 'identityCommitment', type: 'uint256' },1104 { internalType: 'uint256', name: 'newIdentityCommitment', type: 'uint256' },1105 { internalType: 'uint256[]', name: 'proofSiblings', type: 'uint256[]' },1106 { internalType: 'uint8[]', name: 'proofPathIndices', type: 'uint8[]' },1107 ],1108 name: 'updateMember',1109 outputs: [],1110 stateMutability: 'nonpayable',1111 type: 'function',1112 },1113 {1114 inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],1115 name: 'verifiers',1116 outputs: [{ internalType: 'contract IVerifier', name: '', type: 'address' }],1117 stateMutability: 'view',1118 type: 'function',1119 },1120 {1121 inputs: [1122 { internalType: 'uint256', name: 'groupId', type: 'uint256' },1123 { internalType: 'uint256', name: 'merkleTreeRoot', type: 'uint256' },1124 { internalType: 'bytes32', name: 'signal', type: 'bytes32' },1125 { internalType: 'uint256', name: 'nullifierHash', type: 'uint256' },1126 { internalType: 'uint256', name: 'externalNullifier', type: 'uint256' },1127 { internalType: 'uint256[8]', name: 'proof', type: 'uint256[8]' },1128 ],1129 name: 'verifyProof',1130 outputs: [],1131 stateMutability: 'nonpayable',1132 type: 'function',1133 },...
ensutils-rinkeby.js
Source:ensutils-rinkeby.js
1// STOP!2// Are you thinking of using this in an app? Don't!3// This script is designed for interactive use in the go-ethereum console.4// For use in an app, consider one of these fine libraries:5// - https://www.npmjs.com/package/ethjs-ens6// - https://www.npmjs.com/package/ethereum-ens7function namehash(name) {8 var node = '0x0000000000000000000000000000000000000000000000000000000000000000';9 if (name !== '') {10 var labels = name.split(".");11 for(var i = labels.length - 1; i >= 0; i--) {12 node = web3.sha3(node + web3.sha3(labels[i]).slice(2), {encoding: 'hex'});13 }14 }15 return node.toString();16}17var ensContract = web3.eth.contract([18 {19 "constant": true,20 "inputs": [21 {22 "name": "node",23 "type": "bytes32"24 }25 ],26 "name": "resolver",27 "outputs": [28 {29 "name": "",30 "type": "address"31 }32 ],33 "payable": false,34 "type": "function"35 },36 {37 "constant": true,38 "inputs": [39 {40 "name": "node",41 "type": "bytes32"42 }43 ],44 "name": "owner",45 "outputs": [46 {47 "name": "",48 "type": "address"49 }50 ],51 "payable": false,52 "type": "function"53 },54 {55 "constant": false,56 "inputs": [57 {58 "name": "node",59 "type": "bytes32"60 },61 {62 "name": "label",63 "type": "bytes32"64 },65 {66 "name": "owner",67 "type": "address"68 }69 ],70 "name": "setSubnodeOwner",71 "outputs": [],72 "payable": false,73 "type": "function"74 },75 {76 "constant": false,77 "inputs": [78 {79 "name": "node",80 "type": "bytes32"81 },82 {83 "name": "ttl",84 "type": "uint64"85 }86 ],87 "name": "setTTL",88 "outputs": [],89 "payable": false,90 "type": "function"91 },92 {93 "constant": true,94 "inputs": [95 {96 "name": "node",97 "type": "bytes32"98 }99 ],100 "name": "ttl",101 "outputs": [102 {103 "name": "",104 "type": "uint64"105 }106 ],107 "payable": false,108 "type": "function"109 },110 {111 "constant": false,112 "inputs": [113 {114 "name": "node",115 "type": "bytes32"116 },117 {118 "name": "resolver",119 "type": "address"120 }121 ],122 "name": "setResolver",123 "outputs": [],124 "payable": false,125 "type": "function"126 },127 {128 "constant": false,129 "inputs": [130 {131 "name": "node",132 "type": "bytes32"133 },134 {135 "name": "owner",136 "type": "address"137 }138 ],139 "name": "setOwner",140 "outputs": [],141 "payable": false,142 "type": "function"143 },144 {145 "anonymous": false,146 "inputs": [147 {148 "indexed": true,149 "name": "node",150 "type": "bytes32"151 },152 {153 "indexed": false,154 "name": "owner",155 "type": "address"156 }157 ],158 "name": "Transfer",159 "type": "event"160 },161 {162 "anonymous": false,163 "inputs": [164 {165 "indexed": true,166 "name": "node",167 "type": "bytes32"168 },169 {170 "indexed": true,171 "name": "label",172 "type": "bytes32"173 },174 {175 "indexed": false,176 "name": "owner",177 "type": "address"178 }179 ],180 "name": "NewOwner",181 "type": "event"182 },183 {184 "anonymous": false,185 "inputs": [186 {187 "indexed": true,188 "name": "node",189 "type": "bytes32"190 },191 {192 "indexed": false,193 "name": "resolver",194 "type": "address"195 }196 ],197 "name": "NewResolver",198 "type": "event"199 },200 {201 "anonymous": false,202 "inputs": [203 {204 "indexed": true,205 "name": "node",206 "type": "bytes32"207 },208 {209 "indexed": false,210 "name": "ttl",211 "type": "uint64"212 }213 ],214 "name": "NewTTL",215 "type": "event"216 }217]);218var ens = ensContract.at('0xe7410170f87102df0055eb195163a03b7f2bff4a');219var auctionRegistrarContract = web3.eth.contract([220 {221 "constant": false,222 "inputs": [223 {224 "name": "_hash",225 "type": "bytes32"226 }227 ],228 "name": "releaseDeed",229 "outputs": [],230 "payable": false,231 "type": "function"232 },233 {234 "constant": true,235 "inputs": [236 {237 "name": "_hash",238 "type": "bytes32"239 }240 ],241 "name": "getAllowedTime",242 "outputs": [243 {244 "name": "timestamp",245 "type": "uint256"246 }247 ],248 "payable": false,249 "type": "function"250 },251 {252 "constant": false,253 "inputs": [254 {255 "name": "unhashedName",256 "type": "string"257 }258 ],259 "name": "invalidateName",260 "outputs": [],261 "payable": false,262 "type": "function"263 },264 {265 "constant": true,266 "inputs": [267 {268 "name": "hash",269 "type": "bytes32"270 },271 {272 "name": "owner",273 "type": "address"274 },275 {276 "name": "value",277 "type": "uint256"278 },279 {280 "name": "salt",281 "type": "bytes32"282 }283 ],284 "name": "shaBid",285 "outputs": [286 {287 "name": "sealedBid",288 "type": "bytes32"289 }290 ],291 "payable": false,292 "type": "function"293 },294 {295 "constant": false,296 "inputs": [297 {298 "name": "bidder",299 "type": "address"300 },301 {302 "name": "seal",303 "type": "bytes32"304 }305 ],306 "name": "cancelBid",307 "outputs": [],308 "payable": false,309 "type": "function"310 },311 {312 "constant": true,313 "inputs": [314 {315 "name": "_hash",316 "type": "bytes32"317 }318 ],319 "name": "entries",320 "outputs": [321 {322 "name": "",323 "type": "uint8"324 },325 {326 "name": "",327 "type": "address"328 },329 {330 "name": "",331 "type": "uint256"332 },333 {334 "name": "",335 "type": "uint256"336 },337 {338 "name": "",339 "type": "uint256"340 }341 ],342 "payable": false,343 "type": "function"344 },345 {346 "constant": true,347 "inputs": [],348 "name": "ens",349 "outputs": [350 {351 "name": "",352 "type": "address"353 }354 ],355 "payable": false,356 "type": "function"357 },358 {359 "constant": false,360 "inputs": [361 {362 "name": "_hash",363 "type": "bytes32"364 },365 {366 "name": "_value",367 "type": "uint256"368 },369 {370 "name": "_salt",371 "type": "bytes32"372 }373 ],374 "name": "unsealBid",375 "outputs": [],376 "payable": false,377 "type": "function"378 },379 {380 "constant": false,381 "inputs": [382 {383 "name": "_hash",384 "type": "bytes32"385 }386 ],387 "name": "transferRegistrars",388 "outputs": [],389 "payable": false,390 "type": "function"391 },392 {393 "constant": true,394 "inputs": [395 {396 "name": "",397 "type": "address"398 },399 {400 "name": "",401 "type": "bytes32"402 }403 ],404 "name": "sealedBids",405 "outputs": [406 {407 "name": "",408 "type": "address"409 }410 ],411 "payable": false,412 "type": "function"413 },414 {415 "constant": true,416 "inputs": [417 {418 "name": "_hash",419 "type": "bytes32"420 }421 ],422 "name": "state",423 "outputs": [424 {425 "name": "",426 "type": "uint8"427 }428 ],429 "payable": false,430 "type": "function"431 },432 {433 "constant": false,434 "inputs": [435 {436 "name": "_hash",437 "type": "bytes32"438 },439 {440 "name": "newOwner",441 "type": "address"442 }443 ],444 "name": "transfer",445 "outputs": [],446 "payable": false,447 "type": "function"448 },449 {450 "constant": true,451 "inputs": [452 {453 "name": "_hash",454 "type": "bytes32"455 },456 {457 "name": "_timestamp",458 "type": "uint256"459 }460 ],461 "name": "isAllowed",462 "outputs": [463 {464 "name": "allowed",465 "type": "bool"466 }467 ],468 "payable": false,469 "type": "function"470 },471 {472 "constant": false,473 "inputs": [474 {475 "name": "_hash",476 "type": "bytes32"477 }478 ],479 "name": "finalizeAuction",480 "outputs": [],481 "payable": false,482 "type": "function"483 },484 {485 "constant": true,486 "inputs": [],487 "name": "registryStarted",488 "outputs": [489 {490 "name": "",491 "type": "uint256"492 }493 ],494 "payable": false,495 "type": "function"496 },497 {498 "constant": false,499 "inputs": [500 {501 "name": "sealedBid",502 "type": "bytes32"503 }504 ],505 "name": "newBid",506 "outputs": [],507 "payable": true,508 "type": "function"509 },510 {511 "constant": false,512 "inputs": [513 {514 "name": "labels",515 "type": "bytes32[]"516 }517 ],518 "name": "eraseNode",519 "outputs": [],520 "payable": false,521 "type": "function"522 },523 {524 "constant": false,525 "inputs": [526 {527 "name": "_hashes",528 "type": "bytes32[]"529 }530 ],531 "name": "startAuctions",532 "outputs": [],533 "payable": false,534 "type": "function"535 },536 {537 "constant": false,538 "inputs": [539 {540 "name": "hash",541 "type": "bytes32"542 },543 {544 "name": "deed",545 "type": "address"546 },547 {548 "name": "registrationDate",549 "type": "uint256"550 }551 ],552 "name": "acceptRegistrarTransfer",553 "outputs": [],554 "payable": false,555 "type": "function"556 },557 {558 "constant": false,559 "inputs": [560 {561 "name": "_hash",562 "type": "bytes32"563 }564 ],565 "name": "startAuction",566 "outputs": [],567 "payable": false,568 "type": "function"569 },570 {571 "constant": true,572 "inputs": [],573 "name": "rootNode",574 "outputs": [575 {576 "name": "",577 "type": "bytes32"578 }579 ],580 "payable": false,581 "type": "function"582 },583 {584 "constant": false,585 "inputs": [586 {587 "name": "hashes",588 "type": "bytes32[]"589 },590 {591 "name": "sealedBid",592 "type": "bytes32"593 }594 ],595 "name": "startAuctionsAndBid",596 "outputs": [],597 "payable": true,598 "type": "function"599 },600 {601 "inputs": [602 {603 "name": "_ens",604 "type": "address"605 },606 {607 "name": "_rootNode",608 "type": "bytes32"609 },610 {611 "name": "_startDate",612 "type": "uint256"613 }614 ],615 "payable": false,616 "type": "constructor"617 },618 {619 "anonymous": false,620 "inputs": [621 {622 "indexed": true,623 "name": "hash",624 "type": "bytes32"625 },626 {627 "indexed": false,628 "name": "registrationDate",629 "type": "uint256"630 }631 ],632 "name": "AuctionStarted",633 "type": "event"634 },635 {636 "anonymous": false,637 "inputs": [638 {639 "indexed": true,640 "name": "hash",641 "type": "bytes32"642 },643 {644 "indexed": true,645 "name": "bidder",646 "type": "address"647 },648 {649 "indexed": false,650 "name": "deposit",651 "type": "uint256"652 }653 ],654 "name": "NewBid",655 "type": "event"656 },657 {658 "anonymous": false,659 "inputs": [660 {661 "indexed": true,662 "name": "hash",663 "type": "bytes32"664 },665 {666 "indexed": true,667 "name": "owner",668 "type": "address"669 },670 {671 "indexed": false,672 "name": "value",673 "type": "uint256"674 },675 {676 "indexed": false,677 "name": "status",678 "type": "uint8"679 }680 ],681 "name": "BidRevealed",682 "type": "event"683 },684 {685 "anonymous": false,686 "inputs": [687 {688 "indexed": true,689 "name": "hash",690 "type": "bytes32"691 },692 {693 "indexed": true,694 "name": "owner",695 "type": "address"696 },697 {698 "indexed": false,699 "name": "value",700 "type": "uint256"701 },702 {703 "indexed": false,704 "name": "registrationDate",705 "type": "uint256"706 }707 ],708 "name": "HashRegistered",709 "type": "event"710 },711 {712 "anonymous": false,713 "inputs": [714 {715 "indexed": true,716 "name": "hash",717 "type": "bytes32"718 },719 {720 "indexed": false,721 "name": "value",722 "type": "uint256"723 }724 ],725 "name": "HashReleased",726 "type": "event"727 },728 {729 "anonymous": false,730 "inputs": [731 {732 "indexed": true,733 "name": "hash",734 "type": "bytes32"735 },736 {737 "indexed": true,738 "name": "name",739 "type": "string"740 },741 {742 "indexed": false,743 "name": "value",744 "type": "uint256"745 },746 {747 "indexed": false,748 "name": "registrationDate",749 "type": "uint256"750 }751 ],752 "name": "HashInvalidated",753 "type": "event"754 }755]);756var ethRegistrar = auctionRegistrarContract.at(ens.owner(namehash('eth')));757var deedContract = web3.eth.contract([758 {759 "constant": true,760 "inputs": [],761 "name": "creationDate",762 "outputs": [763 {764 "name": "",765 "type": "uint256"766 }767 ],768 "payable": false,769 "type": "function"770 },771 {772 "constant": false,773 "inputs": [],774 "name": "destroyDeed",775 "outputs": [],776 "payable": false,777 "type": "function"778 },779 {780 "constant": false,781 "inputs": [782 {783 "name": "newOwner",784 "type": "address"785 }786 ],787 "name": "setOwner",788 "outputs": [],789 "payable": false,790 "type": "function"791 },792 {793 "constant": true,794 "inputs": [],795 "name": "registrar",796 "outputs": [797 {798 "name": "",799 "type": "address"800 }801 ],802 "payable": false,803 "type": "function"804 },805 {806 "constant": true,807 "inputs": [],808 "name": "value",809 "outputs": [810 {811 "name": "",812 "type": "uint256"813 }814 ],815 "payable": false,816 "type": "function"817 },818 {819 "constant": true,820 "inputs": [],821 "name": "previousOwner",822 "outputs": [823 {824 "name": "",825 "type": "address"826 }827 ],828 "payable": false,829 "type": "function"830 },831 {832 "constant": true,833 "inputs": [],834 "name": "owner",835 "outputs": [836 {837 "name": "",838 "type": "address"839 }840 ],841 "payable": false,842 "type": "function"843 },844 {845 "constant": false,846 "inputs": [847 {848 "name": "newValue",849 "type": "uint256"850 },851 {852 "name": "throwOnFailure",853 "type": "bool"854 }855 ],856 "name": "setBalance",857 "outputs": [],858 "payable": false,859 "type": "function"860 },861 {862 "constant": false,863 "inputs": [864 {865 "name": "refundRatio",866 "type": "uint256"867 }868 ],869 "name": "closeDeed",870 "outputs": [],871 "payable": false,872 "type": "function"873 },874 {875 "constant": false,876 "inputs": [877 {878 "name": "newRegistrar",879 "type": "address"880 }881 ],882 "name": "setRegistrar",883 "outputs": [],884 "payable": false,885 "type": "function"886 },887 {888 "inputs": [889 {890 "name": "_owner",891 "type": "address"892 }893 ],894 "payable": true,895 "type": "constructor"896 },897 {898 "anonymous": false,899 "inputs": [900 {901 "indexed": false,902 "name": "newOwner",903 "type": "address"904 }905 ],906 "name": "OwnerChanged",907 "type": "event"908 },909 {910 "anonymous": false,911 "inputs": [],912 "name": "DeedClosed",913 "type": "event"914 }915]);916var fifsRegistrarContract = web3.eth.contract([917 {918 "constant": true,919 "inputs": [],920 "name": "ens",921 "outputs": [922 {923 "name": "",924 "type": "address"925 }926 ],927 "payable": false,928 "type": "function"929 },930 {931 "constant": true,932 "inputs": [933 {934 "name": "",935 "type": "bytes32"936 }937 ],938 "name": "expiryTimes",939 "outputs": [940 {941 "name": "",942 "type": "uint256"943 }944 ],945 "payable": false,946 "type": "function"947 },948 {949 "constant": false,950 "inputs": [951 {952 "name": "subnode",953 "type": "bytes32"954 },955 {956 "name": "owner",957 "type": "address"958 }959 ],960 "name": "register",961 "outputs": [],962 "payable": false,963 "type": "function"964 },965 {966 "constant": true,967 "inputs": [],968 "name": "rootNode",969 "outputs": [970 {971 "name": "",972 "type": "bytes32"973 }974 ],975 "payable": false,976 "type": "function"977 },978 {979 "inputs": [980 {981 "name": "ensAddr",982 "type": "address"983 },984 {985 "name": "node",986 "type": "bytes32"987 }988 ],989 "type": "constructor"990 }991]);992var testRegistrar = fifsRegistrarContract.at(ens.owner(namehash('test')));993var resolverContract = web3.eth.contract([994 {995 "constant": true,996 "inputs": [997 {998 "name": "interfaceID",999 "type": "bytes4"1000 }1001 ],1002 "name": "supportsInterface",1003 "outputs": [1004 {1005 "name": "",1006 "type": "bool"1007 }1008 ],1009 "payable": false,1010 "type": "function"1011 },1012 {1013 "constant": true,1014 "inputs": [1015 {1016 "name": "node",1017 "type": "bytes32"1018 },1019 {1020 "name": "contentTypes",1021 "type": "uint256"1022 }1023 ],1024 "name": "ABI",1025 "outputs": [1026 {1027 "name": "contentType",1028 "type": "uint256"1029 },1030 {1031 "name": "data",1032 "type": "bytes"1033 }1034 ],1035 "payable": false,1036 "type": "function"1037 },1038 {1039 "constant": false,1040 "inputs": [1041 {1042 "name": "node",1043 "type": "bytes32"1044 },1045 {1046 "name": "x",1047 "type": "bytes32"1048 },1049 {1050 "name": "y",1051 "type": "bytes32"1052 }1053 ],1054 "name": "setPubkey",1055 "outputs": [],1056 "payable": false,1057 "type": "function"1058 },1059 {1060 "constant": true,1061 "inputs": [1062 {1063 "name": "node",1064 "type": "bytes32"1065 }1066 ],1067 "name": "content",1068 "outputs": [1069 {1070 "name": "ret",1071 "type": "bytes32"1072 }1073 ],1074 "payable": false,1075 "type": "function"1076 },1077 {1078 "constant": true,1079 "inputs": [1080 {1081 "name": "node",1082 "type": "bytes32"1083 }1084 ],1085 "name": "addr",1086 "outputs": [1087 {1088 "name": "ret",1089 "type": "address"1090 }1091 ],1092 "payable": false,1093 "type": "function"1094 },1095 {1096 "constant": false,1097 "inputs": [1098 {1099 "name": "node",1100 "type": "bytes32"1101 },1102 {1103 "name": "contentType",1104 "type": "uint256"1105 },1106 {1107 "name": "data",1108 "type": "bytes"1109 }1110 ],1111 "name": "setABI",1112 "outputs": [],1113 "payable": false,1114 "type": "function"1115 },1116 {1117 "constant": true,1118 "inputs": [1119 {1120 "name": "node",1121 "type": "bytes32"1122 }1123 ],1124 "name": "name",1125 "outputs": [1126 {1127 "name": "ret",1128 "type": "string"1129 }1130 ],1131 "payable": false,1132 "type": "function"1133 },1134 {1135 "constant": false,1136 "inputs": [1137 {1138 "name": "node",1139 "type": "bytes32"1140 },1141 {1142 "name": "name",1143 "type": "string"1144 }1145 ],1146 "name": "setName",1147 "outputs": [],1148 "payable": false,1149 "type": "function"1150 },1151 {1152 "constant": false,1153 "inputs": [1154 {1155 "name": "node",1156 "type": "bytes32"1157 },1158 {1159 "name": "hash",1160 "type": "bytes32"1161 }1162 ],1163 "name": "setContent",1164 "outputs": [],1165 "payable": false,1166 "type": "function"1167 },1168 {1169 "constant": true,1170 "inputs": [1171 {1172 "name": "node",1173 "type": "bytes32"1174 }1175 ],1176 "name": "pubkey",1177 "outputs": [1178 {1179 "name": "x",1180 "type": "bytes32"1181 },1182 {1183 "name": "y",1184 "type": "bytes32"1185 }1186 ],1187 "payable": false,1188 "type": "function"1189 },1190 {1191 "constant": false,1192 "inputs": [1193 {1194 "name": "node",1195 "type": "bytes32"1196 },1197 {1198 "name": "addr",1199 "type": "address"1200 }1201 ],1202 "name": "setAddr",1203 "outputs": [],1204 "payable": false,1205 "type": "function"1206 },1207 {1208 "inputs": [1209 {1210 "name": "ensAddr",1211 "type": "address"1212 }1213 ],1214 "payable": false,1215 "type": "constructor"1216 },1217 {1218 "anonymous": false,1219 "inputs": [1220 {1221 "indexed": true,1222 "name": "node",1223 "type": "bytes32"1224 },1225 {1226 "indexed": false,1227 "name": "a",1228 "type": "address"1229 }1230 ],1231 "name": "AddrChanged",1232 "type": "event"1233 },1234 {1235 "anonymous": false,1236 "inputs": [1237 {1238 "indexed": true,1239 "name": "node",1240 "type": "bytes32"1241 },1242 {1243 "indexed": false,1244 "name": "hash",1245 "type": "bytes32"1246 }1247 ],1248 "name": "ContentChanged",1249 "type": "event"1250 },1251 {1252 "anonymous": false,1253 "inputs": [1254 {1255 "indexed": true,1256 "name": "node",1257 "type": "bytes32"1258 },1259 {1260 "indexed": false,1261 "name": "name",1262 "type": "string"1263 }1264 ],1265 "name": "NameChanged",1266 "type": "event"1267 },1268 {1269 "anonymous": false,1270 "inputs": [1271 {1272 "indexed": true,1273 "name": "node",1274 "type": "bytes32"1275 },1276 {1277 "indexed": true,1278 "name": "contentType",1279 "type": "uint256"1280 }1281 ],1282 "name": "ABIChanged",1283 "type": "event"1284 },1285 {1286 "anonymous": false,1287 "inputs": [1288 {1289 "indexed": true,1290 "name": "node",1291 "type": "bytes32"1292 },1293 {1294 "indexed": false,1295 "name": "x",1296 "type": "bytes32"1297 },1298 {1299 "indexed": false,1300 "name": "y",1301 "type": "bytes32"1302 }1303 ],1304 "name": "PubkeyChanged",1305 "type": "event"1306 }1307]);1308var publicResolver = resolverContract.at('0x5d20cf83cb385e06d2f2a892f9322cd4933eacdc');1309var reverseRegistrarContract = web3.eth.contract([1310 {1311 "constant": false,1312 "inputs": [1313 {1314 "name": "owner",1315 "type": "address"1316 }1317 ],1318 "name": "claim",1319 "outputs": [1320 {1321 "name": "node",1322 "type": "bytes32"1323 }1324 ],1325 "payable": false,1326 "type": "function"1327 },1328 {1329 "constant": true,1330 "inputs": [],1331 "name": "ens",1332 "outputs": [1333 {1334 "name": "",1335 "type": "address"1336 }1337 ],1338 "payable": false,1339 "type": "function"1340 },1341 {1342 "constant": true,1343 "inputs": [1344 {1345 "name": "addr",1346 "type": "address"1347 }1348 ],1349 "name": "node",1350 "outputs": [1351 {1352 "name": "ret",1353 "type": "bytes32"1354 }1355 ],1356 "payable": false,1357 "type": "function"1358 },1359 {1360 "constant": true,1361 "inputs": [],1362 "name": "rootNode",1363 "outputs": [1364 {1365 "name": "",1366 "type": "bytes32"1367 }1368 ],1369 "payable": false,1370 "type": "function"1371 },1372 {1373 "inputs": [1374 {1375 "name": "ensAddr",1376 "type": "address"1377 },1378 {1379 "name": "node",1380 "type": "bytes32"1381 }1382 ],1383 "payable": false,1384 "type": "constructor"1385 }1386]);1387var reverseRegistrar = reverseRegistrarContract.at(ens.owner(namehash('addr.reverse')));1388function getAddr(name) {1389 var node = namehash(name)1390 var resolverAddress = ens.resolver(node);1391 if (resolverAddress === '0x0000000000000000000000000000000000000000') {1392 return resolverAddress;1393 }1394 return resolverContract.at(resolverAddress).addr(node);1395}1396function getContent(name) {1397 var node = namehash(name)1398 var resolverAddress = ens.resolver(node);1399 if (resolverAddress === '0x0000000000000000000000000000000000000000') {1400 return "0x0000000000000000000000000000000000000000000000000000000000000000";1401 }1402 return resolverContract.at(resolverAddress).content(node);...
auction.d.ts
Source:auction.d.ts
1import { ABIFunc, ABIFuncParamless } from '../AbiFunc';2export interface IAuction {3 releaseDeed: ABIFunc<{ _hash: bytes32 }>;4 getAllowedTime: ABIFunc<{ _hash: bytes32 }, { timestamp: uint256 }>;5 invalidateName: ABIFunc<{ unhashedName: string }>;6 shaBid: ABIFunc<7 { hash: bytes32; owner: address; value: uint256; salt: bytes32 },8 { sealedBid: bytes32 }9 >;10 cancelBid: ABIFunc<{ bidder: address; seal: bytes32 }>;11 entries: ABIFunc<12 { _hash: bytes32 },13 {14 mode: uint8;15 deedAddress: address;16 registrationDate: uint256;17 value: uint256;18 highestBid: uint256;19 }20 >;21 ens: ABIFuncParamless<{ ensAddress: address }>;22 unsealBid: ABIFunc<{ _hash: bytes32; _value: uint256; _salt: bytes32 }>;23 transferRegistrars: ABIFunc<{ _hash: bytes32 }>;24 sealedBids: ABIFunc<{ address_0: address; bytes32_1: bytes32 }, { deedAddress: address }>;25 state: ABIFunc<{ _hash: bytes32 }, { state: uint8 }>;26 transfer: ABIFunc<{ _hash: bytes32; newOwner: address }>;27 isAllowed: ABIFunc<{ _hash: bytes32; _timestamp: uint256 }, { allowed: bool }>;28 finalizeAuction: ABIFunc<{ _hash: bytes32 }>;29 registryStarted: ABIFuncParamless<{ registryStartDate: uint256 }>;30 launchLength: ABIFuncParamless<{ launchLength: uint32 }>;31 newBid: ABIFunc<{ sealedBid: bytes32 }>;32 eraseNode: ABIFunc<{ labels: bytes32[] }>;33 startAuctions: ABIFunc<{ _hashes: bytes32[] }>;34 acceptRegistrarTransfer: ABIFunc<{35 hash: bytes32;36 deed: address;37 registrationDate: uint256;38 }>;39 startAuction: ABIFunc<{ _hash: bytes32 }>;40 rootNode: ABIFuncParamless<{ rootNode: bytes32 }>;41 startAuctionsAndBid: ABIFunc<{ hashes: bytes32[]; sealedBid: bytes32 }>;42}43type bytes32 = any;44type uint256 = any;45type address = any;46type uint8 = any;47type bool = boolean;...
Using AI Code Generation
1const { Synpress } = require('synpress');2const { ethers } = require('ethers');3const { SynthetixJs } = require('synthetix-js');4const { SynthetixJsProvider } = require('synthetix-js-provider');5const { SynthetixJsSigner } = require('synthetix-js-signer');6const synthetixJs = new SynthetixJs({7 provider: new SynthetixJsProvider({8 }),9 signer: new SynthetixJsSigner({10 signer: new ethers.Wallet(process.env.PRIVATE_KEY),11 }),12});13const synpress = new Synpress({14 test: async ({ assert, contract, bytes32 }) => {15 const value = '100';16 const amount = ethers.utils.parseEther(value);17 const synth = bytes32('sUSD');18 const balanceBefore = await contract.balanceOf(synth, process.env.ADDRESS);19 await contract.issueMaxSynths(synth);20 const balanceAfter = await contract.balanceOf(synth, process.env.ADDRESS);21 assert.equal(22 balanceAfter.toString(),23 balanceBefore.add(amount).toString(),24 );25 },26});27synpress.run();28const { Synpress } = require('synpress');29const { ethers } = require('ethers');30const { SynthetixJs } = require('synthetix-js');31const { SynthetixJsProvider } = require('synthetix-js-provider');32const { SynthetixJsSigner } = require('synthetix-js-signer');33const synthetixJs = new SynthetixJs({34 provider: new SynthetixJsProvider({35 }),36 signer: new SynthetixJsSigner({37 signer: new ethers.Wallet(process.env.PRIVATE_KEY),38 }),39});
Using AI Code Generation
1const { bytes32 } = require('synpress');2const { toBytes32 } = bytes32;3const { bytes32 } = require('synpress');4const { toBytes32 } = bytes32;5const { bytes32 } = require('synpress');6const { toBytes32 } = bytes32;7const { bytes32 } = require('synpress');8const { toBytes32 } = bytes32;9const { bytes32 } = require('synpress');10const { toBytes32 } = bytes32;11const { bytes32 } = require('synpress');12const { toBytes32 } = bytes32;13const { bytes32 } = require('synpress');14const { toBytes32 } = bytes32;15const { bytes32 } = require('synpress');16const { toBytes32 } = bytes32;17const { bytes32 } = require('synpress');18const { toBytes32 } = bytes32;19const { bytes32 } = require('synpress');20const { toBytes32 } = bytes32;21const { bytes32 } = require('synpress');22const { toBytes32 } = bytes32;23const { bytes32 } = require('synpress');24const { toBytes32 } = bytes32;25const { bytes32 } = require('synpress');26const { toBytes32 } = bytes32;27const { bytes32 } = require('synpress');28const { toBytes32 }
Using AI Code Generation
1var synpress = require('synpress');2var bytes32 = synpress.bytes32;3var abi = require('ethereumjs-abi');4var bytes32 = abi.rawEncode(['bytes32'], ['hello world']);5var Web3Utils = require('web3-utils');6var bytes32 = Web3Utils.fromAscii('hello world');7var Web3EthAbi = require('web3-eth-abi');8var bytes32 = Web3EthAbi.encodeParameter('bytes32', 'hello world');9var Web3EthAbi = require('web3-eth-abi');10var bytes32 = Web3EthAbi.encodeParameter('bytes32', 'hello world');11var ethers = require('ethers');12var bytes32 = ethers.utils.formatBytes32String('hello world');13var ethereumjsUtil = require('ethereumjs-util');14var bytes32 = ethereumjsUtil.bufferToHex(ethereumjsUtil.toBuffer('hello world'));15var ethereumjsUtil = require('ethereumjs-util');16var bytes32 = ethereumjsUtil.bufferToHex(ethereumjsUtil.toBuffer('hello world'));17var ethereumjsUtil = require('ethereumjs-util');18var bytes32 = ethereumjsUtil.bufferToHex(ethereumjsUtil.toBuffer('hello world'));19var ethereumjsUtil = require('ethereumjs-util');20var bytes32 = ethereumjsUtil.bufferToHex(ethereumjsUtil.toBuffer('hello world'));21var ethereumjsUtil = require('ethereumjs-util');22var bytes32 = ethereumjsUtil.bufferToHex(ethereumjsUtil.toBuffer('hello world'));23var ethereumjsUtil = require('ethereumjs-util');24var bytes32 = ethereumjsUtil.bufferToHex(ethereumjsUtil.toBuffer('hello world'));
Using AI Code Generation
1var bytes32 = require('synpress').bytes32;2var synthetix = require('synpress').synthetix;3var web3 = require('synpress').web3;4var synthetix = require('synpress').synthetix;5var web3 = require('synpress').web3;6var synthetix = require('synpress').synthetix;7var web3 = require('synpress').web3;8var synthetix = require('synpress').synthetix;9var web3 = require('synpress').web3;10var synthetix = require('synpress').synthetix;11var web3 = require('synpress').web3;12var synthetix = require('synpress').synthetix;13var web3 = require('synpress').web3;14var synthetix = require('synpress').synthetix;15var web3 = require('synpress').web3;16var synthetix = require('synpress').synthetix;17var web3 = require('synpress').web3;
Using AI Code Generation
1const synthetixio = require('synthetixio-synpress');2async function main() {3 const synth = await synthetixio.getSynth('sETH');4 const price = await synthetixio.getSynthPrice(synth);5 console.log(price);6}7main();8const synthetixio = require('synthetixio-synpress');9async function main() {10 const synth = await synthetixio.getSynth('sETH');11 const price = await synthetixio.getSynthPrice(synth);12 console.log(price);13}14main();15const synthetixio = require('synthetixio-synpress');16async function main() {17 const synth = await synthetixio.getSynth('sETH');18 const price = await synthetixio.getSynthPrice(synth);19 console.log(price);20}21main();22const synthetixio = require('synthetixio-synpress');23async function main() {24 const synth = await synthetixio.getSynth('sETH');25 const price = await synthetixio.getSynthPrice(synth);26 console.log(price);27}28main();29const synthetixio = require('synthetixio-synpress');30async function main() {31 const synth = await synthetixio.getSynth('sETH');32 const price = await synthetixio.getSynthPrice(synth);33 console.log(price);34}35main();36const synthetixio = require('synthetixio-synpress');37async function main() {38 const synth = await synthetixio.getSynth('sETH');39 const price = await synthetixio.getSynthPrice(synth);40 console.log(price);41}42main();
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!