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

New construction example #7

Merged
merged 2 commits into from
Oct 5, 2022
Merged

Conversation

andreibancioiu
Copy link
Contributor

@andreibancioiu andreibancioiu commented Oct 5, 2022

  • Add new example, for cross-shard transactions. In this case, the preprocess metadata should include the receiver (and, optionally the value - if not provided, it will be inferred from the first operation).
  • Adjust (simplify) construction DSL.

Related to: multiversx/mx-chain-rosetta#52

@andreibancioiu andreibancioiu changed the title Adjust construction DSL. Add new example, for cross-shard transactions. New construction example Oct 5, 2022
@andreibancioiu andreibancioiu self-assigned this Oct 5, 2022
@andreibancioiu andreibancioiu marked this pull request as ready for review October 5, 2022 08:01
"account_identifier": {
"address": "erd1ldjsdetjvegjdnda0qw2h62kq6rpvrklkc5pw9zxm0nwulfhtyqqtyc4vq"
},
"privkey": "3e4e89e501eb542c12403fb15c52479e8721f2f4dedc3b3ef0f3b47b37de006c",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed so that the example works out-of-the-box (test account).

}
];
transfer.preprocess_metadata = {
"receiver": "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alice is in shard 1, while the sender is in shard 0.

@@ -25,8 +23,6 @@ transfer(1){
"account_identifier": {
"address": "erd1xtslmt67utuewwv8jsx729mxjxaa8dvyyzp7492hy99dl7hvcuqq30l98v"
},
"privkey": "e2cfd1bf75bd3d2f7a5cdc35f0d9d0ed395185e3beab941e0d03f5f8f9da4dec",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't actually needed (is already in the parent JSON file).

@iulianpascalau iulianpascalau self-requested a review October 5, 2022 10:15
@bogdan-rosianu bogdan-rosianu self-requested a review October 5, 2022 10:27
@andreibancioiu andreibancioiu merged commit e136fcd into main Oct 5, 2022
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.

3 participants