diff --git a/contracts/dao-distributor/choose-oracles.yml b/contracts/dao-distributor/choose-oracles.yml index ce4d1c5..334cc14 100644 --- a/contracts/dao-distributor/choose-oracles.yml +++ b/contracts/dao-distributor/choose-oracles.yml @@ -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 @@ -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' diff --git a/contracts/dao-distributor/chooseoracles0.keys b/contracts/dao-distributor/chooseoracles0.keys new file mode 100644 index 0000000..5d42c19 --- /dev/null +++ b/contracts/dao-distributor/chooseoracles0.keys @@ -0,0 +1 @@ +{"typeSpec":["uint256","bytes32","uint256"]} \ No newline at end of file diff --git a/contracts/dao-distributor/chooseoracles1.keys b/contracts/dao-distributor/chooseoracles1.keys index 413d663..18323b9 100644 --- a/contracts/dao-distributor/chooseoracles1.keys +++ b/contracts/dao-distributor/chooseoracles1.keys @@ -1 +1 @@ -{"database":"sqlite:///var/secrets/dids.db","read_oracles":"select * from dids","one":1,"four":3,"base url":"https://did.dyne.org/dids/"} \ No newline at end of file +{"database":"sqlite:///var/secrets/dids.db","read_oracles":"select * from dids","one":1,"four":4,"base url":"https://did.dyne.org/dids/"} \ No newline at end of file diff --git a/contracts/dao-distributor/chooseoracles2.keys b/contracts/dao-distributor/chooseoracles2.keys index fc6663e..8eaae8f 100644 --- a/contracts/dao-distributor/chooseoracles2.keys +++ b/contracts/dao-distributor/chooseoracles2.keys @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file