Skip to content
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

Add transaction compression mode bulkTransfer #586

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

YoshihitoAso
Copy link
Member

@YoshihitoAso YoshihitoAso commented Jan 14, 2024

  • Close: [FEATURE] Additional feature for bulkTransfer #581
  • Added functionality to execute bulkTransfer of token contracts.
  • Added "Transaction Compression Mode" to existing BulkTransfer functionality. I use the phrase "Compression" to mean "combining multiple transfers into a single transaction."
  • ⚠️ The interface has changed from the current API. Changes to the POST API are not backward compatible.
    • POST: /bond/bulk_transfer
    • GET: /bond/bulk_transfer
    • POST: /share/bulk_transfer
    • GET: /share/bulk_transfer

When using "transaction compression mode", transfer list must meet the following conditions:

  • All token_address must be the same.
  • All from_address must be the same.
  • from_address and issuer_address must be the same.

✏️ Note: The current implementation does not check whether the balance is sufficient for the amount transferred.

return value


EthereumAddress = Annotated[str, WrapValidator(ethereum_address_validator)]
Copy link
Member Author

@YoshihitoAso YoshihitoAso Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also improved Address validation.

# Split the original transfer list into sub-lists
chunked_transfer_list: list[list[BulkTransfer]] = list(
self.__split_list(list(transfer_list), 100)
)
Copy link
Member Author

@YoshihitoAso YoshihitoAso Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When executing bulkTransfer, the uploaded list is split into 100 items.

@YoshihitoAso YoshihitoAso marked this pull request as ready for review January 14, 2024 12:20
@YoshihitoAso YoshihitoAso self-assigned this Jan 14, 2024
Copy link
Member

@purplesmoke05 purplesmoke05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YoshihitoAso YoshihitoAso merged commit 2e65bce into dev-24.3 Jan 15, 2024
4 checks passed
@YoshihitoAso YoshihitoAso deleted the feature/#581 branch January 15, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Additional feature for bulkTransfer
2 participants