PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@celo/contractkit/lib/generated
Просмотр файла: Election.js
"use strict";
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.newElection = exports.ABI = void 0;
exports.ABI = [
{
inputs: [{ internalType: 'bool', name: 'test', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'constructor',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'electabilityThreshold',
type: 'uint256',
},
],
name: 'ElectabilityThresholdSet',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint256', name: 'min', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'max', type: 'uint256' },
],
name: 'ElectableValidatorsSet',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'group', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'EpochRewardsDistributedToVoters',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'maxNumGroupsVotedFor',
type: 'uint256',
},
],
name: 'MaxNumGroupsVotedForSet',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'previousOwner',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'registryAddress',
type: 'address',
},
],
name: 'RegistrySet',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'account',
type: 'address',
},
{ indexed: true, internalType: 'address', name: 'group', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'units', type: 'uint256' },
],
name: 'ValidatorGroupActiveVoteRevoked',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: true, internalType: 'address', name: 'group', type: 'address' }],
name: 'ValidatorGroupMarkedEligible',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: true, internalType: 'address', name: 'group', type: 'address' }],
name: 'ValidatorGroupMarkedIneligible',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'account',
type: 'address',
},
{ indexed: true, internalType: 'address', name: 'group', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'ValidatorGroupPendingVoteRevoked',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'account',
type: 'address',
},
{ indexed: true, internalType: 'address', name: 'group', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'units', type: 'uint256' },
],
name: 'ValidatorGroupVoteActivated',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'account',
type: 'address',
},
{ indexed: true, internalType: 'address', name: 'group', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'ValidatorGroupVoteCast',
type: 'event',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'sender', type: 'address' },
{ internalType: 'bytes', name: 'blsKey', type: 'bytes' },
{ internalType: 'bytes', name: 'blsPop', type: 'bytes' },
],
name: 'checkProofOfPossession',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'electabilityThreshold',
outputs: [{ internalType: 'uint256', name: 'value', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'electableValidators',
outputs: [
{ internalType: 'uint256', name: 'min', type: 'uint256' },
{ internalType: 'uint256', name: 'max', type: 'uint256' },
],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'uint256', name: 'aNumerator', type: 'uint256' },
{ internalType: 'uint256', name: 'aDenominator', type: 'uint256' },
{ internalType: 'uint256', name: 'bNumerator', type: 'uint256' },
{ internalType: 'uint256', name: 'bDenominator', type: 'uint256' },
{ internalType: 'uint256', name: 'exponent', type: 'uint256' },
{ internalType: 'uint256', name: '_decimals', type: 'uint256' },
],
name: 'fractionMulExp',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'bytes', name: 'header', type: 'bytes' }],
name: 'getBlockNumberFromHeader',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getEpochNumber',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' }],
name: 'getEpochNumberOfBlock',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getEpochSize',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' }],
name: 'getParentSealBitmap',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'bytes', name: 'header', type: 'bytes' }],
name: 'getVerifiedSealBitmapFromHeader',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'bytes', name: 'header', type: 'bytes' }],
name: 'hashHeader',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'initialized',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'isOwner',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'maxNumGroupsVotedFor',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' }],
name: 'minQuorumSize',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'minQuorumSizeInCurrentSet',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'numberValidatorsInCurrentSet',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' }],
name: 'numberValidatorsInSet',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'registry',
outputs: [{ internalType: 'contract IRegistry', name: '', type: 'address' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [],
name: 'renounceOwnership',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [{ internalType: 'address', name: 'registryAddress', type: 'address' }],
name: 'setRegistry',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
name: 'validatorSignerAddressFromCurrentSet',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'uint256', name: 'index', type: 'uint256' },
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
],
name: 'validatorSignerAddressFromSet',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getVersionNumber',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
payable: false,
stateMutability: 'pure',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'registryAddress', type: 'address' },
{
internalType: 'uint256',
name: 'minElectableValidators',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'maxElectableValidators',
type: 'uint256',
},
{ internalType: 'uint256', name: '_maxNumGroupsVotedFor', type: 'uint256' },
{
internalType: 'uint256',
name: '_electabilityThreshold',
type: 'uint256',
},
],
name: 'initialize',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'uint256', name: 'min', type: 'uint256' },
{ internalType: 'uint256', name: 'max', type: 'uint256' },
],
name: 'setElectableValidators',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getElectableValidators',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [{ internalType: 'uint256', name: '_maxNumGroupsVotedFor', type: 'uint256' }],
name: 'setMaxNumGroupsVotedFor',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [{ internalType: 'uint256', name: 'threshold', type: 'uint256' }],
name: 'setElectabilityThreshold',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getElectabilityThreshold',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'address', name: 'lesser', type: 'address' },
{ internalType: 'address', name: 'greater', type: 'address' },
],
name: 'vote',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'activate',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'account', type: 'address' },
],
name: 'activateForAccount',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'account', type: 'address' },
{ internalType: 'address', name: 'group', type: 'address' },
],
name: 'hasActivatablePendingVotes',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'address', name: 'lesser', type: 'address' },
{ internalType: 'address', name: 'greater', type: 'address' },
{ internalType: 'uint256', name: 'index', type: 'uint256' },
],
name: 'revokePending',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'lesser', type: 'address' },
{ internalType: 'address', name: 'greater', type: 'address' },
{ internalType: 'uint256', name: 'index', type: 'uint256' },
],
name: 'revokeAllActive',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'address', name: 'lesser', type: 'address' },
{ internalType: 'address', name: 'greater', type: 'address' },
{ internalType: 'uint256', name: 'index', type: 'uint256' },
],
name: 'revokeActive',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'getTotalVotesByAccount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'account', type: 'address' },
],
name: 'getPendingVotesForGroupByAccount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'account', type: 'address' },
],
name: 'getActiveVotesForGroupByAccount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'account', type: 'address' },
],
name: 'getTotalVotesForGroupByAccount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'account', type: 'address' },
],
name: 'getActiveVoteUnitsForGroupByAccount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'getActiveVoteUnitsForGroup',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'getTotalVotesForGroup',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'getActiveVotesForGroup',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'getPendingVotesForGroup',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'getGroupEligibility',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'uint256', name: 'totalEpochRewards', type: 'uint256' },
{ internalType: 'uint256[]', name: 'uptimes', type: 'uint256[]' },
],
name: 'getGroupEpochRewards',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'address', name: 'lesser', type: 'address' },
{ internalType: 'address', name: 'greater', type: 'address' },
],
name: 'distributeEpochRewards',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'markGroupIneligible',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'address', name: 'lesser', type: 'address' },
{ internalType: 'address', name: 'greater', type: 'address' },
],
name: 'markGroupEligible',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'getGroupsVotedForByAccount',
outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ internalType: 'address', name: 'group', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'canReceiveVotes',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ internalType: 'address', name: 'group', type: 'address' }],
name: 'getNumVotesReceivable',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getTotalVotes',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getActiveVotes',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getEligibleValidatorGroups',
outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getTotalVotesForEligibleValidatorGroups',
outputs: [
{ internalType: 'address[]', name: 'groups', type: 'address[]' },
{ internalType: 'uint256[]', name: 'values', type: 'uint256[]' },
],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'electValidatorSigners',
outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{
internalType: 'uint256',
name: 'minElectableValidators',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'maxElectableValidators',
type: 'uint256',
},
],
name: 'electNValidatorSigners',
outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'getCurrentValidatorSigners',
outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [
{ internalType: 'address', name: 'account', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'address[]', name: 'lessers', type: 'address[]' },
{ internalType: 'address[]', name: 'greaters', type: 'address[]' },
{ internalType: 'uint256[]', name: 'indices', type: 'uint256[]' },
],
name: 'forceDecrementVotes',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
];
function newElection(web3, address) {
return new web3.eth.Contract(exports.ABI, address);
}
exports.newElection = newElection;
//# sourceMappingURL=Election.js.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!