-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from portto/dao-new
Update DAO contract and add admin transactions
- Loading branch information
Showing
5 changed files
with
104 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# DAO - Examples | ||
### Setup Proposer | ||
``` | ||
flow transactions send ./transactions/dao/createProposer.cdc \ | ||
--signer blt-dao-admin-mainnet \ | ||
--network mainnet | ||
``` | ||
|
||
### Propose New Topic | ||
``` | ||
flow transactions send ./transactions/dao/proposeNewTopic.cdc \ | ||
--signer blt-dao-admin-mainnet \ | ||
--network mainnet | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import BloctoDAO from "../../contracts/flow/dao/BloctoDAO.cdc" | ||
|
||
transaction { | ||
|
||
prepare(signer: AuthAccount) { | ||
let admin = signer | ||
.borrow<&BloctoDAO.Admin>(from: BloctoDAO.AdminStoragePath) | ||
?? panic("Signer is not the admin") | ||
|
||
let proposer <- admin.createProposer() | ||
|
||
signer.save(<-proposer, to: /storage/bloctoDAOProposer) | ||
signer.link<&BloctoDAO.Proposer>( | ||
/private/bloctoDAOProposer, | ||
target: /storage/bloctoDAOProposer | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import BloctoDAO from "../../contracts/flow/dao/BloctoDAO.cdc" | ||
|
||
transaction { | ||
let proposer: &BloctoDAO.Proposer | ||
|
||
prepare(signer: AuthAccount) { | ||
self.proposer = signer.getCapability(/private/bloctoDAOProposer).borrow<&BloctoDAO.Proposer>() | ||
?? panic("Could not borrow reference") | ||
} | ||
|
||
execute { | ||
self.proposer.addTopic( | ||
title: "How much $BLT token grant should the Blocto ecosystem fund allocate for the IDO platform from portto, the infrastructure supplier?", | ||
description: "Portto is the infrastructure supplier of Blocto's upcoming IDO platform. In this poll, we wish to decide how much $BLT token should be granted to portto for developing the Blocto IDO platform via BloctoDAO. The grant will be granted from the ecosystem fund.", | ||
options: ["100K $BLT", "300K $BLT", "500K $BLT"], | ||
startAt: 1641373200.0, | ||
endAt: 1641546000.0, | ||
minVoteStakingAmount: 0.00000001 | ||
) | ||
} | ||
} |