loomchain icon indicating copy to clipboard operation
loomchain copied to clipboard

Add Solidity libary function to get ed25519 address mapped to secp256k1 address

Open Sriep opened this issue 5 years ago • 1 comments

  • [ ] I added unit tests for any code that added
  • [ ] I updated the CHANGELOG.md
  • [x] All IP is original and not copied from another source
  • [x] I assign all copyright to Loom Network for the code in the pull request

Addresses https://github.com/loomnetwork/loomchain/issues/1498 Needs https://github.com/loomnetwork/transfer-gateway/pull/101 Adds new LoomNativeApi Solidity library

library LoomNativeApi {
    function MappedAccount(string memory from, address addr) public view returns (address) 
    function MappedAccount(string memory from, address addr, string memory to) public view returns (address) 
}

Sriep avatar Oct 04 '19 12:10 Sriep

Adds new loomchain/evm/precompiles directory with new EvmPrecompilerHandler interface. The LoomNativeApi library is at loomchain/e2e/tests/truffle/contracts/LoomNativeApi.sol. Referenced https://blog.ricmoo.com/verifying-messages-in-solidity-50a94f82b2ca for striping prefix in truffle test.

Sriep avatar Oct 11 '19 08:10 Sriep