Commit Graph

4195 Commits (v7.5.0)

Author SHA1 Message Date
derekpierre 1be5aa0b29
Configure fee model role in coordinator for acceptance tests to pass based on latest changes in nucypher-contracts. 2025-04-04 15:46:10 -04:00
derekpierre 4c229120b9
Add acceptance test for handling of big int strings. 2025-03-25 08:55:48 -04:00
derekpierre 8d49a09be3
Make logic more robust for checking for BigInt strings.
Add unit test for utility method - it was already tested based on usage by a field, but let's test it directly.
2025-03-25 08:55:47 -04:00
derekpierre f985433f11
Rename integer field for clarity. 2025-03-25 08:55:46 -04:00
derekpierre 4198aed384
Allow processing of BigInt strings within context variable values.
Add tests.
2025-03-25 08:55:44 -04:00
derekpierre 46372dde1b
Add contract condition tests to verify use of big number integers as parameters and return value test values (comparator values). 2025-03-25 08:55:43 -04:00
derekpierre d1e2311a97
Rename IntegerField to AnyIntegerField and add unit tests. 2025-03-25 08:55:43 -04:00
derekpierre a4df4662aa
Properly handle bigint strings that are strings of large numbers that end with 'n'. 2025-03-25 08:55:42 -04:00
derekpierre 1b13c50b02
Add generic catch-all field for any data received from JSON (`taco-web`).
We need to account for the case when `taco-web` provides large numbers (bigints) as strings.
Add tests.
2025-03-25 08:55:35 -04:00
David Núñez d75ddbe6b2 Add JWTConditions to condition lingo tests 2025-03-23 10:46:16 +01:00
David Núñez d2a6ae919e Better exception handling for JWT condition evaluation 2025-03-23 10:46:16 +01:00
David Núñez 7a33522410 Be consistent with parameters that are not optional
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2025-03-23 10:46:16 +01:00
David Núñez cee5e36519 Test for JWTCondition expiration 2025-03-23 10:46:16 +01:00
David Núñez 9c8db5e688 Validate public key PEM format in JWT conditions
Co-authored-by: James Campbell <james.campbell@tanti.org.uk>
2025-03-23 10:46:16 +01:00
David Núñez 4ce01d2a60 Validate expected issuer in JWT token 2025-03-23 10:46:16 +01:00
David Núñez 5464006500 Make sure that JWT tokens can include custom claims 2025-03-23 10:46:16 +01:00
David Núñez a734dfca2d In JWT tests, define a token issuance function instead of hardcoding it 2025-03-23 10:46:16 +01:00
David Núñez bfba37db58 First iteration on JWTConditions 2025-03-23 10:46:16 +01:00
derekpierre 3cae4c84a2
TacoApplication contract no longer takes commitment duration; fix usage in tests. 2025-03-12 08:54:05 -04:00
derekpierre 50c9baface
Remove extra fixture parameter from test.
Co-authored-by: Manuel Montenegro <manuel@nucypher.com>
2025-02-10 08:09:49 -05:00
derekpierre 4ccfe68c36
Apply RFC from #3576 that caught a bug.
Co-authored-by: vzotova <vikki.zta@gmail.com>
2025-02-05 13:30:03 -05:00
derekpierre a074f676ff
Add tests for ConditionProviderManager. 2025-02-05 13:30:03 -05:00
derekpierre 967b272a28
Improve exception message when RPC endpoints for a chain are available but can't be properly configured. 2025-02-05 13:30:03 -05:00
derekpierre f340e3b153
Simplify authentication logic for EIP1271. 2025-02-05 13:29:58 -05:00
derekpierre 75e49a603f
Sort list of chain ids returned by `/condition_chains` node endpoint.
Update test.
2025-02-05 13:29:58 -05:00
derekpierre 846cd931c7
Add assurance that the relevant EIP1271 contract address is provided for verifying the signature. 2025-02-05 13:29:58 -05:00
derekpierre ac5da6ce7e
Add unit and acceptance tests for EIP1271 authentication. 2025-02-05 13:29:54 -05:00
derekpierre 93ba45f48b
Initial implementation of EvmAuth for EIP1271.
Update use of provider manager across EvmAuth initerface and subsequent tests.
2025-02-05 13:29:47 -05:00
derekpierre dcd870d49e
Adjust tests to use ConditionProviderManager instead of the raw dictionary of providers.
Also adjust mocking since RPCCall no longer does the configuration of w3 instances; instead the ConditionProviderManager does it.
2025-02-05 13:11:29 -05:00
derekpierre 470f95f9ce
Remove use of NuCypherToken contract and corresponding use of NuCypherTokenAgent from tests since NuCypherToken contract was removed from `nucypher-contracts` repos. 2025-02-05 12:00:12 -05:00
derekpierre 78889274ce
Update lingo test file based on current schema and add test for all entries in the file. 2025-02-05 12:00:02 -05:00
derekpierre 74df16e015
Apply AI RFCs from #3571.
- Use random uuid4 as id for request
- Improve error handling in case code/message isn't available.
- Add to headers dictionary instead of recreating
- offchain -> off-chain
2025-01-02 10:04:15 -05:00
derekpierre cc1954cf04
Add acceptance test that showcases possible prototyping strategy for making RPC calls on non-evm blockchains. 2024-12-20 09:35:50 -05:00
derekpierre b7cb9375a7
Improve test coverage.
Minor code clean up.
2024-12-19 10:33:02 -05:00
derekpierre 258f5cd3ae
Use json parameter instead of data when using requests.post; also simplifies testing. 2024-12-19 10:32:59 -05:00
derekpierre 91779df1fb
Add unit tests for JsonRpcCondition. 2024-12-19 10:32:58 -05:00
derekpierre e51a02c26a
Split out JsonPathField tests into its own test module. 2024-12-19 10:32:57 -05:00
derekpierre 2a112005ff
Refactor JSON functionality into its own package.
JsonRequestCall is the base abstract class for all HTTPS JSON-based requests.
JsonApiCall subclasses JSONRequestCall for use with the JsonApiCondition.
Update imports and references accordingly.
2024-12-19 10:32:51 -05:00
derekpierre acf59fdd9f
Remove commented out lines in tests concerning unsupported chain ids. Condition objects don't have any concept of TACo domains and therefore have no insight into which chains are supported. Now that `lynx` supports "any" EVM chain this has become more evident and those test cases are not longer valid. 2024-12-12 12:39:33 -05:00
James Campbell 8668583ba0
Use `functools.cache` instead of memoize and update tests accordingly 2024-12-12 13:58:40 +01:00
James Campbell d06d2880a3
Use TACoDomain object when fetching rpc 2024-12-11 13:13:25 +01:00
James Campbell d2a4536612
Remove condition chain validation from Operator and update test infrastructure 2024-12-10 11:47:58 +01:00
James Campbell 681ae66bf5
Refactor RPC endpoint management to use domain-specific endpoints 2024-12-10 11:47:36 +01:00
James Campbell c8d5227d28
Remove condition chains concept from domains and related tests 2024-12-10 11:47:32 +01:00
derekpierre 007fdeb9fc
Stop using deprecated datetime methods. 2024-12-06 14:11:40 -05:00
derekpierre f323bf212b
Comment out chain id validation for now, since it is possible to use other chains. We probably want to still do validation on mainnet, but not on lynx - let's deal with that in a later commit.
Comment out tests on validity of chain id provided to EVM conditions.
2024-12-06 12:13:23 -05:00
derekpierre b4a6e24d58
Fix faulty condition tests - each needed a new copy of the condition dict. 2024-12-06 12:13:21 -05:00
James Campbell 11499a3462
Update test from EIP712 to EIP4361 2024-11-29 17:39:40 +01:00
James Campbell 40339d4f5e
Fix json api test 2024-11-29 17:39:40 +01:00
James Campbell 7710d5a2e4
Add failing test for :userAddress in json api condition url 2024-11-29 17:39:40 +01:00