This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
[EVM] A precompile contrate to transfer the balance from the EVM account to the substrate account. #319
Comments
call from solidity:
pragma solidity ^0.6.0;
contract Test1 {
function transferBack() public view {
bytes32[3] memory output;
bytes32[3] memory h;
h[0] = hex"000000000000000000000000182c00A789A7cC6BeA8fbc627121022D6029a416";
h[1] = hex"d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d";
h[2] = hex"0000000000000000000000000000000000000000000000000000000000221388";
// h[3] = sign
bytes memory input = abi.encodePacked(h[0], h[1], h[2]);
assembly {
if iszero(staticcall(not(0), 0x1, input, 0x80, output, 0x40)) {
revert(0, 0)
}
}
}
} https://github.com/ethereum/EIPs/blob/master/EIPS/eip-152.md#example-usage-in-solidity |
wuminzhe
changed the title
A precompile contrate to transfer the balance from the EVM account to the substrate account.
[evm] A precompile contrate to transfer the balance from the EVM account to the substrate account.
Oct 15, 2020
wuminzhe
changed the title
[evm] A precompile contrate to transfer the balance from the EVM account to the substrate account.
[EVM] A precompile contrate to transfer the balance from the EVM account to the substrate account.
Oct 15, 2020
Can close now? #334 merged. |
|
Pre-compiled contracts do not have access to the from values of transactions and cannot resist relay attacks, so this solution is abandoned. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Question: Is it necessary to reconstruct the input format included
FROM
,TO
,VALUE
to adapt toTrait Precompile
?The text was updated successfully, but these errors were encountered: