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

Adding the ERC20 contract and UKM file #146

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Conversation

ACassimiro
Copy link
Collaborator

@ACassimiro ACassimiro commented Oct 7, 2024

Adding the first version of the UKM-compliant ERC20 contract. The current version needs a set of features to work, as elaborated on by the TODOs in the contract:

TODOs:
    - Integers are all u64 at the moment. Implement u256 and modify appropriately;
    - Reuse the implementation of ManagedBuffer for strings, and the annotations for
      the contract trait identification, as well as views, storage mappers, update, and
      inits;
    - Support some sort of struct for implementing MessageResult within the UKM module.
      We also have to figure out the contents of MessageResult.
  
Observations:
    - ManagedAddress was replaced by an integer to fit the behaviors of UKM;

These files are not associated with tests currently, and should be once the necessary infrastructure for running it is implemented.


#[endpoint(transfer)]
fn transfer(&self, to: u64, value: u64) -> bool {
let owner = ::ukm::Caller(), ;
Copy link
Member

Choose a reason for hiding this comment

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

Why the comma? Here and in other places.

@ACassimiro ACassimiro merged commit 3033bb4 into main Oct 7, 2024
2 checks passed
@ACassimiro ACassimiro deleted the ukm-erc20-contracts branch October 7, 2024 16:12
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.

2 participants