| Crates.io | astro-assembly |
| lib.rs | astro-assembly |
| version | 3.0.1 |
| created_at | 2024-06-20 10:43:56.403171+00 |
| updated_at | 2024-12-09 13:51:15.825238+00 |
| description | Astroport DAO Contract |
| homepage | https://astroport.fi |
| repository | https://github.com/astroport-fi/astroport-governance |
| max_upload_size | |
| id | 1277856 |
| size | 151,250 |
The Assembly contract allows xASTRO and vxASTRO holders as well as Initial Astroport Builders to post and vote on new on-chain proposals that can execute arbitrary logic.
Instantiate the contract with proposal parameter limitations and the xASTRO and builder unlock contract addresses.
{
"xastro_token_addr": "terra...",
"builder_unlock_addr": "terra...",
"proposal_voting_period": 123,
"proposal_effective_delay": 123,
"proposal_expiration_period": 123,
"proposal_required_deposit": "123",
"proposal_required_quorum": "0.55",
"proposal_required_threshold": "0.55",
"whitelisted_links": [
"https://some.link"
]
}
receiveSubmit a new on-chain proposal.
{
"receive": {
"sender": "terra...",
"amount": "123",
"msg": "<base64_encoded_json_string>"
}
}
Example proposal message
{
"submit_proposal": {
"title": "Example proposal",
"description": "Example proposal",
"link": "https://forum.astroport.fi/",
"messages":
[
{
"wasm": {
"execute": {
"contract_addr": "terra..",
"msg": "<base64_encoded_json_string>",
"funds": []
}
}
}
],
"ibc_channel": "channel..."
}
}
cast_voteCasts a vote for an active proposal.
{
"cast_vote": {
"proposal_id": 123,
"vote": "for"
}
}
end_proposalEnds an expired proposal.
{
"end_proposal": {
"proposal_id": 123
}
}
execute_proposalExecutes a proposal.
{
"execute_proposal": {
"proposal_id": 123
}
}
remove_completed_proposalRemoves a completed proposal from the proposal list.
{
"remove_completed_proposal": {
"proposal_id": 123
}
}
update_configUpdate contract parameters. Only the Assembly is allowed to update its own parameters.
{
"update_config": {
"xastro_token_addr": "terra...",
"builder_unlock_addr": "terra...",
"proposal_voting_period": 123,
"proposal_effective_delay": 123,
"proposal_expiration_period": 123,
"proposal_required_deposit": "123",
"proposal_required_quorum": "0.55",
"proposal_required_threshold": "0.55",
"whitelist_add": [
"https://some1.link"
],
"whitelist_remove": [
"https://some2.link"
]
}
}
All query messages are described below. A custom struct is defined for each query response.
configReturns Astral Assembly parameters.
{
"config": {}
}
proposalsReturns the current proposal list.
{
"proposals": {
"start_after": 10,
"limit": 10
}
}
proposalReturns information about a specific proposal.
{
"proposal": {
"proposal_id": 123
}
}
proposal_votesReturns information about the votes cast on a proposal.
{
"proposal_votes": {
"proposal_id": 123
}
}
proposal_votersReturns list of voters of specified proposal.
{
"proposal_voters": {
"proposal_id": 123,
"vote_option": "for",
"start": 30,
"limit": 15
}
}
user_voting_powerReturns user voting power for a specific proposal.
{
"user_voting_power": {
"user": "terra...",
"proposal_id": 123
}
}
total_voting_powerReturns total voting power for a specific proposal.
{
"total_voting_power": {
"proposal_id": 123
}
}