Commit Graph

10162 Commits (527ac143bcee427686aa12e3f938f0d751c7e2fb)

Author SHA1 Message Date
Kieran Prasch 527ac143bc response.json -> response.content 2022-11-15 16:28:22 +00:00
KPrasch 131a7d4ced
Merge pull request #3002 from theref/key-value
Add custom abi conditions and key/value return values
2022-11-14 22:11:52 +00:00
derekpierre 853fa5406c Fixed bug regarding replacement of context variable when value is 0.
Added tests for return value test key as it pertains to tuples.
2022-11-14 15:50:18 -05:00
James Campbell 6567d4d30e Raise error when key and value are incompatible types 2022-11-14 18:34:46 +00:00
James Campbell 656ff8071c Improve error types raised by Return Values 2022-11-14 18:27:48 +00:00
KPrasch f68f0b092f
Merge pull request #3011 from KPrasch/server-update
Fixes missing call to response.json on HTTP 400.
2022-11-14 17:22:08 +00:00
Kieran Prasch 6d7e44de70 Fixes missing call to response.json on HTTP 400. 2022-11-14 15:27:14 +00:00
James Campbell 0e185438aa Add new error for issues when evaluating Return value 2022-11-14 14:45:32 +00:00
James Campbell 2f1a12a2e0 Improve error message for unprocessed context variables
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2022-11-14 14:32:29 +00:00
James Campbell b700c0e287 Combine checks of key and value being context variables 2022-11-14 14:32:29 +00:00
James Campbell 9078ffacde Add docstring to `_process_data()` 2022-11-14 14:32:29 +00:00
James Campbell 775d890d3b Allow returnValueTest key to be None in serialization 2022-11-14 14:32:29 +00:00
Kieran Prasch 2c5db8e1f8 snake case t staking data fixture. 2022-11-14 14:32:29 +00:00
Kieran Prasch 38283661b1 Strict typing for _resolve_abi; Simplifies enforcement of single-function ABI for condition definition. 2022-11-14 14:32:27 +00:00
James Campbell 48cc132580 Use web3 to find functions from contract abi in return value test 2022-11-14 14:32:13 +00:00
James Campbell 52038237ad Add test to ensure eval can't run on context variable in return key 2022-11-14 14:32:13 +00:00
James Campbell da9f172598 Refactor processing of Return Value data 2022-11-14 14:32:13 +00:00
James Campbell e36b958912 Allow return value to be tuple and use modern `isinstance` over `type` 2022-11-14 14:32:13 +00:00
James Campbell 417c8b0fd4 Fix mocking of tester chain 2022-11-14 14:32:13 +00:00
James Campbell beec9958d1 Add test for method not in standard contract abi 2022-11-14 14:32:13 +00:00
James Campbell 6b2b072e12 Include tests for handling list index in ReturnValue 2022-11-14 14:32:13 +00:00
James Campbell b6f422ff4e Add basic tests for Return Value key 2022-11-14 14:32:10 +00:00
James Campbell 01d414b79a Fix parsing of function abi from standard contracts 2022-11-14 14:31:54 +00:00
James Campbell 65fede079c Ensure tests use valid condition chain id 2022-11-14 14:31:54 +00:00
James Campbell 8333e2cb16 Add newsfragment to the PR 3002 2022-11-14 14:31:54 +00:00
James Campbell 3bbbc7b262 Fix function abi schema to be a dict 2022-11-14 14:31:54 +00:00
James Campbell 53f6c9c08c Allow ReturnValue key to be int or str 2022-11-14 14:31:54 +00:00
James Campbell 4ce6f72695 Add basic test for custom abi condition 2022-11-14 14:31:54 +00:00
James Campbell 49a3ec2bf9 Allow key to be used in ReturnValueTest 2022-11-14 14:31:54 +00:00
KPrasch d96f052642
Merge pull request #3007 from derekpierre/server-update
Ursula server update - fix abstraction leaks
2022-11-11 18:32:24 +00:00
Kieran Prasch 961faf04f7 Regression test for unintentional reencryption upon falsy conditions. 2022-11-11 17:39:58 +00:00
Kieran Prasch f893aae94e bypasses conditional evaluation when there no conditions for a capsule. 2022-11-11 16:39:31 +00:00
derekpierre fcafc627d6 Add test for NoConnectionToChain scenario when verifying conditions. 2022-11-10 09:50:41 -05:00
derekpierre 08bf1a0515 Code cleanup based on RFCs from #3007. 2022-11-10 09:16:36 -05:00
KPrasch 6ca074dbe0
Merge pull request #3008 from KPrasch/development
Update github action triggers for pull requests
2022-11-10 11:57:57 +00:00
Kieran Prasch 37fc77d354 uniquely namespace gh action concurrency groups. 2022-11-10 01:33:51 +00:00
Kieran Prasch cacb63a6bf Update github action triggers for pull requests 2022-11-10 01:32:09 +00:00
derekpierre 1255047722 Fix handling of condition evaluation (no condition) that caused tests to fail. 2022-11-09 19:58:52 -05:00
derekpierre 1a56decb1a Move condition-related exceptions to an exceptions module. 2022-11-09 19:20:17 -05:00
derekpierre 6a3500dffe Update server logic to properly handle errors and unsatisfied conditions. 2022-11-09 17:04:45 -05:00
Derek Pierre 806f08b1be
Merge pull request #2986 from KPrasch/polygon-cbd
Payment provider adapted condition evaluation
2022-11-09 16:25:58 -05:00
Kieran Prasch 6e0029b848 RFC: Improve condition error message language 2022-11-09 13:32:49 +00:00
Kieran Prasch cb434e1a03 RFC: Do not mutate user-supplied condition context. 2022-11-09 13:32:49 +00:00
Kieran Prasch 19d3f16635 chain name -> chain id in test data. 2022-11-09 13:32:49 +00:00
James Campbell 352ceac3ce Use dump_default instead of default in marshmallow field
Deprecated since marshmallow 3.13.0 https://marshmallow.readthedocs.io/en/stable/changelog.html#id8
2022-11-09 13:32:49 +00:00
Kieran Prasch 77e0f2a1d4 Reduce permitted chains to a tuple. 2022-11-08 02:03:25 +00:00
Kieran Prasch 8feb4bdc67 newsfragment for PR #2986 2022-11-08 01:25:26 +00:00
Kieran Prasch 661c9eb821 touch ups 2022-11-08 01:23:28 +00:00
Kieran Prasch d496943f2e Vladimir hacks payment methods 2022-11-08 01:22:28 +00:00
Kieran Prasch 812d0a1b62 Use function ABI only for custom contract condition fixtures. 2022-11-07 12:51:38 +00:00