@shogun-sdk/money-legos
Version:
Shogun Money Legos: clients and types for quotes, memes, prices, balances, fees, validations, etc.
647 lines (646 loc) • 22 kB
text/typescript
export const HL_BRIDGE2_ABI = [
{
inputs: [
{ internalType: 'address[]', name: 'hotAddresses', type: 'address[]' },
{ internalType: 'address[]', name: 'coldAddresses', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
{ internalType: 'address', name: 'usdcAddress', type: 'address' },
{ internalType: 'uint64', name: '_disputePeriodSeconds', type: 'uint64' },
{ internalType: 'uint64', name: '_blockDurationMillis', type: 'uint64' },
{ internalType: 'uint64', name: '_lockerThreshold', type: 'uint64' },
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'uint64', name: 'newBlockDurationMillis', type: 'uint64' }],
name: 'ChangedBlockDurationMillis',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'uint64', name: 'newDisputePeriodSeconds', type: 'uint64' }],
name: 'ChangedDisputePeriodSeconds',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'uint64', name: 'newLockerThreshold', type: 'uint64' }],
name: 'ChangedLockerThreshold',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'uint64', name: 'usd', type: 'uint64' },
],
name: 'Deposit',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'uint64', name: 'usd', type: 'uint64' },
{ indexed: false, internalType: 'uint32', name: 'errorCode', type: 'uint32' },
],
name: 'FailedPermitDeposit',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'bytes32', name: 'message', type: 'bytes32' },
{ indexed: false, internalType: 'uint32', name: 'errorCode', type: 'uint32' },
],
name: 'FailedWithdrawal',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ indexed: false, internalType: 'bytes32', name: 'hotValidatorSetHash', type: 'bytes32' },
{ indexed: false, internalType: 'bytes32', name: 'coldValidatorSetHash', type: 'bytes32' },
],
name: 'FinalizedValidatorSetUpdate',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'address', name: 'destination', type: 'address' },
{ indexed: false, internalType: 'uint64', name: 'usd', type: 'uint64' },
{ indexed: false, internalType: 'uint64', name: 'nonce', type: 'uint64' },
{ indexed: false, internalType: 'bytes32', name: 'message', type: 'bytes32' },
],
name: 'FinalizedWithdrawal',
type: 'event',
},
{
anonymous: false,
inputs: [
{
components: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'address', name: 'destination', type: 'address' },
{ internalType: 'uint64', name: 'usd', type: 'uint64' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{ internalType: 'uint64', name: 'requestedTime', type: 'uint64' },
{ internalType: 'uint64', name: 'requestedBlockNumber', type: 'uint64' },
{ internalType: 'bytes32', name: 'message', type: 'bytes32' },
],
indexed: false,
internalType: 'struct Withdrawal',
name: 'withdrawal',
type: 'tuple',
},
],
name: 'InvalidatedWithdrawal',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'finalizer', type: 'address' },
{ indexed: false, internalType: 'bool', name: 'isFinalizer', type: 'bool' },
],
name: 'ModifiedFinalizer',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'locker', type: 'address' },
{ indexed: false, internalType: 'bool', name: 'isLocker', type: 'bool' },
],
name: 'ModifiedLocker',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }],
name: 'Paused',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ indexed: false, internalType: 'bytes32', name: 'hotValidatorSetHash', type: 'bytes32' },
{ indexed: false, internalType: 'bytes32', name: 'coldValidatorSetHash', type: 'bytes32' },
{ indexed: false, internalType: 'uint64', name: 'updateTime', type: 'uint64' },
],
name: 'RequestedValidatorSetUpdate',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'address', name: 'destination', type: 'address' },
{ indexed: false, internalType: 'uint64', name: 'usd', type: 'uint64' },
{ indexed: false, internalType: 'uint64', name: 'nonce', type: 'uint64' },
{ indexed: false, internalType: 'bytes32', name: 'message', type: 'bytes32' },
{ indexed: false, internalType: 'uint64', name: 'requestedTime', type: 'uint64' },
],
name: 'RequestedWithdrawal',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }],
name: 'Unpaused',
type: 'event',
},
{
inputs: [
{
components: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'uint64', name: 'usd', type: 'uint64' },
{ internalType: 'uint64', name: 'deadline', type: 'uint64' },
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature',
name: 'signature',
type: 'tuple',
},
],
internalType: 'struct DepositWithPermit[]',
name: 'deposits',
type: 'tuple[]',
},
],
name: 'batchedDepositWithPermit',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32[]', name: 'messages', type: 'bytes32[]' }],
name: 'batchedFinalizeWithdrawals',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'address', name: 'destination', type: 'address' },
{ internalType: 'uint64', name: 'usd', type: 'uint64' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
internalType: 'struct WithdrawalRequest[]',
name: 'withdrawalRequests',
type: 'tuple[]',
},
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'hotValidatorSet',
type: 'tuple',
},
],
name: 'batchedRequestWithdrawals',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'blockDurationMillis',
outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'uint64', name: 'newBlockDurationMillis', type: 'uint64' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeColdValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'changeBlockDurationMillis',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint64', name: 'newDisputePeriodSeconds', type: 'uint64' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeColdValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'changeDisputePeriodSeconds',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint64', name: 'newLockerThreshold', type: 'uint64' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeColdValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'changeLockerThreshold',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'coldValidatorSetHash',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'disputePeriodSeconds',
outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'hotAddresses', type: 'address[]' },
{ internalType: 'address[]', name: 'coldAddresses', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSetUpdateRequest',
name: 'newValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeColdValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
],
name: 'emergencyUnlock',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'epoch',
outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'finalizeValidatorSetUpdate', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
name: 'finalizedWithdrawals',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'finalizers',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getLockersVotingLock',
outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'hotValidatorSetHash',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes32[]', name: 'messages', type: 'bytes32[]' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeColdValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'invalidateWithdrawals',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'locker', type: 'address' }],
name: 'isVotingLock',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lockerThreshold',
outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'lockers',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'finalizer', type: 'address' },
{ internalType: 'bool', name: '_isFinalizer', type: 'bool' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'modifyFinalizer',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'locker', type: 'address' },
{ internalType: 'bool', name: '_isLocker', type: 'bool' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'modifyLocker',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'nValidators',
outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'paused',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'pendingValidatorSetUpdate',
outputs: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'uint64', name: 'totalValidatorPower', type: 'uint64' },
{ internalType: 'uint64', name: 'updateTime', type: 'uint64' },
{ internalType: 'uint64', name: 'updateBlockNumber', type: 'uint64' },
{ internalType: 'uint64', name: 'nValidators', type: 'uint64' },
{ internalType: 'bytes32', name: 'hotValidatorSetHash', type: 'bytes32' },
{ internalType: 'bytes32', name: 'coldValidatorSetHash', type: 'bytes32' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
name: 'requestedWithdrawals',
outputs: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'address', name: 'destination', type: 'address' },
{ internalType: 'uint64', name: 'usd', type: 'uint64' },
{ internalType: 'uint64', name: 'nonce', type: 'uint64' },
{ internalType: 'uint64', name: 'requestedTime', type: 'uint64' },
{ internalType: 'uint64', name: 'requestedBlockNumber', type: 'uint64' },
{ internalType: 'bytes32', name: 'message', type: 'bytes32' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'totalValidatorPower',
outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'unvoteEmergencyLock', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'hotAddresses', type: 'address[]' },
{ internalType: 'address[]', name: 'coldAddresses', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSetUpdateRequest',
name: 'newValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint64', name: 'epoch', type: 'uint64' },
{ internalType: 'address[]', name: 'validators', type: 'address[]' },
{ internalType: 'uint64[]', name: 'powers', type: 'uint64[]' },
],
internalType: 'struct ValidatorSet',
name: 'activeHotValidatorSet',
type: 'tuple',
},
{
components: [
{ internalType: 'uint256', name: 'r', type: 'uint256' },
{ internalType: 'uint256', name: 's', type: 'uint256' },
{ internalType: 'uint8', name: 'v', type: 'uint8' },
],
internalType: 'struct Signature[]',
name: 'signatures',
type: 'tuple[]',
},
],
name: 'updateValidatorSet',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'usdcToken',
outputs: [{ internalType: 'contract ERC20Permit', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
name: 'usedMessages',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'voteEmergencyLock', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
name: 'withdrawalsInvalidated',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
];