Skip to content

Commit

Permalink
fix: dao contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolerda committed Aug 24, 2023
1 parent aa314be commit 65f0a46
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 65 deletions.
42 changes: 39 additions & 3 deletions contracts/dao-distributor/choose-oracles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ blocks:
Given I read the content of './keys.json'
Given I read the content of './urls.json'
Given my name is in a 'string' named 'identity'
Given I have my 'keyring'
Given I have a 'hex' named 'ethereum address'
Given I have a 'hex' named 'caller address'
Given I rename 'ethereum address' to 'caller address'
Given I have a 'string' named 'message'
Expand All @@ -130,6 +131,8 @@ blocks:
Given I have a 'string array' named 'typeSpec'
Given I have a 'integer' in path 'post.data.dao_vote_id'
When I create the 'string array'
Expand All @@ -147,8 +150,9 @@ blocks:
When I rename the 'hex array' to 'abi_encodings'
When I pickup from path 'post.data.dao_vote_id'
When I create the 'hex array'
When I rename the 'hex array' to 'keccaks'
Foreach 'o' in 'results'
Expand Down Expand Up @@ -184,6 +188,9 @@ blocks:
When I delete 'new array'
when I copy 'hash' in 'keccaks'
When I rename the 'hash' to 'message.keccak'
Expand Down Expand Up @@ -213,13 +220,20 @@ blocks:
Then print the 'signatures'
Then print the 'abi_encodings'
then print 'keccaks'
keysFile: chooseoracles2.keys
next: chooseoracles3.zen
chooseoracles3.zen:
zenContent: |
# Always use 'Rule caller restroom-mw' when using Restroom
Rule caller restroom-mw
Given I have a 'string array' named 'keccaks'
Given I have a 'string array' named 'abi_encodings'
# [R] Restroom-mw statements: state endpoints
Given I have a 'string array' named 'oracle_urls'
Given I have a 'string array' named 'signatures'
Expand All @@ -244,13 +258,21 @@ blocks:
Then print the 'posts'
Then print the 'oracle_urls'
then print the 'keccaks'
then print the 'abi encodings'
next: chooseoracles4.zen
chooseoracles4.zen:
zenContent: >
# Always use 'Rule caller restroom-mw' when using Restroom
Rule caller restroom-mw
Given I have a 'string array' named 'keccaks'
Given I have a 'string array' named 'abi_encodings'
# [R] Restroom-mw statements: state endpoints
Expand Down Expand Up @@ -288,11 +310,21 @@ blocks:
# Print the output
Then print the 'query params'
then print the 'keccaks'
then print the 'abi encodings'
next: chooseoracles5.zen
chooseoracles5.zen:
zenContent: >
Rule caller restroom-mw
Given I have a 'string array' named 'keccaks'
Given I have a 'string array' named 'abi_encodings'
Given I have a database uri named 'database'
Given I have a 'string array' named 'database_actions_result'
Expand All @@ -314,4 +346,8 @@ blocks:
Then print the 'worker_oracles_output'
Then print the 'database_actions_result'
then print the 'keccaks'
then print the 'abi encodings'
keysFile: chooseoracles5.keys
2 changes: 1 addition & 1 deletion contracts/dao-worker/worker-submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ blocks:
When I create the signed ethereum transaction for chain 'chain id'
# Then I ask ethereum to broadcast the 'signed_ethereum_transaction' and
Then I ask ethereum to broadcast the 'signed_ethereum_transaction' and
save the transaction id in 'txid'
Then print the 'signed ethereum transaction'
Expand Down
117 changes: 56 additions & 61 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,22 @@
integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==

"@grpc/grpc-js@^1.5.0", "@grpc/grpc-js@^1.5.9", "@grpc/grpc-js@^1.8.7":
version "1.8.17"
resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.8.17.tgz#a3a2f826fc033eae7d2f5ee41e0ab39cee948838"
integrity sha512-DGuSbtMFbaRsyffMf+VEkVu8HkSXEUfO3UyGJNtqxW9ABdtTIA+2UXAJpwbJS+xfQxuwqLUeELmL6FuZkOqPxw==
version "1.8.18"
resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.8.18.tgz#fdbf2728064fd3db7e72e970372db28bd0f6fafb"
integrity sha512-2uWPtxhsXmVgd8WzDhfamSjHpZDXfMjMDciY6VRTq4Sn7rFzazyf0LLDa0oav+61UHIoEZb4KKaAV6S7NuJFbQ==
dependencies:
"@grpc/proto-loader" "^0.7.0"
"@types/node" ">=12.12.47"

