-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement Multisend Transaction Capability #13
Open
PriyanshuVijay-S
wants to merge
9
commits into
valory-xyz:main
Choose a base branch
from
PriyanshuVijay-S:feature/multisend-transaction-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implement Multisend Transaction Capability #13
PriyanshuVijay-S
wants to merge
9
commits into
valory-xyz:main
from
PriyanshuVijay-S:feature/multisend-transaction-integration
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
…nents This commit introduces the ERC20_NEW contract package into the contracts folder, featuring the new class ERC20_NEW designed to enhance our ABCI learning agents with updated token handling capabilities. Changes span across several components to ensure comprehensive integration: 1. **Contracts:** - Added ERC20_NEW class in the erc20_new package to manage interactions with ERC20 tokens more effectively. 2. **Agent Configuration:** - Updated �ea-config.yaml to reference the new ERC20_NEW contract, ensuring that the agent recognizes and utilizes this new contract class. 3. **Service Configuration:** - Modified service.yaml to include configurations that align with the changes in the ERC20_NEW contract operations. 4. **Skill Updates:** - Updated skill.yaml in both skill/learning_abci and skill/learning_chained_abci to ensure skills are compatible with the new contract functionalities. - Revised behaviors in �ehaviours.py to incorporate methods from ERC20_NEW for enhanced token transactions. These updates ensure that our learning agents are well-equipped to handle ERC20 token transactions with the latest contract logic, reflecting improved efficiency and compliance with current blockchain standards.
- Extend ConditionalNativeTransferBehaviour to handle conditional deposits into an ERC20 contract. - Add logic to deposit native coins based on the parity of the calculated transaction value. - Update contract.py in erc20_new and behaviours.py in skill/learning_abci with new deposit functionality.
…actions This commit updates the ConditionalNativeTransferBehaviour to bundle native token transfers and ERC20 deposits into a single multisend transaction. It modifies the get_multisend_safe_tx_hash function to accept both native transfer and ERC20 deposit data. This integration allows for more efficient transaction processing and cost optimization by executing both actions in a single blockchain transaction. Changes: - Modified ConditionalNativeTransferBehaviour to support gathering data for native and ERC20 transactions. - Updated get_multisend_safe_tx_hash to handle the packaging of multiple transaction data. - Integrated _build_safe_tx_hash to create the actual multisend transaction from the prepared data.
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.
Overview
This pull request introduces enhancements to the
ConditionalNativeTransferBehaviour
within our ABCI learning agent to support multisend transactions. This feature allows the agent to bundle native token transfers and ERC20 deposits into a single transaction, leveraging Gnosis Safe's multisend capabilities for improved efficiency and reduced transaction costs.Changes
ConditionalNativeTransferBehaviour: Expanded to include a method for creating multisend transactions that combine native token transfers and ERC20 contract deposits. This method coordinates the collection of necessary transaction data and submits it as a single multisend transaction.
get_multisend_safe_tx_hash: Updated to handle multiple types of transaction data, specifically for native transfers and ERC20 deposits. This method now packages these transactions into one multisend call.
_build_safe_tx_hash: Modified to process and execute the multisend transaction data prepared by
get_multisend_safe_tx_hash
.