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

feat: add sending l2 tx #5002

Merged
merged 35 commits into from Nov 15, 2022
Merged

Conversation

Tuditi
Copy link
Contributor

@Tuditi Tuditi commented Oct 21, 2022

Summary

This PR adds support for L1 -> L2 transactions.

Changelog

- Add getLayer2TransactionData function
- Removed metadata and tag when creating newTransactionDetails
- Added draft TextInput

Relevant Issues

closes: #4981

Testing

Alias Output address representing SMR network: rms1pzw5y4e4y6gzkytvjp0ukgjgs37vd33uvnju9tuf6rrztnnw4tj7crw72ar

Follow the guide here to set-up your metamask for the Shimmer EVM: https://hackmd.io/SWpeUi_eTDKbnvK623vMmw#Configuring-MetaMask

In Firefly select the Shimmer EVM from the network drop-down and then input your EVM address in the recipient field (needs polish).

Platforms

Please select any platforms where your changes have been tested.

  • Desktop
    • MacOS
    • Linux
    • Windows
  • Mobile
    • iOS
    • Android

Instructions

Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.

...

Checklist

Please tick all of the following boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

@Tuditi Tuditi self-assigned this Oct 21, 2022
@Tuditi Tuditi changed the base branch from develop to stardust-develop October 21, 2022 14:16
@Tuditi Tuditi changed the title feat:add sending l2 tx feat: add sending l2 tx Oct 21, 2022
@Tuditi Tuditi mentioned this pull request Nov 9, 2022
12 tasks
@Tuditi Tuditi linked an issue Nov 11, 2022 that may be closed by this pull request
3 tasks
@Tuditi Tuditi marked this pull request as ready for review November 14, 2022 08:41
Copy link
Contributor

@nicole-obrien nicole-obrien left a comment

Choose a reason for hiding this comment

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

As discussed on the call heres the main improvements to make:

  • Lets make it so that we are not converting anything until we actually call the send function, so we can store all the params in the new transaction store and go backwards and forwards with ease.
  • Add a network subject type to store network and address or just address as the subject and then store this in the recipient of the new transaction
  • Add a layer 2 params to the new transaction and potentially a flag to say its layer 2. Then in another task we can easily use this data to go backwards and forwards in the send flow or to show the layer 2 details rather than the metadata as hex.
  • Add a feature flag to make the network field readonly in the mainnet profiles but not in dev profiles.
  • Add a Shimmer Testnet EVM network so its different to the Shimmer EVM

Copy link
Contributor

@nicole-obrien nicole-obrien left a comment

Choose a reason for hiding this comment

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

As per our review call:

  • some of file names for constants don't match the constant names
  • we should move the smart contract params to the params of the function to make it fully generic
  • we should rename getLayer2Metadata to make it clear this is for a specific contract and call
  • Ideally we should be adding the gas budget onto the amount when creating the output as this is an addition to the user defined amount which is used in the allowance field of the contract

Copy link
Contributor

@nicole-obrien nicole-obrien left a comment

Choose a reason for hiding this comment

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

LGTM!

@nicole-obrien nicole-obrien merged commit da12889 into stardust-develop Nov 15, 2022
@nicole-obrien nicole-obrien deleted the feat/add-sending-l2-tx branch November 15, 2022 14:24
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.

[Task]: Construct a wrapToLayer2 function
2 participants