Crates.io | astro-assembly |
lib.rs | astro-assembly |
version | 3.0.1 |
source | src |
created_at | 2024-06-20 10:43:56.403171 |
updated_at | 2024-12-09 13:51:15.825238 |
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"
]
}
receive
Submit 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_vote
Casts a vote for an active proposal.
{
"cast_vote": {
"proposal_id": 123,
"vote": "for"
}
}
end_proposal
Ends an expired proposal.
{
"end_proposal": {
"proposal_id": 123
}
}
execute_proposal
Executes a proposal.
{
"execute_proposal": {
"proposal_id": 123
}
}
remove_completed_proposal
Removes a completed proposal from the proposal list.
{
"remove_completed_proposal": {
"proposal_id": 123
}
}
update_config
Update 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.
config
Returns Astral Assembly parameters.
{
"config": {}
}
proposals
Returns the current proposal list.
{
"proposals": {
"start_after": 10,
"limit": 10
}
}
proposal
Returns information about a specific proposal.
{
"proposal": {
"proposal_id": 123
}
}
proposal_votes
Returns information about the votes cast on a proposal.
{
"proposal_votes": {
"proposal_id": 123
}
}
proposal_voters
Returns list of voters of specified proposal.
{
"proposal_voters": {
"proposal_id": 123,
"vote_option": "for",
"start": 30,
"limit": 15
}
}
user_voting_power
Returns user voting power for a specific proposal.
{
"user_voting_power": {
"user": "terra...",
"proposal_id": 123
}
}
total_voting_power
Returns total voting power for a specific proposal.
{
"total_voting_power": {
"proposal_id": 123
}
}