Support for upcoming smart-contract-based allocators. #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description
What: this PR stores "address" and "tooling" fields from allocator JSON files in database and exposes to clients via API.
Why: smart-contract allocators will need to make a different call on-chain to grant datacap to a client. Instead of calling verifreg directly, they'll need to call smart contract which will do it on their behalf. Address of this smart contract is stored in the "address" field and we need the "tooling" field to know when to use the new approach.
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
curl -H "Content-Type: application/json" -d '{"files_changed":["active/msig-classic.json","active/msig-contract.json"]}' localhost:8080/allocator/create
curl -s localhost:8080/allocators
, verified that it now includesaddress
andtooling
in the response.Checklist:
Before submitting your pull request, please review the following checklist:
Additional Information
I'm not sure if this change needs a change to documentation. Is there a documentation somewhere?
I also weren't able to run
fplus-lib
tests as they seem to depend on some specific repo (keyko-io/test-philip-second
). Please provide some guidance if you deem it necessary for this change.Also this needs a database schema migration, to add
address
andtooling
text columns toallocators
table. How should this be handled?