github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/poll/nativeStaking.abi.go (about) 1 // Copyright (c) 2019 IoTeX Foundation 2 // This source code is provided 'as is' and no warranties are given as to title or non-infringement, merchantability 3 // or fitness for purpose and, to the extent permitted by law, all liability for your use of the code is disclaimed. 4 // This source code is governed by Apache License 2.0 that can be found in the LICENSE file. 5 6 package poll 7 8 // NsAbi is the ABI of native staking contract 9 var NsAbi = ` 10 [ 11 { 12 "constant": false, 13 "inputs": [ 14 { 15 "name": "_pyggIndex", 16 "type": "uint256" 17 }, 18 { 19 "name": "_data", 20 "type": "bytes" 21 } 22 ], 23 "name": "withdraw", 24 "outputs": [], 25 "payable": false, 26 "stateMutability": "nonpayable", 27 "type": "function" 28 }, 29 { 30 "constant": false, 31 "inputs": [ 32 { 33 "name": "_canName", 34 "type": "bytes12" 35 }, 36 { 37 "name": "_stakeDuration", 38 "type": "uint256" 39 }, 40 { 41 "name": "_nonDecay", 42 "type": "bool" 43 }, 44 { 45 "name": "_data", 46 "type": "bytes" 47 } 48 ], 49 "name": "createPygg", 50 "outputs": [ 51 { 52 "name": "", 53 "type": "uint256" 54 } 55 ], 56 "payable": true, 57 "stateMutability": "payable", 58 "type": "function" 59 }, 60 { 61 "constant": true, 62 "inputs": [], 63 "name": "maxPyggsPerAddr", 64 "outputs": [ 65 { 66 "name": "", 67 "type": "uint256" 68 } 69 ], 70 "payable": false, 71 "stateMutability": "view", 72 "type": "function" 73 }, 74 { 75 "constant": false, 76 "inputs": [ 77 { 78 "name": "addrs", 79 "type": "address[]" 80 } 81 ], 82 "name": "removeAddressesFromWhitelist", 83 "outputs": [ 84 { 85 "name": "success", 86 "type": "bool" 87 } 88 ], 89 "payable": false, 90 "stateMutability": "nonpayable", 91 "type": "function" 92 }, 93 { 94 "constant": false, 95 "inputs": [ 96 { 97 "name": "addr", 98 "type": "address" 99 } 100 ], 101 "name": "removeAddressFromWhitelist", 102 "outputs": [ 103 { 104 "name": "success", 105 "type": "bool" 106 } 107 ], 108 "payable": false, 109 "stateMutability": "nonpayable", 110 "type": "function" 111 }, 112 { 113 "constant": true, 114 "inputs": [ 115 { 116 "name": "_address", 117 "type": "address" 118 } 119 ], 120 "name": "isOwner", 121 "outputs": [ 122 { 123 "name": "", 124 "type": "bool" 125 } 126 ], 127 "payable": false, 128 "stateMutability": "view", 129 "type": "function" 130 }, 131 { 132 "constant": false, 133 "inputs": [], 134 "name": "unpause", 135 "outputs": [], 136 "payable": false, 137 "stateMutability": "nonpayable", 138 "type": "function" 139 }, 140 { 141 "constant": true, 142 "inputs": [ 143 { 144 "name": "", 145 "type": "address" 146 }, 147 { 148 "name": "", 149 "type": "uint256" 150 } 151 ], 152 "name": "stakeholders", 153 "outputs": [ 154 { 155 "name": "", 156 "type": "uint256" 157 } 158 ], 159 "payable": false, 160 "stateMutability": "view", 161 "type": "function" 162 }, 163 { 164 "constant": true, 165 "inputs": [], 166 "name": "paused", 167 "outputs": [ 168 { 169 "name": "", 170 "type": "bool" 171 } 172 ], 173 "payable": false, 174 "stateMutability": "view", 175 "type": "function" 176 }, 177 { 178 "constant": true, 179 "inputs": [], 180 "name": "minStakeDuration", 181 "outputs": [ 182 { 183 "name": "", 184 "type": "uint256" 185 } 186 ], 187 "payable": false, 188 "stateMutability": "view", 189 "type": "function" 190 }, 191 { 192 "constant": true, 193 "inputs": [], 194 "name": "secondsPerDay", 195 "outputs": [ 196 { 197 "name": "", 198 "type": "uint256" 199 } 200 ], 201 "payable": false, 202 "stateMutability": "view", 203 "type": "function" 204 }, 205 { 206 "constant": true, 207 "inputs": [ 208 { 209 "name": "_prevIndex", 210 "type": "uint256" 211 }, 212 { 213 "name": "_limit", 214 "type": "uint256" 215 } 216 ], 217 "name": "getActivePyggCreateTimes", 218 "outputs": [ 219 { 220 "name": "count", 221 "type": "uint256" 222 }, 223 { 224 "name": "indexes", 225 "type": "uint256[]" 226 }, 227 { 228 "name": "createTimes", 229 "type": "uint256[]" 230 } 231 ], 232 "payable": false, 233 "stateMutability": "view", 234 "type": "function" 235 }, 236 { 237 "constant": false, 238 "inputs": [ 239 { 240 "name": "_pyggIndex", 241 "type": "uint256" 242 }, 243 { 244 "name": "_data", 245 "type": "bytes" 246 } 247 ], 248 "name": "storeToPygg", 249 "outputs": [], 250 "payable": true, 251 "stateMutability": "payable", 252 "type": "function" 253 }, 254 { 255 "constant": true, 256 "inputs": [], 257 "name": "maxStakeDuration", 258 "outputs": [ 259 { 260 "name": "", 261 "type": "uint256" 262 } 263 ], 264 "payable": false, 265 "stateMutability": "view", 266 "type": "function" 267 }, 268 { 269 "constant": false, 270 "inputs": [ 271 { 272 "name": "_pyggIndex", 273 "type": "uint256" 274 }, 275 { 276 "name": "_stakeDuration", 277 "type": "uint256" 278 }, 279 { 280 "name": "_nonDecay", 281 "type": "bool" 282 }, 283 { 284 "name": "_data", 285 "type": "bytes" 286 } 287 ], 288 "name": "restake", 289 "outputs": [], 290 "payable": false, 291 "stateMutability": "nonpayable", 292 "type": "function" 293 }, 294 { 295 "constant": false, 296 "inputs": [ 297 { 298 "name": "addr", 299 "type": "address" 300 } 301 ], 302 "name": "addAddressToWhitelist", 303 "outputs": [ 304 { 305 "name": "success", 306 "type": "bool" 307 } 308 ], 309 "payable": false, 310 "stateMutability": "nonpayable", 311 "type": "function" 312 }, 313 { 314 "constant": false, 315 "inputs": [ 316 { 317 "name": "_pyggIndex", 318 "type": "uint256" 319 }, 320 { 321 "name": "_newOwner", 322 "type": "address" 323 }, 324 { 325 "name": "_data", 326 "type": "bytes" 327 } 328 ], 329 "name": "transferOwnershipOfPygg", 330 "outputs": [], 331 "payable": false, 332 "stateMutability": "nonpayable", 333 "type": "function" 334 }, 335 { 336 "constant": true, 337 "inputs": [], 338 "name": "totalStaked", 339 "outputs": [ 340 { 341 "name": "", 342 "type": "uint256" 343 } 344 ], 345 "payable": false, 346 "stateMutability": "view", 347 "type": "function" 348 }, 349 { 350 "constant": false, 351 "inputs": [], 352 "name": "pause", 353 "outputs": [], 354 "payable": false, 355 "stateMutability": "nonpayable", 356 "type": "function" 357 }, 358 { 359 "constant": true, 360 "inputs": [], 361 "name": "owner", 362 "outputs": [ 363 { 364 "name": "", 365 "type": "address" 366 } 367 ], 368 "payable": false, 369 "stateMutability": "view", 370 "type": "function" 371 }, 372 { 373 "constant": true, 374 "inputs": [ 375 { 376 "name": "_prevIndex", 377 "type": "uint256" 378 }, 379 { 380 "name": "_limit", 381 "type": "uint256" 382 } 383 ], 384 "name": "getActivePyggIdx", 385 "outputs": [ 386 { 387 "name": "count", 388 "type": "uint256" 389 }, 390 { 391 "name": "indexes", 392 "type": "uint256[]" 393 } 394 ], 395 "payable": false, 396 "stateMutability": "view", 397 "type": "function" 398 }, 399 { 400 "constant": true, 401 "inputs": [ 402 { 403 "name": "", 404 "type": "address" 405 } 406 ], 407 "name": "whitelist", 408 "outputs": [ 409 { 410 "name": "", 411 "type": "bool" 412 } 413 ], 414 "payable": false, 415 "stateMutability": "view", 416 "type": "function" 417 }, 418 { 419 "constant": true, 420 "inputs": [], 421 "name": "unStakeDuration", 422 "outputs": [ 423 { 424 "name": "", 425 "type": "uint256" 426 } 427 ], 428 "payable": false, 429 "stateMutability": "view", 430 "type": "function" 431 }, 432 { 433 "constant": false, 434 "inputs": [ 435 { 436 "name": "_pyggIndex", 437 "type": "uint256" 438 }, 439 { 440 "name": "_data", 441 "type": "bytes" 442 } 443 ], 444 "name": "unstake", 445 "outputs": [], 446 "payable": false, 447 "stateMutability": "nonpayable", 448 "type": "function" 449 }, 450 { 451 "constant": true, 452 "inputs": [ 453 { 454 "name": "", 455 "type": "uint256" 456 } 457 ], 458 "name": "pyggs", 459 "outputs": [ 460 { 461 "name": "canName", 462 "type": "bytes12" 463 }, 464 { 465 "name": "stakedAmount", 466 "type": "uint256" 467 }, 468 { 469 "name": "stakeDuration", 470 "type": "uint256" 471 }, 472 { 473 "name": "stakeStartTime", 474 "type": "uint256" 475 }, 476 { 477 "name": "nonDecay", 478 "type": "bool" 479 }, 480 { 481 "name": "unstakeStartTime", 482 "type": "uint256" 483 }, 484 { 485 "name": "pyggOwner", 486 "type": "address" 487 }, 488 { 489 "name": "createTime", 490 "type": "uint256" 491 }, 492 { 493 "name": "prev", 494 "type": "uint256" 495 }, 496 { 497 "name": "next", 498 "type": "uint256" 499 } 500 ], 501 "payable": false, 502 "stateMutability": "view", 503 "type": "function" 504 }, 505 { 506 "constant": true, 507 "inputs": [ 508 { 509 "name": "_owner", 510 "type": "address" 511 } 512 ], 513 "name": "getPyggIndexesByAddress", 514 "outputs": [ 515 { 516 "name": "", 517 "type": "uint256[]" 518 } 519 ], 520 "payable": false, 521 "stateMutability": "view", 522 "type": "function" 523 }, 524 { 525 "constant": false, 526 "inputs": [ 527 { 528 "name": "_pyggIndex", 529 "type": "uint256" 530 }, 531 { 532 "name": "_canName", 533 "type": "bytes12" 534 }, 535 { 536 "name": "_data", 537 "type": "bytes" 538 } 539 ], 540 "name": "revote", 541 "outputs": [], 542 "payable": false, 543 "stateMutability": "nonpayable", 544 "type": "function" 545 }, 546 { 547 "constant": true, 548 "inputs": [ 549 { 550 "name": "_prevIndex", 551 "type": "uint256" 552 }, 553 { 554 "name": "_limit", 555 "type": "uint256" 556 } 557 ], 558 "name": "getActivePyggs", 559 "outputs": [ 560 { 561 "name": "count", 562 "type": "uint256" 563 }, 564 { 565 "name": "indexes", 566 "type": "uint256[]" 567 }, 568 { 569 "name": "stakeStartTimes", 570 "type": "uint256[]" 571 }, 572 { 573 "name": "stakeDurations", 574 "type": "uint256[]" 575 }, 576 { 577 "name": "decays", 578 "type": "bool[]" 579 }, 580 { 581 "name": "stakedAmounts", 582 "type": "uint256[]" 583 }, 584 { 585 "name": "canNames", 586 "type": "bytes12[]" 587 }, 588 { 589 "name": "owners", 590 "type": "address[]" 591 } 592 ], 593 "payable": false, 594 "stateMutability": "view", 595 "type": "function" 596 }, 597 { 598 "constant": false, 599 "inputs": [ 600 { 601 "name": "addrs", 602 "type": "address[]" 603 } 604 ], 605 "name": "addAddressesToWhitelist", 606 "outputs": [ 607 { 608 "name": "success", 609 "type": "bool" 610 } 611 ], 612 "payable": false, 613 "stateMutability": "nonpayable", 614 "type": "function" 615 }, 616 { 617 "constant": true, 618 "inputs": [], 619 "name": "minStakeAmount", 620 "outputs": [ 621 { 622 "name": "", 623 "type": "uint256" 624 } 625 ], 626 "payable": false, 627 "stateMutability": "view", 628 "type": "function" 629 }, 630 { 631 "constant": false, 632 "inputs": [ 633 { 634 "name": "_newOwner", 635 "type": "address" 636 } 637 ], 638 "name": "transferOwnership", 639 "outputs": [], 640 "payable": false, 641 "stateMutability": "nonpayable", 642 "type": "function" 643 }, 644 { 645 "inputs": [ 646 { 647 "name": "_minStakeAmount", 648 "type": "uint256" 649 }, 650 { 651 "name": "_maxPyggsPerAddr", 652 "type": "uint256" 653 } 654 ], 655 "payable": false, 656 "stateMutability": "nonpayable", 657 "type": "constructor" 658 }, 659 { 660 "anonymous": false, 661 "inputs": [ 662 { 663 "indexed": false, 664 "name": "pyggIndex", 665 "type": "uint256" 666 }, 667 { 668 "indexed": false, 669 "name": "canName", 670 "type": "bytes12" 671 }, 672 { 673 "indexed": false, 674 "name": "amount", 675 "type": "uint256" 676 }, 677 { 678 "indexed": false, 679 "name": "stakeDuration", 680 "type": "uint256" 681 }, 682 { 683 "indexed": false, 684 "name": "stakeStartTime", 685 "type": "uint256" 686 }, 687 { 688 "indexed": false, 689 "name": "nonDecay", 690 "type": "bool" 691 }, 692 { 693 "indexed": false, 694 "name": "pyggOwner", 695 "type": "address" 696 }, 697 { 698 "indexed": false, 699 "name": "data", 700 "type": "bytes" 701 } 702 ], 703 "name": "PyggCreated", 704 "type": "event" 705 }, 706 { 707 "anonymous": false, 708 "inputs": [ 709 { 710 "indexed": false, 711 "name": "pyggIndex", 712 "type": "uint256" 713 }, 714 { 715 "indexed": false, 716 "name": "canName", 717 "type": "bytes12" 718 }, 719 { 720 "indexed": false, 721 "name": "amount", 722 "type": "uint256" 723 }, 724 { 725 "indexed": false, 726 "name": "stakeDuration", 727 "type": "uint256" 728 }, 729 { 730 "indexed": false, 731 "name": "stakeStartTime", 732 "type": "uint256" 733 }, 734 { 735 "indexed": false, 736 "name": "nonDecay", 737 "type": "bool" 738 }, 739 { 740 "indexed": false, 741 "name": "pyggOwner", 742 "type": "address" 743 }, 744 { 745 "indexed": false, 746 "name": "data", 747 "type": "bytes" 748 } 749 ], 750 "name": "PyggUpdated", 751 "type": "event" 752 }, 753 { 754 "anonymous": false, 755 "inputs": [ 756 { 757 "indexed": false, 758 "name": "pyggIndex", 759 "type": "uint256" 760 }, 761 { 762 "indexed": false, 763 "name": "canName", 764 "type": "bytes12" 765 }, 766 { 767 "indexed": false, 768 "name": "amount", 769 "type": "uint256" 770 }, 771 { 772 "indexed": false, 773 "name": "data", 774 "type": "bytes" 775 } 776 ], 777 "name": "PyggUnstake", 778 "type": "event" 779 }, 780 { 781 "anonymous": false, 782 "inputs": [ 783 { 784 "indexed": false, 785 "name": "pyggIndex", 786 "type": "uint256" 787 }, 788 { 789 "indexed": false, 790 "name": "canName", 791 "type": "bytes12" 792 }, 793 { 794 "indexed": false, 795 "name": "amount", 796 "type": "uint256" 797 }, 798 { 799 "indexed": false, 800 "name": "data", 801 "type": "bytes" 802 } 803 ], 804 "name": "PyggWithdraw", 805 "type": "event" 806 }, 807 { 808 "anonymous": false, 809 "inputs": [ 810 { 811 "indexed": false, 812 "name": "addr", 813 "type": "address" 814 } 815 ], 816 "name": "WhitelistedAddressAdded", 817 "type": "event" 818 }, 819 { 820 "anonymous": false, 821 "inputs": [ 822 { 823 "indexed": false, 824 "name": "addr", 825 "type": "address" 826 } 827 ], 828 "name": "WhitelistedAddressRemoved", 829 "type": "event" 830 }, 831 { 832 "anonymous": false, 833 "inputs": [], 834 "name": "Pause", 835 "type": "event" 836 }, 837 { 838 "anonymous": false, 839 "inputs": [], 840 "name": "Unpause", 841 "type": "event" 842 } 843 ] 844 `