Mean DAO Governance infra and program instructions
Assuming we have the following directory structure: workdir |--devnet/ |--localnet/ |--mainnet/
cd workdir/localnet
solana-keygen new -o localnet-upgrade-authority.json
Type ENTER to leave the passphrase empty. Save the seeds and private key in a secure place.
cd workdir/localnet
solana-keygen grind --starts-with MGov:1
cd workdir
git clone https://github.com/mean-dao/solana-program-library.git
cd workdir/solana-program-library
git fetch --all --tags
git checkout tags/governance-v2.2.6
cd workdir/solana-program-library
cd governance/program
cargo build-bpf
cd workdir
solana program deploy\
--url localhost\
--program-id ./localnet/MGovW65tDhMMcpEmsegpsdgvzb6zUwGsNjhXFxRAnjd.json\
--upgrade-authority ./localnet/localnet-upgrade-authority.json\
--verbose\
./solana-program-library/target/deploy/spl_governance.so
solana program set-upgrade-authority MGovW65tDhMMcpEmsegpsdgvzb6zUwGsNjhXFxRAnjd\
--url localhost\
--upgrade-authority ./localnet/localnet-upgrade-authority.json\
--new-upgrade-authority DxtAsWiebDtfFXmJSiMnmKrJi5RLLPReE6QUVtJHiiFJ
cd workdir/localnet
solana-keygen grind --starts-with MVSR:1
cd workdir
git clone https://github.com/mean-dao/voter-stake-registry.git
cd workdir/voter-stake-registry
git checkout master
cd workdir/voter-stake-registry
anchor build
cd workdir
solana program deploy\
--url localhost\
--program-id ./localnet/MVSRXSGsDxcmKWMFQyufxJh3NWmpmgZmT9YHTr4MioB.json\
--upgrade-authority ./localnet/localnet-upgrade-authority.json\
--verbose\
./voter-stake-registry/target/deploy/voter_stake_registry.so
solana program set-upgrade-authority MVSRXSGsDxcmKWMFQyufxJh3NWmpmgZmT9YHTr4MioB\
--url localhost\
--upgrade-authority ./localnet/localnet-upgrade-authority.json\
--new-upgrade-authority DxtAsWiebDtfFXmJSiMnmKrJi5RLLPReE6QUVtJHiiFJ
Actual gov gov upgrade authority (Mean DAO Multisig): E4zKMnJC6E7p7izgynpKXubJiXeDNvohjVunbTgxN6jh
solana program write-buffer ./voter-stake-registry/target/deploy/voter_stake_registry.so\
--url localhost
solana program set-buffer-authority BUFFER_ADDRESS\
--new-buffer-authority DxtAsWiebDtfFXmJSiMnmKrJi5RLLPReE6QUVtJHiiFJ\
--url localhost