@broxus/js-core
Version:
MobX-based JavaScript Core library
142 lines (141 loc) • 5.45 kB
JavaScript
/**
* Composed Dex Pair operations callbacks ABI
*/
export const DexPairCallbacksAbi = {
'ABI version': 2,
header: ['time'],
functions: [
{
name: 'dexPairDepositLiquiditySuccess',
inputs: [
{ name: 'id', type: 'uint64' },
{ name: 'via_account', type: 'bool' },
{
name: 'result',
components: [
{ name: 'step_1_left_deposit', type: 'uint128' },
{ name: 'step_1_right_deposit', type: 'uint128' },
{ name: 'step_1_lp_reward', type: 'uint128' },
{ name: 'step_2_left_to_right', type: 'bool' },
{ name: 'step_2_right_to_left', type: 'bool' },
{ name: 'step_2_spent', type: 'uint128' },
{ name: 'step_2_fee', type: 'uint128' },
{ name: 'step_2_received', type: 'uint128' },
{ name: 'step_3_left_deposit', type: 'uint128' },
{ name: 'step_3_right_deposit', type: 'uint128' },
{ name: 'step_3_lp_reward', type: 'uint128' },
],
type: 'tuple',
},
],
outputs: [],
},
{
name: 'dexPairDepositLiquiditySuccessV2',
inputs: [
{ name: 'id', type: 'uint64' },
{ name: 'via_account', type: 'bool' },
{
name: 'result',
components: [
{ name: 'old_balances', type: 'uint128[]' },
{ name: 'amounts', type: 'uint128[]' },
{ name: 'lp_reward', type: 'uint128' },
{ name: 'result_balances', type: 'uint128[]' },
{ name: 'invariant', type: 'uint128' },
{ name: 'differences', type: 'uint128[]' },
{ name: 'sell', type: 'bool[]' },
{ name: 'pool_fees', type: 'uint128[]' },
{ name: 'beneficiary_fees', type: 'uint128[]' },
],
type: 'tuple',
},
],
outputs: [],
},
{
name: 'dexPairExchangeSuccess',
inputs: [
{ name: 'id', type: 'uint64' },
{ name: 'via_account', type: 'bool' },
{
name: 'result',
components: [
{ name: 'left_to_right', type: 'bool' },
{ name: 'spent', type: 'uint128' },
{ name: 'fee', type: 'uint128' },
{ name: 'received', type: 'uint128' },
],
type: 'tuple',
},
],
outputs: [],
},
{
name: 'dexPairExchangeSuccessV2',
inputs: [
{ name: 'id', type: 'uint64' },
{ name: 'via_account', type: 'bool' },
{
name: 'result',
components: [
{ name: 'spent_token', type: 'address' },
{ name: 'received_token', type: 'address' },
{ name: 'spent', type: 'uint128' },
{ name: 'fee', type: 'uint128' },
{ name: 'received', type: 'uint128' },
],
type: 'tuple',
},
],
outputs: [],
},
{
name: 'dexPairWithdrawSuccess',
inputs: [
{ name: 'id', type: 'uint64' },
{ name: 'via_account', type: 'bool' },
{
name: 'result',
components: [
{ name: 'lp', type: 'uint128' },
{ name: 'left', type: 'uint128' },
{ name: 'right', type: 'uint128' },
],
type: 'tuple',
},
],
outputs: [],
},
{
name: 'dexPairWithdrawSuccessV2',
inputs: [
{ name: 'id', type: 'uint64' },
{ name: 'via_account', type: 'bool' },
{
name: 'result',
components: [
{ name: 'lp_amount', type: 'uint128' },
{ name: 'old_balances', type: 'uint128[]' },
{ name: 'amounts', type: 'uint128[]' },
{ name: 'result_balances', type: 'uint128[]' },
{ name: 'invariant', type: 'uint128' },
{ name: 'differences', type: 'uint128[]' },
{ name: 'sell', type: 'bool[]' },
{ name: 'pool_fees', type: 'uint128[]' },
{ name: 'beneficiary_fees', type: 'uint128[]' },
],
type: 'tuple',
},
],
outputs: [],
},
{
name: 'dexPairOperationCancelled',
inputs: [{ name: 'id', type: 'uint64' }],
outputs: [],
},
],
data: [],
events: [],
};