ARCHON 2021 Roadmap Part 1 - Code Snippets Toolbox Expands Governance Layerware

avatar

Have you seen the exciting new advance to the ARCHON petition and proposal system? Now community members can propose completely transparent 'code snippets' to be activated on @archon-gov. Check out @taskmanager's Code Snippets Original Release

image.png

There are 10 functions to call right now, and we will go through them below. Each code snippet should start with a triple tick ``` and then contain the code. The following header code should identify the account that should perform the action. For this to work, of course the account in question must be under ARCHON Petition and Proposal Governance Layerware.

HEADER CODE

account = "archon-gov"


nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_nodes(hive=True)
hive = Hive(node=nodes)

Code Snippet Functions

1-2: Sell/Buy Hive-Engine Token

def sell_token(symbol, amount, price, account):
    he_market = Market(blockchain_instance=hive)
    market_trans = he_market.sell(account, amount, symbol, price)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(market_trans), "market_tx", account)


def buy_token(symbol, amount, price, account):
    he_market = Market(blockchain_instance=hive)
    market_trans = he_market.buy(account, amount, symbol, price)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(market_trans), "market_tx", account)

With these definitions, you can instruct the proposal (if approved) to buy or sell any token on hive-engine. Check the wallet first. Selling tokens that aren't there or buying an amount that there isn't swap.hive for will result in failure.

After defining, you can command:

sell_token("ARCHON", 250.00, 0.45, account)
time.sleep(30)
sell_token("LEO", 1.00, 3.333, account)
time.sleep(30)
sell_token("SIM", 225.00, 0.00495, account)
time.sleep(30)
buy_token("DHEDGE", 500, 0.285, account)
time.sleep(30)

All code snippets must end with ``` and then !end


image.png

3-4: Power up HIVE, Power down HIVE.

def power_up_hive(to, amount, account):
    hive_account = Account(account, blockchain_instance=hive)    
    hive_power_tx = hive_account.transfer_to_vesting(amount, to, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(hive_power_tx), "hive_tx", account)


def power_down_hive(amount, account):
    hive_account = Account(account, blockchain_instance=hive)
    h_v = hive.token_power_to_vests(amount)
    hive_power_tx = hive_account.withdraw_vesting(h_v, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(hive_power_tx), "hive_tx", account)

power_down_hive(1, account)
time.sleep(30)
power_up_hive("archon-gov", 1, account)
time.sleep(30)
power_up_hive("archon-mining", 0.1, account)

5-6: Stake/Unstake Hive-Engine Token

def stake_token(amount, symbol, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    stake_trans = he_wallet.stake(amount=amount, symbol=symbol, receiver=account)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(stake_trans), "stake_tx", account)


def unstake_token(amount, symbol, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    unstake_trans = he_wallet.unstake(amount=amount, symbol=symbol)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(unstake_trans), "stake_tx", account)

7-8: Send HIVE or HIVE-ENGINE token to account

def transfer_hive(to, amount, asset, memo, account):
    hive_account = Account(account, blockchain_instance=hive)
    hive_tx = hive_account.transfer(to, amount, asset, memo, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(hive_tx), "hive_tx", account)

def transfer_token(to, amount, symbol, memo, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    transfer_tx = he_wallet.transfer(to, amount, symbol, memo)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(transfer_tx), "stake_tx", account)

transfer_hive("archon-mining", 5, "HIVE", "mining-bump", account)
time.sleep(1)
transfer_token("myfakeuser", 10, "ARCHON", "this is a memo", account)

9-10 APPROVE or UNAPPROVE witness

def approve_witnesses(witness, account):
    hive_account = Account(account, blockchain_instance=hive)
    witness_tx = hive_account.approvewitness(witness, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(witness_tx), "witness_tx", account)


def remove_witnesses(witness, account):
    hive_account = Account(account, blockchain_instance=hive)
    witness_tx = hive_account.disapprovewitness(witness, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(witness_tx), "witness_tx", account)


approve_witnesses("blocktrades", account)
time.sleep(30)
remove_witnesses("jerrybanfield", account)

Again, all code snippets must end with ``` and then !end


image.png

These codes work within Proposals on the ARCHON Petition and Proposal System. The following requirements also apply:

#archon tag to post to ARCHON

#archon-proposal tag to make it a proposal

100% beneficiary to @archon-gov

AND

#hive-py tag to pick up the code snippets

Any user can make a proposal even if they are not an ARCHON tribe member. @archon-gov will show up some time after posting to leave 2 comments, 'YES' and 'NO'.

image.png

image.png

As the comment indicates, all ARCHON members can vote on these comments (with any %) to indicate their support for either the YES or the NO, whether they want the proposal to pass and the code to execute, or whether they want the NO conditions to go forward. There is a third option, and that is neither - if neither yes or no get 50% of the votes, neither YES nor NO will win.

The ARCHON Governance Power of each member is based on their ARCHON stake and their ARCHONM miner holdings. The updated GP (Governance Power) Top 50 list is published each day on @archon-mining Mining Report.


image.png

image.png

How can I implement this on my token(s)???

The ARCHON petition and Proposal Governance Layerware is available for your token or tokens! You can enable these code snippet smart contracts on your very own governance accounts for your project!

WEEDCASH has implemented, and SPORTS token has expressed interest. If you have a token or community, get in contact with the ARCHON team in Discord.

In this case, you will define your own governance accounts, own main tag, own proposal tag. The beneficiary will have to be to the governance account in your own community.

Price: 2500 Staked ARCHON or 5 ARCHONM miners held.

The ARCHON support and automation tribe, with its related layerware services, can all be activated with staked archon, holding ARCHONM. This gives use to the ARCHON family of tokens.

There are more services to come, plus the already launched community comment rewarding and vote bot.

These Other services will be discussed in Part 2 of the roadmap.

Today, we need your help, all ARCHON members, and soon to be ARCHON members, help us test the code snippets. Proposing ideas to propose is not as good as actually making a proposal with your idea.

Proposals are binding when they receive 50% of the vote (YES or NO condictions are binding for @archon-gov). Getting votes for your proposal is the only way the code snippets can activate. We can organize support for proposals in the #archon-governance channel of Discord

Suggestions for implementations should be petitions. Petitions are non-binding requests, for example for specific automation as a service. Petitions should use #archon and #archon-petition tags, as well as give 100% beneficiary to @archon-gov.

As we continue to test and expand the code snippets and the petition and proposal system over the course of first quarter 2021, we will also be looking to expand our membership communities. Currently we have WEEDCASH and EDENBUXX as members, with SPORTS and DHEDGE looking to come on board. Each community is free to define the terms of their governance within the context of the defined variables (governance account, community tag, proposal tag and petition tag).

Coming soon, PART 2, talking about other services and upcoming services, for the ARCHON multi-chain layerware project!

Posted Using LeoFinance Beta



0
0
0.000
5 comments
avatar

pixresteemer_incognito_angel_mini.png
Bang, I did it again... I just rehived your post!
Week 39 of my contest just started...you can now check the winners of the previous week!
!BEER
7

0
0
0.000
avatar

This sounds like a cool project! I lack time to do development on this directly, but I'll be sure to join with a miner or two, and building up some stake :).

0
0
0.000
avatar

Congratulations @archonapp! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 100 upvotes. Your next target is to reach 200 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

0
0
0.000