oswap.io
WebsiteGitHubDiscord
0.3.0
0.3.0
  • Getting started
  • Protocol
    • Factory AA
      • Create
    • Pool AA
      • Info
      • Mint
      • Burn
      • Swap
    • Bug bounty
  • SDK
    • Oswap.js
    • Texto.js
  • Guides
    • Migrate liquidity
    • Custom linking
Powered by GitBook
On this page
  • Arguments
  • Example
  • Returns

Was this helpful?

  1. Protocol
  2. Factory AA

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'
  }
}

PreviousFactory AANextPool AA

Last updated 5 years ago

Was this helpful?