UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

315 lines (314 loc) 10.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoteEscrowAccountAbi = void 0; /** * **VoteEscrowAccount ABI v2.2** * * This ABI is used for interacting with the `VoteEscrowAccount` contract on the TVM blockchain. * @see [VoteEscrowAccount](https://github.com/broxus/flatqube-dao-contracts/blob/master/build/VoteEscrowAccount.abi.json) */ exports.VoteEscrowAccountAbi = { 'ABI version': 2, version: '2.2', header: ['time'], functions: [ { name: 'constructor', inputs: [], outputs: [], }, { name: 'upgrade', inputs: [ { name: 'new_code', type: 'cell' }, { name: 'new_version', type: 'uint32' }, { components: [ { name: 'call_id', type: 'uint32' }, { name: 'nonce', type: 'uint32' }, { name: 'send_gas_to', type: 'address' }, ], name: 'meta', type: 'tuple', }, ], outputs: [], }, { name: 'onDeployRetry', id: '0x23DC4360', inputs: [ { name: 'value0', type: 'cell' }, { name: 'value1', type: 'cell' }, { name: 'sendGasTo', type: 'address' }, ], outputs: [], }, { name: 'processVoteEpoch', inputs: [ { name: 'voteEpoch', type: 'uint32' }, { name: 'votes', type: 'map(address,uint128)' }, { components: [ { name: 'call_id', type: 'uint32' }, { name: 'nonce', type: 'uint32' }, { name: 'send_gas_to', type: 'address' }, ], name: 'meta', type: 'tuple', }, ], outputs: [], }, { name: 'processWithdraw', inputs: [ { components: [ { name: 'call_id', type: 'uint32' }, { name: 'nonce', type: 'uint32' }, { name: 'send_gas_to', type: 'address' }, ], name: 'meta', type: 'tuple', }, ], outputs: [], }, { name: 'processDeposit', inputs: [ { name: 'deposit_nonce', type: 'uint32' }, { name: 'qube_amount', type: 'uint128' }, { name: 've_amount', type: 'uint128' }, { name: 'lock_time', type: 'uint32' }, { components: [ { name: 'call_id', type: 'uint32' }, { name: 'nonce', type: 'uint32' }, { name: 'send_gas_to', type: 'address' }, ], name: 'meta', type: 'tuple', }, ], outputs: [], }, { name: 'getVeAverage', inputs: [ { name: 'callback_receiver', type: 'address' }, { name: 'callback_nonce', type: 'uint32' }, { name: 'sync_time', type: 'uint32' }, ], outputs: [], }, { name: 'lockedTokens', inputs: [{ name: 'answerId', type: 'uint32' }], outputs: [{ name: 'value0', type: 'uint128' }], }, { name: 'propose', inputs: [ { name: 'proposal_data', type: 'cell' }, { name: 'threshold', type: 'uint128' }, ], outputs: [], }, { name: 'onProposalDeployed', inputs: [ { name: 'nonce', type: 'uint32' }, { name: 'proposal_id', type: 'uint32' }, { name: 'answer_id', type: 'uint32' }, ], outputs: [], }, { name: 'castVote', inputs: [ { name: 'proposal_id', type: 'uint32' }, { name: 'support', type: 'bool' }, { name: 'reason', type: 'string' }, ], outputs: [], }, { name: 'voteCasted', inputs: [{ name: 'proposal_id', type: 'uint32' }], outputs: [], }, { name: 'rejectVote', inputs: [{ name: 'proposal_id', type: 'uint32' }], outputs: [], }, { name: 'tryUnlockVoteTokens', inputs: [{ name: 'proposal_id', type: 'uint32' }], outputs: [], }, { name: 'unlockVoteTokens', inputs: [ { name: 'proposal_id', type: 'uint32' }, { name: 'success', type: 'bool' }, ], outputs: [], }, { name: 'tryUnlockCastedVotes', inputs: [{ name: 'proposal_ids', type: 'uint32[]' }], outputs: [], }, { name: 'unlockCastedVote', inputs: [ { name: 'proposal_id', type: 'uint32' }, { name: 'success', type: 'bool' }, ], outputs: [], }, { name: 'getDetails', inputs: [{ name: 'answerId', type: 'uint32' }], outputs: [ { name: '_current_version', type: 'uint32' }, { name: '_voteEscrow', type: 'address' }, { name: '_user', type: 'address' }, { name: '_qubeBalance', type: 'uint128' }, { name: '_veQubeBalance', type: 'uint128' }, { name: '_veQubeAverage', type: 'uint128' }, { name: '_veQubeAveragePeriod', type: 'uint32' }, { name: '_unlockedQubes', type: 'uint128' }, { name: '_lastUpdateTime', type: 'uint32' }, { name: '_lastEpochVoted', type: 'uint32' }, { name: '_activeDeposits', type: 'uint32' }, ], }, { name: 'calculateMinGas', inputs: [{ name: 'answerId', type: 'uint32' }], outputs: [{ name: 'min_gas', type: 'uint128' }], }, { name: 'calculateVeAverage', inputs: [], outputs: [ { name: '_qubeBalance', type: 'uint128' }, { name: '_veQubeBalance', type: 'uint128' }, { name: '_expiredVeQubes', type: 'uint128' }, { name: '_unlockedQubes', type: 'uint128' }, { name: '_veQubeAverage', type: 'uint128' }, { name: '_veQubeAveragePeriod', type: 'uint128' }, ], }, { name: 'deposits', inputs: [], outputs: [ { components: [ { name: 'amount', type: 'uint128' }, { name: 'veAmount', type: 'uint128' }, { name: 'createdAt', type: 'uint32' }, { name: 'lockTime', type: 'uint32' }, ], name: 'deposits', type: 'map(uint64,tuple)', }, ], }, { name: 'created_proposals', inputs: [], outputs: [{ name: 'created_proposals', type: 'map(uint32,uint128)' }], }, { name: '_tmp_proposals', inputs: [], outputs: [{ name: '_tmp_proposals', type: 'map(uint32,uint128)' }], }, { name: 'casted_votes', inputs: [], outputs: [{ name: 'casted_votes', type: 'map(uint32,bool)' }], }, ], data: [], events: [ { name: 'VoteCast', inputs: [ { name: 'proposal_id', type: 'uint32' }, { name: 'support', type: 'bool' }, { name: 'votes', type: 'uint128' }, { name: 'reason', type: 'string' }, ], outputs: [], }, { name: 'UnlockVotes', inputs: [ { name: 'proposal_id', type: 'uint32' }, { name: 'value', type: 'uint128' }, ], outputs: [], }, { name: 'UnlockCastedVotes', inputs: [{ name: 'proposal_id', type: 'uint32' }], outputs: [], }, { name: 'ProposalCreationRejected', inputs: [ { name: 'votes_available', type: 'uint128' }, { name: 'threshold', type: 'uint128' }, ], outputs: [], }, { name: 'ProposalCodeUpgraded', inputs: [ { name: 'votes_available', type: 'uint128' }, { name: 'threshold', type: 'uint128' }, ], outputs: [], }, ], fields: [ { name: '_pubkey', type: 'uint256' }, { name: '_timestamp', type: 'uint64' }, { name: '_constructorFlag', type: 'bool' }, { name: 'current_version', type: 'uint32' }, { name: 'voteEscrow', type: 'address' }, { name: 'user', type: 'address' }, { name: 'dao_root', type: 'address' }, { name: '_proposal_nonce', type: 'uint32' }, { name: 'platform_code', type: 'cell' }, { name: 'qubeBalance', type: 'uint128' }, { name: 'veQubeBalance', type: 'uint128' }, { name: 'unlockedQubes', type: 'uint128' }, { name: 'veQubeAverage', type: 'uint128' }, { name: 'veQubeAveragePeriod', type: 'uint32' }, { name: 'lastUpdateTime', type: 'uint32' }, { name: 'lastEpochVoted', type: 'uint32' }, { name: 'activeDeposits', type: 'uint32' }, { components: [ { name: 'amount', type: 'uint128' }, { name: 'veAmount', type: 'uint128' }, { name: 'createdAt', type: 'uint32' }, { name: 'lockTime', type: 'uint32' }, ], name: 'deposits', type: 'map(uint64,tuple)', }, { name: 'created_proposals', type: 'map(uint32,uint128)' }, { name: '_tmp_proposals', type: 'map(uint32,uint128)' }, { name: 'casted_votes', type: 'map(uint32,bool)' }, ], };