hypha-dao / dao-contracts

Governance contracts for decentralized autonomous organizations
MIT License
10 stars 8 forks source link

Deploy on Jungle4 Testnet #330

Open n13 opened 1 year ago

n13 commented 1 year ago

Name mappings - waiting for hypha name bid to come through, I deployed with other names in the meantime

Jungle4 Testnet

name scheme: replace the . with x and append 1 until it's 12 characters.

Mainnet Jungle4
dao.hypha daoxhypha111
voice.hypha voicexhypha1
hypha.hypha hyphaxhypha1
husd.hypha husdxhypha11
kv.hypha kvxhypha1111

Main issue is that we need to provision all accounts with RAM, for which we need EOS (testnet)

Testnet faucet https://monitor4.jungletestnet.io/#faucet

Account creator https://monitor4.jungletestnet.io/#account

Anchor Setup

Chain ID: 73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d Node: https://jungle4.dfuse.eosnation.io

n13 commented 1 year ago

Permissions settings log

jungle4 testnet log

cleosjungle4 set account permission daoxhypha111 enrollers '{
    "threshold":1,
    "keys":[
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"hyphadaotest",
            "permission":"active"
        },
        "weight":1
    }
    ],
    "waits":[]
}' active -p daoxhypha111@owner

cleosjungle4 set account permission daoxhypha111 active '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"eosio.code"
        },
        "weight":1
    }
    ],
    "waits":[]
}' owner -p daoxhypha111@owner

cleosjungle4 set account permission daoxhypha111 owner '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"eosio.code"
        },
        "weight":1
    }
    ],
    "waits":[]
}' -p daoxhypha111@owner

Done
❯ cleosjungle4 get account daoxhypha111                    
created: 2022-10-27T06:16:12.000
permissions: 
     owner     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@eosio.code
        active     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@eosio.code
           enrollers     1:    1 hyphadaotest@active

====================
kvxhypha1111

cleosjungle4 set account permission kvxhypha1111 active '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"kvxhypha1111",
            "permission":"eosio.code"
        },
        "weight":1
    }
    ],
    "waits":[]
}' owner -p kvxhypha1111@owner

cleosjungle4 set account permission kvxhypha1111 owner '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"kvxhypha1111",
            "permission":"eosio.code"
        },
        "weight":1
    }
    ],
    "waits":[]
}' -p kvxhypha1111@owner

DONE
❯ cleosjungle4 get account kvxhypha1111 
created: 2022-11-14T12:39:54.000
permissions: 
     owner     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 kvxhypha1111@eosio.code
        active     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 kvxhypha1111@eosio.code

====================
voicexhypha1

cleosjungle4 set account permission voicexhypha1 active '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"active"
        },
        "weight":1
    },
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"eosio.code"
        },
        "weight":1
    },
    {
        "permission":
        {
            "actor":"voicexhypha1",
            "permission":"eosio.code"
        },
        "weight":1
    },
    ],
    "waits":[]
}' owner -p voicexhypha1@owner

cleosjungle4 set account permission voicexhypha1 owner '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"active"
        },
        "weight":1
    }
    ],
    "waits":[]
}' -p voicexhypha1@owner

DONE
❯ cleosjungle4 get account voicexhypha1
created: 2022-11-14T12:30:54.000
permissions: 
     owner     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@active
        active     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@active, 1 daoxhypha111@eosio.code, 1 voicexhypha1@eosio.code

====================
husdxhypha11

cleosjungle4 set account permission husdxhypha11 active '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"active"
        },
        "weight":1
    },
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"eosio.code"
        },
        "weight":1
    },
    {
        "permission":
        {
            "actor":"husdxhypha11",
            "permission":"eosio.code"
        },
        "weight":1
    },
    ],
    "waits":[]
}' owner -p husdxhypha11@owner

cleosjungle4 set account permission husdxhypha11 owner '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"active"
        },
        "weight":1
    },
    {
        "permission":
        {
            "actor":"husdxhypha11",
            "permission":"eosio.code"
        },
        "weight":1
    },
    ],
    "waits":[]
}' -p husdxhypha11@owner

DONE
❯ cleosjungle4 get account husdxhypha11
created: 2022-11-14T12:37:00.000
permissions: 
     owner     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@active, 1 husdxhypha11@eosio.code
        active     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@active, 1 daoxhypha111@eosio.code, 1 husdxhypha11@eosio.code

====================
hyphaxhypha1

cleosjungle4 set account permission hyphaxhypha1 active '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"active"
        },
        "weight":1
    },
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"eosio.code"
        },
        "weight":1
    }
    ],
    "waits":[]
}' owner -p hyphaxhypha1@owner

cleosjungle4 set account permission hyphaxhypha1 owner '{
    "threshold":1,
    "keys":[
    {
        "key":"EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi",
        "weight":1
    }
    ],
    "accounts":[
    {
        "permission":
        {
            "actor":"daoxhypha111",
            "permission":"active"
        },
        "weight":1
    }
    ],
    "waits":[]
}' -p hyphaxhypha1@owner

DONE
❯ cleosjungle4 get account hyphaxhypha1
created: 2022-11-14T12:33:12.000
permissions: 
     owner     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@active
        active     1:    1 EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi, 1 daoxhypha111@active, 1 daoxhypha111@eosio.code

====================
daoxhypha111

== manual power up

cleosjungle4 push action eosio powerup '{
        "cpu_frac":29427660,
        "days":1,
        "max_payment":"0.0008 EOS",
        "net_frac":38141826,
        "payer":"dev.hypha",
        "receiver":"daoxhypha111"
}' -p dev.hypha@active

==========================================================
deploy and setup

❯ cleos set contract daoxhypha111 dao dao_fast.wasm dao.abi

❯ cleosjungle4 set contract daoxhypha111 dao dao_fast.wasm dao.abi

cleosjungle4 push action daoxhypha111 createroot '{
    "notes":"root"
}' -p daoxhypha111@active
n13 commented 1 year ago

Create accounts log

cleosjungle4 system newaccount --buy-ram-kbytes 10 \ 
--stake-net "1.0000 EOS" \
--stake-cpu "1.0000 EOS" \
hyphadaotest daoxhypha111 \
EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi

cleosjungle4 system newaccount --buy-ram-kbytes 200 \
--stake-net "1.0000 EOS" \
--stake-cpu "1.0000 EOS" \
hyphadaotest voicexhypha1 \
EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi

cleosjungle4 system newaccount --buy-ram-kbytes 10 \
--stake-net "1.0000 EOS" \
--stake-cpu "1.0000 EOS" \
hyphadaotest hyphaxhypha1 \
EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi

 cleosjungle4 system newaccount --buy-ram-kbytes 300 \
--stake-net "1.0000 EOS" \
--stake-cpu "1.0000 EOS" \
hyphadaotest husdxhypha11 \
EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi

 cleosjungle4 system newaccount --buy-ram-kbytes 10 \
--stake-net "1.0000 EOS" \
--stake-cpu "1.0000 EOS" \
hyphadaotest kvxhypha1111 \
EOS8dTpsSqM7r8TpaK4j5GasMgzocK4qKeKtsa1cYaWcWAth3EVxi