"@grpc/proto-loader@^0.7.0":
version "0.7.7"
resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.7.tgz#d33677a77eea8407f7c66e2abd97589b60eb4b21"
integrity sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ==
version "0.7.8"
resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.8.tgz#c050bbeae5f000a1919507f195a1b094e218036e"
integrity sha512-GU12e2c8dmdXb7XUlOgYWZ2o2i+z9/VeACkxTA/zzAe2IjclC5PnVL0lpgjhrqfpDYHzM8B1TF6pqWegMYAzlA==
dependencies:
"@types/long" "^4.0.1"
lodash.camelcase "^4.3.0"
long "^4.0.0"
protobufjs "^7.0.0"
protobufjs "^7.2.4"
yargs "^17.7.2"

"@hyperledger/fabric-gateway@^1.0.1":
Expand All @@ -263,9 +263,9 @@
google-protobuf "^3.19.4"

"@mapbox/node-pre-gyp@^1.0.0":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c"
integrity sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==
version "1.0.11"
resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa"
integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==
dependencies:
detect-libc "^2.0.0"
https-proxy-agent "^5.0.0"
Expand Down Expand Up @@ -607,9 +607,9 @@
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==

"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0":
version "20.3.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.3.tgz#329842940042d2b280897150e023e604d11657d6"
integrity sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==
version "20.4.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.2.tgz#129cc9ae69f93824f92fac653eebfb4812ab4af9"
integrity sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==

"@types/node@^12.12.6":
version "12.20.55"
Expand Down Expand Up @@ -1318,14 +1318,14 @@ cookiejar@^2.1.1:
integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==

core-js-pure@^3.30.2:
version "3.31.0"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.31.0.tgz#052fd9e82fbaaf86457f5db1fadcd06f15966ff2"
integrity sha512-/AnE9Y4OsJZicCzIe97JP5XoPKQJfTuEG43aEVLFJGOJpyqELod+pE6LEl63DfG1Mp8wX97LDaDpy1GmLEUxlg==
version "3.31.1"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.31.1.tgz#73d154958881873bc19381df80bddb20c8d0cdb5"
integrity sha512-w+C62kvWti0EPs4KPMCMVv9DriHSXfQOCQ94bGGBiEW5rrbtt/Rz8n5Krhfw9cpFyzXBjf3DB3QnPdEzGDY4Fw==

core-js@^3.21.0:
version "3.31.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.31.0.tgz#4471dd33e366c79d8c0977ed2d940821719db344"
integrity sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==
version "3.31.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.31.1.tgz#f2b0eea9be9da0def2c5fece71064a7e5d687653"
integrity sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==

[email protected]:
version "1.0.2"
Expand Down Expand Up @@ -1500,9 +1500,9 @@ [email protected]:
integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==

detect-libc@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd"
integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==
version "2.0.2"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d"
integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==

[email protected]:
version "0.0.3"
Expand Down Expand Up @@ -2383,16 +2383,12 @@ is-stream@^2.0.0:
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==

is-typed-array@^1.1.10, is-typed-array@^1.1.3:
version "1.1.10"
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f"
integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==
is-typed-array@^1.1.3:
version "1.1.12"
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a"
integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==
dependencies:
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
for-each "^0.3.3"
gopd "^1.0.1"
has-tostringtag "^1.0.0"
which-typed-array "^1.1.11"

is-typedarray@^1.0.0, is-typedarray@~1.0.0:
version "1.0.0"
Expand All @@ -2405,9 +2401,9 @@ isexe@^2.0.0:
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==

isomorphic-git@^1.21.0:
version "1.24.2"
resolved "https://registry.yarnpkg.com/isomorphic-git/-/isomorphic-git-1.24.2.tgz#16ee555f1cc8a812bb1337fa6d90def7f7ad03e6"
integrity sha512-J3TU97JENWUnOgpVMwaRP9a3OQXJq/8fCIzA4yrJ7+ko1IPJwXCYeA69CeC8GtHeBVhcOQrbZGw6fpIpz54Vpw==
version "1.24.5"
resolved "https://registry.yarnpkg.com/isomorphic-git/-/isomorphic-git-1.24.5.tgz#f4816494eae81d94f9fd3a6d657b02cd0a08c456"
integrity sha512-07M4YscftHZJIuw7xZhgWkdFvVjHSBJBsIwWXkxgFCivhb0l8mGNchM7nO2hU27EKSIf0sT4gJivEgLGohWbzA==
dependencies:
async-lock "^1.1.0"
clean-git-ref "^2.0.1"
Expand Down Expand Up @@ -2519,9 +2515,9 @@ keyv@^3.0.0:
json-buffer "3.0.0"

