Skip to content

Commit

Permalink
update choose oracle chain
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolerda committed Jul 4, 2023
1 parent f768a66 commit d4d934f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
44 changes: 42 additions & 2 deletions contracts/dao-distributor/choose-oracles.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
zenchain: 1.0
start: chooseoracles1.zen
start: chooseoracles0.zen
blocks:
chooseoracles0.zen:
zenContent: |
Rule caller restroom-mw
Scenario 'ethereum': convert from event data
Given I read the content of 'keys.json'
Given I read the content of 'urls.json'
Given I have a 'string' named 'ethereum address'
Given I have a 'string' named 'eth_url'
Given I have a 'string' named 'endpoint'
Given I have a 'hex' named 'data'
Given I rename 'data' to 'encoded data'
Given I have a 'string array' named 'typeSpec'
When I create the ethereum abi decoding of 'encoded data' using 'typeSpec'
When I create the copy of element '1' in array 'ethereum abi decoding'
When I rename 'copy' to 'request_id'
When I create the copy of element '3' in array 'ethereum abi decoding'
When I rename 'copy' to 'dao_vote_id'
When I create the 'string dictionary'
When I rename the 'string dictionary' to 'data'
When I create the 'string dictionary'
When I rename the 'string dictionary' to 'post'
When I rename the 'ethereum address' to 'caller address'
When I move 'caller address' in 'data'
When I move 'eth url' in 'data'
When I move 'endpoint' in 'data'
When I move 'dao_vote_id' in 'data'
When I move 'request_id' in 'data'
When I move 'data' in 'post'
Then print the 'post'
keysFile: chooseoracles0.keys
next: chooseoracles1.zen
chooseoracles1.zen:
zenContent: >
Rule caller restroom-mw
Expand Down Expand Up @@ -133,7 +173,7 @@ blocks:
Then print the 'query params'
next: chooseoracles4.zen
chooseoracles4.zen:
zenContent: >-
zenContent: >
Rule caller restroom-mw
Given I have a database uri named 'database'
Expand Down
1 change: 1 addition & 0 deletions contracts/dao-distributor/chooseoracles0.keys
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"typeSpec":["uint256","bytes32","uint256"]}
2 changes: 1 addition & 1 deletion contracts/dao-distributor/chooseoracles1.keys
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"database":"sqlite:///var/secrets/dids.db","read_oracles":"select * from dids","one":1,"four":3,"base url":"https://did.dyne.org/dids/"}
{"database":"sqlite:///var/secrets/dids.db","read_oracles":"select * from dids","one":1,"four":4,"base url":"https://did.dyne.org/dids/"}
2 changes: 1 addition & 1 deletion contracts/dao-distributor/chooseoracles2.keys
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dids":["did:dyne:sandbox.zenswarm:A8SvtNV9C3dELzXBZuExKXAXD3K55HrBK5XbAtZsqrV7","did:dyne:sandbox.zenswarm:8yBBtS5w7fJE1GM1VMF63LfAceBVaybVypYCm6yajyAy","did:dyne:sandbox.zenswarm:3g2SnviiUkisV2eiSjfDGj91gxTaoNGrZGM6adadqhiH","did:dyne:sandbox.zenswarm:DrY9ECLJ7Sf25qurEQK8VjHTPma7jNokTFXeTktwkT8r"],"one":1,"four":3,"base url":"https://did.dyne.org/dids/","api name":"api/submit-verification"}
{"dids":["did:dyne:sandbox.zenswarm:A8SvtNV9C3dELzXBZuExKXAXD3K55HrBK5XbAtZsqrV7","did:dyne:sandbox.zenswarm:8yBBtS5w7fJE1GM1VMF63LfAceBVaybVypYCm6yajyAy","did:dyne:sandbox.zenswarm:3g2SnviiUkisV2eiSjfDGj91gxTaoNGrZGM6adadqhiH","did:dyne:sandbox.zenswarm:DrY9ECLJ7Sf25qurEQK8VjHTPma7jNokTFXeTktwkT8r"],"one":1,"four":3,"base url":"https://did.dyne.org/dids/","api name":"api/worker-submit.chain"}

0 comments on commit d4d934f

Please sign in to comment.