address-provider
Holds addresses of the main contracts of the core protocol.
Links
- Contract address:
osmo1g677w7mfvn78eeudzwylxzlyz69fsgumqrscj6tekhdvs8fye3asufmvxr
- Testnet address:
osmo17dyy6hyzzy6u5khy5lau7afa2y9kwknu0aprwqn8twndw2qhv8ls6msnjr
- Contract repo: https://github.com/mars-protocol/outposts/tree/master/contracts/address-provider
- Audits: https://github.com/mars-protocol/mars-audits/tree/main/red-bank
InstantiateMsg
Instantiates the Address Provider contract.
Essentially, mars_address_provider
is a required init param for all other contracts, so it needs to be initialised first (Only owner can be set on initialization). So the deployment looks like this:
- Init the address provider
- Init all other contracts, passing in the address provider address (not ALL contracts need this but many do)
- Update the address provider, with an update config call to contain all the other contract addresses from step 2, this is why we need it to be owned by an EOA (externally owned account) - so we can do this update as part of the deployment
- Update the owner of the address provider contract at the end of deployment to be either a. the multisig or b. the gov/council contract
Params | Type | Description |
---|---|---|
owner | String | Contract owner |
prefix | String | The address prefix of the chain this contract is deployed on |
ExecuteMsg
set_address
Set address.
Params | Type | Description |
---|---|---|
address_type | MarsAddressType | Mars address type |
address | String |
MarsAddressType
NOTE
protocol_admin
fee_collector
and safety_fund
are Mars Hub addresses with mars
bech32
prefixes, which may not be recognizeded by the api.addr_validate
method.
Variants | Description |
---|---|
Incentives | Incentives contract address |
Oracle | Oracles contract address |
RedBank | Red Bank contract address |
RewardsCollector | Rewards collector contract address |
ProtocolAdmin | Protocol admin is an ICS-27 interchain account controlled by Mars Hub's x/gov module. This account will take the owner and admin roles of outpost contracts. |
FeeCollector | The fee_collector module account controlled by Mars Hub's x/distribution module. Funds sent to this account will be distributed as staking rewards. |
SafetyFund | The module account controlled by the by Mars Hub's x/safety module. Funds sent to this account will be deposited into the safety fund. |
update_owner
Manages admin role state.
QueryMsg
config
Queries contract config.
Config
(response)
Params | Type | Description |
---|---|---|
owner | String | Contract owner |
prefix | String | The address prefix of the chain this contract is deployed on |
address
Queries a single address.
Params | Type | Description |
---|---|---|
address | MarsAddressType | Address to return |
AddressResponseItem
Params | Type | Description |
---|---|---|
address_type | MarsAddressType | The type of address |
address | String | Address value |
addresses
Queries a list of addresses.
Params | Type | Description |
---|---|---|
addresses | Vec<MarsAddressType> | Addresses to return |
Returns a vector that contains objects of type AddressResponseItem
.
all_addresses
Query all stored addresses with pagination.
Params | Type | Description |
---|---|---|
start_after | Option<MarsAddressType> | Address to start list with |
limit | Option<u32> | Amount of addresses to list |
Returns a vector that contains objects of type AddressResponseItem
.