keyv@^4.0.0:
version "4.5.2"
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56"
integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==
version "4.5.3"
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25"
integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==
dependencies:
json-buffer "3.0.1"

Expand Down Expand Up @@ -3207,7 +3203,7 @@ promise-retry@^2.0.1:
err-code "^2.0.2"
retry "^0.12.0"

protobufjs@^7.0.0:
protobufjs@^7.2.4:
version "7.2.4"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.4.tgz#3fc1ec0cdc89dd91aef9ba6037ba07408485c3ae"
integrity sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==
Expand Down Expand Up @@ -3504,14 +3500,14 @@ semver-compare@^1.0.0:
integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==

semver@^6.0.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
version "6.3.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==

semver@^7.3.5, semver@^7.5.1:
version "7.5.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e"
integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"

Expand Down Expand Up @@ -3785,9 +3781,9 @@ [email protected]:
is-hex-prefixed "1.0.0"

swagger-ui-dist@>=4.11.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.1.0.tgz#b01b3be06bebb2566b2df586c1632d502ec792ad"
integrity sha512-c1KmAjuVODxw+vwkNLALQZrgdlBAuBbr2xSPfYrJgseEi7gFKcTvShysPmyuDI4kcUa1+5rFpjWvXdusKY74mg==
version "5.1.3"
resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.1.3.tgz#2f9437b08454a07f87d2672cf28f045fb30b10c7"
integrity sha512-W/vZFeZHG+xTN4yu8LXdaIrcnT4Hbr7qRUILYlMEoIiG6nuTylnEGeRcvL64F2eHRA2Jo/fgCSTU06Qfh0lT3g==

swagger-ui-express@^4.1.5:
version "4.6.3"
Expand Down Expand Up @@ -3877,9 +3873,9 @@ tr46@~0.0.3:
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==

triple-beam@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9"
integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==
version "1.4.1"
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984"
integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==

tunnel-agent@^0.6.0:
version "0.6.0"
Expand Down Expand Up @@ -4296,17 +4292,16 @@ whatwg-url@^5.0.0:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"

which-typed-array@^1.1.2:
version "1.1.9"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6"
integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==
which-typed-array@^1.1.11, which-typed-array@^1.1.2:
version "1.1.11"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a"
integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==
dependencies:
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
for-each "^0.3.3"
gopd "^1.0.1"
has-tostringtag "^1.0.0"
is-typed-array "^1.1.10"

which@^2.0.2:
version "2.0.2"
Expand All @@ -4332,9 +4327,9 @@ winston-transport@^4.5.0:
triple-beam "^1.3.0"

winston@^3.9.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.9.0.tgz#2bbdeb8167a75fac6d9a0c6d002890cd908016c2"
integrity sha512-jW51iW/X95BCW6MMtZWr2jKQBP4hV5bIDq9QrIjfDk6Q9QuxvTKEAlpUNAzP+HYHFFCeENhph16s0zEunu4uuQ==
version "3.10.0"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.10.0.tgz#d033cb7bd3ced026fed13bf9d92c55b903116803"
integrity sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==
dependencies:
"@colors/colors" "1.5.0"
"@dabh/diagnostics" "^2.0.2"
Expand Down Expand Up @@ -4467,6 +4462,6 @@ yauzl@^2.10.0:
fd-slicer "~1.1.0"

zenroom@latest:
version "3.10.2"
resolved "https://registry.yarnpkg.com/zenroom/-/zenroom-3.10.2.tgz#0db2e0dc4e332e6411eb6ada444ce5f58f4b6861"
integrity sha512-rlJ0fL1NYAOc7nJjvgkzZOasYtsySPjuwuOQ8GSKdLGukUDrJkk7NklDbzqkkk9sEiLx9GF9eRQcAjHcMJyUGQ==
version "3.11.1"
resolved "https://registry.yarnpkg.com/zenroom/-/zenroom-3.11.1.tgz#56690090a4753e10149da86a1d488757caaefb20"
integrity sha512-IY82DBteieb7/KX73yyDFj60r7nAnXMlo6iNEUFAX+RdB+RSnywVq77y4UuEBkLb85F3p2UXbAYZczFNJOBaew==

0 comments on commit 65f0a46

Please sign in to comment.