Skip to content

Commit

Permalink
Merge pull request #112 from OpShin/feat/specify_purpose
Browse files Browse the repository at this point in the history
Force the user to specify a purpose for the validator script
  • Loading branch information
nielstron committed Apr 24, 2023
2 parents 266b262 + 22fc3b8 commit b9926e6
Show file tree
Hide file tree
Showing 15 changed files with 1,677 additions and 298 deletions.
18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ script:
- coverage run --source=opshin -m pytest opshin/tests
# the samples from the README file
- >
coverage run -a --source=opshin -m opshin eval examples/smart_contracts/assert_sum.py "{\"int\": 4}" "{\"int\": 38}" "{\"constructor\": 6, \"fields\": []}"
coverage run -a --source=opshin -m opshin eval spending examples/smart_contracts/assert_sum.py "{\"int\": 4}" "{\"int\": 38}" d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff
- >
coverage run -a --source=opshin -m opshin compile examples/smart_contracts/assert_sum.py > assert_sum.uplc
coverage run -a --source=opshin -m opshin compile spending examples/smart_contracts/assert_sum.py > assert_sum.uplc
- >
coverage run -a --source=opshin -m opshin eval_uplc examples/smart_contracts/assert_sum.py "{\"int\": 4}" "{\"int\": 38}" "{\"constructor\": 6, \"fields\": []}"
coverage run -a --source=opshin -m opshin eval_uplc spending examples/smart_contracts/assert_sum.py "{\"int\": 4}" "{\"int\": 38}" d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff
- >
coverage run -a --source=opshin -m opshin compile_pluto examples/smart_contracts/assert_sum.py
coverage run -a --source=opshin -m opshin compile_pluto spending examples/smart_contracts/assert_sum.py
- >
coverage run -a --source=opshin -m opshin build examples/smart_contracts/assert_sum.py
coverage run -a --source=opshin -m opshin build spending examples/smart_contracts/assert_sum.py
# all smart contracts
- >
for i in $(find examples -type f -name "*.py" -not \( -name "broken*" -o -name "extract*" \)); do
echo "$i"
coverage run -a --source=opshin -m opshin compile "$i" > /dev/null
coverage run -a --source=opshin -m opshin compile any "$i" > /dev/null
done
# smart contracts with special parameters
- >
coverage run -a --source=opshin -m opshin build examples/smart_contracts/parameterized.py '{"int": 42}'
coverage run -a --source=opshin -m opshin build spending examples/smart_contracts/parameterized.py '{"int": 42}'
- >
coverage run -a --source=opshin -m opshin build examples/smart_contracts/dual_use.py --force-three-params
coverage run -a --source=opshin -m opshin build any examples/smart_contracts/dual_use.py --force-three-params
- >
coverage run -a --source=opshin -m opshin build examples/smart_contracts/wrapped_token.py '{"bytes": "ae810731b5d21c0d182d89c60a1eff7095dffd1c0dce8707a8611099"}' '{"bytes": "4d494c4b"}' '{"int": 1000000}' --force-three-params
coverage run -a --source=opshin -m opshin build any examples/smart_contracts/wrapped_token.py '{"bytes": "ae810731b5d21c0d182d89c60a1eff7095dffd1c0dce8707a8611099"}' '{"bytes": "4d494c4b"}' '{"int": 1000000}' --force-three-params
after_success:
- coverage report
Expand Down

0 comments on commit b9926e6

Please sign in to comment.