near-daos / sputnik-dao-contract

Smart contracts for https://app.astrodao.com
https://astrodao.com/
MIT License
107 stars 76 forks source link

README file in sputnikdao-factory2 doesn't work #182

Closed GaloisField2718 closed 2 years ago

GaloisField2718 commented 2 years ago

Hello,

In README it told to do :

ARGS=`echo '{"purpose": "test", "council": ["anank2.testnet", "dev-1651738762809-54457981109302"], "bond": "1000000000000000000000000", "vote_period": "1800000000000", "grace_period": "1800000000000"}' | base64`

And

near call $CONTRACT_ID create "{\"name\": \"test\", \"public_key\": null, \"args\": \"$ARGS\"}"  --accountId $CONTRACT_ID --amount 30 --gas 100000000000000

But there isn't config and obviously it makes an error

'Smart contract panicked: panicked at \'Failed to deserialize input from JSON.: Error("missing field `config`", line: 1, column: 188)\', sputnikdao2/src/lib.rs:83:1'

The problem to solve this is with config, we need to have policy and therefore we can't configure council in arguments like this.

I want to solve this because it will allow me to create pre-configure Factory and I will not must update policy after publication.

I hope we will find the right syntax to configure policy at the creation a bit like in the README of sputnikdao-factory2.

GaloisField2718 commented 2 years ago

It's solved here : https://github.com/near-daos/sputnik-dao-contract/pull/181/commits/45667058e35bb209c9b77ee304b5422f0b0e68a9