3 stable releases

1.5.0 Jun 20, 2024
1.4.0 Mar 26, 2024
1.3.1 Jul 20, 2023

#6 in #astro

Download history 70/week @ 2024-07-26 89/week @ 2024-08-02 131/week @ 2024-08-09 217/week @ 2024-08-16 203/week @ 2024-08-23 127/week @ 2024-08-30 57/week @ 2024-09-06 38/week @ 2024-09-13 70/week @ 2024-09-20 50/week @ 2024-09-27 89/week @ 2024-10-04 87/week @ 2024-10-11 73/week @ 2024-10-18 60/week @ 2024-10-25 88/week @ 2024-11-01 34/week @ 2024-11-08

269 downloads per month
Used in 4 crates (via cw-it)

GPL-3.0-only

260KB
5.5K SLoC

Astroport Maker

The Maker contract collects part of Astroport's pair fees (according to the factory's maker_fee). The accrued fees are swapped to ASTRO and then send to stakers and governance (according to the governance_percent).


InstantiateMsg

Initializes the contract with required addresses and the governance_percent.

{
  "owner": "terra...",
  "astro_token_contract": "terra...",
  "factory_contract": "terra...",
  "staking_contract": "terra...",
  "governance_contract": "terra...",
  "governance_percent": 20,
  "max_spread": 23.3
}

ExecuteMsg

collect

Swaps accrued fee tokens to ASTRO.

{
  "collect": {
    "pair_addresses": [
      "terra...",
      "terra..."
    ]
  }
}

update_config

Updates the contract's general settings. All fields are optional.

{
  "update_config": {
    "factory_contract": "terra...",
    "staking_contract": "terra...",
    "governance_contract": {
      "set": "terra..."
    },
    "governance_percent": "20",
    "max_spread": 23.3
  }
}

propose_new_owner

Creates a proposal to change contract ownership. The proposal validity period is set in the expires_in variable.

{
  "propose_new_owner": {
    "owner": "terra...",
    "expires_in": 1234567
  }
}

drop_ownership_proposal

Removes the existing proposal to change contract ownership.

{
  "drop_ownership_proposal": {}
}

claim_ownership

Used to claim contract ownership, thus changing the contract's owner.

{
  "claim_ownership": {}
}

QueryMsg

All query messages are described below. A custom struct is defined for each query response.

config

Returns information about the Maker's configuration.

{
  "config": {}
}

balances

Returns token balances for each specified asset held by the Maker.

{
  "balances": {
    "assets": [
      {
        "token": {
          "contract_addr": "terra..."
        }
      },
      {
        "native_token": {
          "denom": "uusd"
        }
      }
    ]
  }
}

Dependencies

~4.5–7MB
~141K SLoC