Created
August 23, 2021 23:38
-
-
Save TrevorJTClarke/ec21de3956e4ded37983f4b0cd4c69dd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
set -e | |
NETWORK=mainnet | |
OWNER=sputnik-dao.$NETWORK | |
COUNCIL_ACC=CHANGE_ME.near | |
export DAO_NAME=hack #mynewdao.sputnikv2.testnet | |
##Change NODE_ENV between mainnet, testnet and betanet | |
export NODE_ENV=mainnet | |
#DAO Policy | |
export POLICY='{ | |
"roles": [ | |
{ | |
"name": "all", | |
"kind": "Everyone", | |
"permissions": [ | |
"*:AddProposal" | |
], | |
"vote_policy": {} | |
}, | |
{ | |
"name": "council", | |
"kind": { | |
"Group": [ | |
"hack.near", | |
"agency.near", | |
"tjtc.near", | |
"metabuild.near" | |
] | |
}, | |
"permissions": [ | |
"*:*" | |
], | |
"vote_policy": { | |
"Group": { | |
"weight_kind": "RoleWeight", | |
"quorum": "0", | |
"threshold": [ | |
1, | |
8 | |
] | |
} | |
} | |
}, | |
{ | |
"name": "hacker", | |
"kind": { | |
"Group": [ | |
"tjtc.near", | |
"create.near", | |
"devs.near" | |
] | |
}, | |
"permissions": [ | |
"*:*" | |
], | |
"vote_policy": { | |
"Group": { | |
"weight_kind": "RoleWeight", | |
"quorum": "0", | |
"threshold": [ | |
1, | |
2 | |
] | |
} | |
} | |
} | |
], | |
"default_vote_policy": { | |
"weight_kind": "RoleWeight", | |
"quorum": "0", | |
"threshold": [ | |
1, | |
2 | |
] | |
}, | |
"proposal_bond": "10000000000000000000000", | |
"proposal_period": "604800000000000", | |
"bounty_bond": "1000000000000000000000000", | |
"bounty_forgiveness_period": "86400000000000" | |
}' | |
#Args for creating DAO in sputnik-factory2 | |
ARGS=`echo "{\"config\": {\"name\": \"testpolicy\", \"purpose\": \"Test DAO Policy\", \"metadata\":\"\"}, \"policy\": $POLICY}" | base64` | |
# Call sputnik factory for deploying new dao with custom policy | |
near call $OWNER create "{\"name\": \"$DAO_NAME\", \"args\": \"$ARGS\"}" --accountId $COUNCIL_ACC --amount 5 --gas 150000000000000 | |
near view $DAO_NAME.$OWNER get_policy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment