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: native tokens #155

Merged
merged 29 commits into from
Sep 13, 2024
Merged

feat: native tokens #155

merged 29 commits into from
Sep 13, 2024

Commits on May 28, 2024

  1. feat: native tokens

    Co-authored-by: Iaroslav Mazur <[email protected]>
    PaulRBerg and IaroslavMazur committed May 28, 2024
    Configuration menu
    Copy the full SHA
    5a7168f View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. chore: address PR review

    PaulRBerg committed May 30, 2024
    Configuration menu
    Copy the full SHA
    13ae569 View commit details
    Browse the repository at this point in the history
  2. feat: mntcallvalues in Precompile

    feat: EOAs not allowed as Precompile callers
    
    fix: argument push order for BALANCEOF;
    
    test: mntcallvalues via Precompile;
    test: fix the caller's Nonce;
    
    refactor: extract the byte-parsing tools to primitives/utilities.
    IaroslavMazur committed May 30, 2024
    Configuration menu
    Copy the full SHA
    eb07a64 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. fix: SabVM passing the Ethereum tests

    fix: the "shallow" sender->recipient token transferring in Journaled State;
    fix: value-passing to the created smart contracts;
    fix: the NT-aware definition of an "empty" account;
    
    build: fix the issues when building in the no-std mode;
    
    test: use InMemoryDB in State Tests, instead of EmptyDB;
    test: remove the gas cost for transferring NTs (for the time being);
    
    refactor: remove the unnecessary mutability of `self` in the Database trait impl.
    IaroslavMazur committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    3983821 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

  1. Configuration menu
    Copy the full SHA
    4d7747f View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. feat: bring "msg.sender" & "is static call" info into the

    	  Precompile;
    
    feat: burning tokens from the explicit holder;
    feat: disallow calling the state-changing Precompile functions in
    	  a static context/call;
    feat: disallow EOAs to call certain Precompile functions;
    
    fix: the address of the Native Tokens Precompile;
    fix: work with Address bytes wrt the EVM WORD size;
    fix: msg.sender instead of tx.origin as minter/burner inside the
    	 Precompile;
    
    test: EOA->EOA token transfer;
    test: EOA->contract token transfer;
    test: balanceOf() via Native Tokens library;
    test: mint() via the SRF20 Token Mock;
    test: burn() via the SRF20 Token Mock;
    
    chore: remove the no-longer-relevant tests;
    IaroslavMazur committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    b3470a5 View commit details
    Browse the repository at this point in the history
  2. fix: the "0x706" prefix in u64_to_prefixed_address()

    test: u64_to_prefixed_address();
    
    chore: fix clippy workflow issues.
    IaroslavMazur committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    e1e87df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    30f1ff9 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. feat: token transfer Precompile functionality

    test: token transfer via Precompile;
    test: use SpecId::LATEST;
    
    refactor: db token balance extraction.
    IaroslavMazur committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    3842736 View commit details
    Browse the repository at this point in the history
  2. feat: transfer multiple Precompile functionality

    feat: fail if the Precompile input has been ill-formed;
    IaroslavMazur committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    96ae99e View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2024

  1. fix: transfer multiple Precompile functionality

    test: transfer MNTs via precompile;
    
    refactor: remove the incorrect is_tx_sender_eoa() logic.
    IaroslavMazur committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    b357be5 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2024

  1. Configuration menu
    Copy the full SHA
    efdfdef View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. BREAKING CHANGE: internal contract calls triggered w/o EVM opcodes

    refactor: adapt existing precompiles in light of the above
    IaroslavMazur committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    bf4de1c View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. feat: Transfer Multiple and Call Precompile functionality

    feat: token IDs validation in transfer-multiple
    
    test: transfer-multiple-and-call
    
    refactor: clean the code
    IaroslavMazur committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    7079e74 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. test: balanceOf() via a contract

    refactor: remove the EOA-to-Precompile balanceOf() test
    
    refactor: more natural order of args for balanceOf()
    refactor: make test names more suggestive
    IaroslavMazur committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    3ce3a78 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bd95dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c8e31b3 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. feat: persist transferred MNTs for Delegate Calls

    fix: Precompile now returns Transferred Tokens from Call and not Tx
    
    test: get Call Values as a contract
    
    refactor: remove the now-redundant EOA-to-Precompile test
    refactor: use a more suggestive naming in the SabVM tests
    IaroslavMazur committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    ea9353c View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    458e86c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5037e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3c55b4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0080f4a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    98977c3 View commit details
    Browse the repository at this point in the history
  6. fix: balance opcode

    IaroslavMazur committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    60afbd2 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. refactor: centralize the zero-amount check for burning

    refactor: Balances -> TokenBalances
    IaroslavMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    55fc3de View commit details
    Browse the repository at this point in the history
  2. docs: document the Native Tokens tests

    test: add some extra verifications in the tests
    
    refactor: make the naming inside the tests more suggestive
    IaroslavMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    04e9615 View commit details
    Browse the repository at this point in the history
  3. docs: document the Native Tokens Precompile

    refactor: extract the Precompile functionalities into stand-alone
    		  functions
    IaroslavMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    50632b3 View commit details
    Browse the repository at this point in the history
  4. refactor: clean the codebase

    docs: document the codebase
    IaroslavMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    7f2c373 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Configuration menu
    Copy the full SHA
    1fda4b6 View commit details
    Browse the repository at this point in the history