Create

Deploy a new pair AA and initialize it.

Arguments

  • create data required Must be defined to trigger the "create" function.

  • asset0 data required Asset unit id of the first asset.

  • asset1 data required

    Asset unit id of the second asset.

  • address data required Address of the pair AA to create.

  • swap_fee data required Swap fee, must be between 100000 (0.0001%) and 10000000000 (10%).

Example

{
  trigger: {
    outputs: {
      base: 10000
    }
    data: {
      create: '1',
      asset0: 'base',
      asset1: 'WhsD5Y/1NeKROgQojGwfe9EBC7NH4KnAk4CorCrVRhs=',
      swap_fee: '1000000000',
      address: 'BWHQYDF63RASO5PNCKWDRUHWQJNJPMXN'
    }
  }
}

Returns

{
  responseVars: {
    type: 'create'
  }
}

Last updated