-
Notifications
You must be signed in to change notification settings - Fork 110
integration of managedMultiTransferESDTNFTExecuteByUser #1711
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
Draft
mihaicalinluca
wants to merge
10
commits into
master
Choose a base branch
from
transfer-by-user-opcode
base: master
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.
Draft
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6dea626
integration of managedMultiTransferESDTNFTExecuteByUser
mihaicalinluca 535c7a9
Merge branch 'master' into transfer-by-user-opcode
mihaicalinluca 90cb545
merge feat/vm-1.7.next1
mihaicalinluca a0af630
multi transfer esdt nft execute by user moved to send api and impl
mihaicalinluca c62f2f1
merge rc/v0.55
mihaicalinluca ad777eb
removed rust vm implementation, moved to a different PR
mihaicalinluca beb50cd
chain simulator test setup
mihaicalinluca 65aa549
further cleanup of rustVM impl
mihaicalinluca ffb2e23
merge rc/v0.55
mihaicalinluca bb4838d
ignore cs test
mihaicalinluca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| use crate::{ | ||
| tx_mock::TxInput, | ||
| types::{VMAddress, H256}, | ||
| }; | ||
|
|
||
| use super::{CallType, TxFunctionName, TxTokenTransfer}; | ||
|
|
||
| #[derive(Debug, Clone)] | ||
| pub struct TranferByUserData { | ||
mihaicalinluca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pub from: VMAddress, | ||
| pub to: VMAddress, | ||
| pub token_transfers: Vec<TxTokenTransfer>, | ||
| pub func_name: TxFunctionName, | ||
| pub arguments: Vec<Vec<u8>>, | ||
| pub tx_hash: H256, | ||
| } | ||
|
|
||
| pub fn transfer_by_user_tx_input( | ||
| transfer_by_user_call: &TranferByUserData, | ||
| call_type: CallType, | ||
| ) -> TxInput { | ||
| let mut egld_value = num_bigint::BigUint::default(); | ||
| let mut esdt_values = Vec::new(); | ||
|
|
||
| for transfer in &transfer_by_user_call.token_transfers { | ||
| if transfer.token_identifier.is_empty() && transfer.nonce == 0 { | ||
| egld_value += &transfer.value; | ||
| } else { | ||
| esdt_values.push(transfer.clone()); | ||
| } | ||
| } | ||
| TxInput { | ||
| from: transfer_by_user_call.from.clone(), | ||
| to: transfer_by_user_call.to.clone(), | ||
| egld_value, | ||
| esdt_values, | ||
| func_name: transfer_by_user_call.func_name.clone(), | ||
| args: transfer_by_user_call.arguments.clone(), | ||
| call_type, | ||
| gas_limit: 1000, | ||
| gas_price: 0, | ||
| tx_hash: transfer_by_user_call.tx_hash.clone(), | ||
| ..Default::default() | ||
| } | ||
| } | ||
This file contains hidden or 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
3 changes: 3 additions & 0 deletions
3
contracts/feature-tests/composability/forwarder/sc-config.toml
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,5 @@ | ||
| [[proxy]] | ||
| path = "src/forwarder_proxy.rs" | ||
|
|
||
| [[proxy]] | ||
| path = "../interact/src/forwarder_proxy.rs" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.