-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creating token pools from an existing ERC1155 contract #123
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awrichar
requested review from
peterbroadhurst,
nguyer and
shorsher
as code owners
May 12, 2023 19:09
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
awrichar
force-pushed
the
pool-id
branch
2 times, most recently
from
May 12, 2023 19:45
b562df3
to
f29a911
Compare
Pools on ERC1155 are really just ranges of the token ID space. Going forward, all pools will be expressed with a startId and endId. This makes the service logic much less bound to the specific decisions made in the sample contract around partitioning it in chunks of exactly 2^128. The old poolId format such as "F1" or "N2" will still be parsed as expected, but will not be attached to any new pools. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
awrichar
changed the title
Drop narrow "poolId" formatting in favor of "startId/endId"
Allow creating token pools from an existing ERC1155 contract
May 15, 2023
Must specify the contract address, along with a startId and endId for a range of token IDs to form the pool. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
shorsher
approved these changes
May 31, 2023
@@ -105,7 +105,7 @@ export class BlockchainConnectorService { | |||
// Check if retry condition matches the err that's been hit | |||
private matchesRetryCondition(err: any): boolean { | |||
return ( | |||
this.retryConfiguration.retryCondition != '' && | |||
this.retryConfiguration.retryCondition !== '' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pools on ERC1155 are really just ranges of the token ID space. Going forward,
all pools will be expressed with a
startId
andendId
. This makes the servicelogic much less bound to the specific decisions made in the sample contract
around partitioning it in chunks of exactly 2^128.
These
startId
andendId
params can also be passed in onconfig
(inaddition to
address
) when creating a token pool, which will generate andreturn pool details immediately instead of expecting to call a
create
method.The old poolId format such as "F1" or "N2" will still be parsed as expected,
but will not be attached to any new pools.
Fixes #104
Fixes #98
Breaking Change
There is a minor breaking change in that
info.typeId
on a token pool hasbeen replaced with
info.startId
for consistency. Any applications that happento rely on this field will need to change to the new spelling.