-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix setting ARGS in the factory README #181
base: main
Are you sure you want to change the base?
Conversation
In the current version calling `near call $CONTRACT_ID create "{\"name\": \"test\", \"public_key\": null, \"args\": \"$ARGS\"}"` throws ``` Error: {"index":3,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'Failed to deserialize input from JSON.: Error(\"missing field `config`\", line: 1, column: 165)', sputnikdao2/src/lib.rs:83:1"}} ``` The `new` method (sputnikdao) accepts `config`, `policy` args
Hi, |
@@ -16,9 +16,9 @@ set CONTRACT_ID "dev-1608694678554-8567049" | |||
near call $CONTRACT_ID new '{}' --accountId $CONTRACT_ID | |||
|
|||
# bash | |||
ARGS=`echo '{"purpose": "test", "council": ["testmewell.testnet", "illia"], "bond": "1000000000000000000000000", "vote_period": "1800000000000", "grace_period": "1800000000000"}' | base64` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we can decide about bond
value, voting period and grace_period
but after modifications we can't.
How we could improve ARGS
to define them ?
In modifying policy.rs (205::208) and compile it "ExecutionError":"Smart contract panicked: panicked at 'assertion failed: `(left == right)`\n left: `1000000000000000000000000`,\n right: `10000000000000000000000`: ERR_MIN_BOND', sputnikdao2/src/proposals.rs:491:9" In proposal.rs : assert_eq!(
env::attached_deposit(),
policy.proposal_bond.0,
"ERR_MIN_BOND"
) I don't know what to modify this part to solve this error. |
Is the code in the main branch outdated? The factory's |
In the current version calling
near call $CONTRACT_ID create "{\"name\": \"test\", \"public_key\": null, \"args\": \"$ARGS\"}"
throwsThe
new
method (sputnikdao) acceptsconfig
,policy
args