mirror of
https://github.com/status-im/EIPs.git
synced 2025-03-03 16:10:58 +00:00
Automatically merged updates to draft EIP(s) 1344
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
This commit is contained in:
parent
c3e063c8ff
commit
e1ed3eb66f
@ -17,7 +17,7 @@ This EIP adds an opcode that returns the current chain's EIP-155 unique identifi
|
||||
[EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) proposes to use the chain ID to prevent replay attacks between different chains. It would be a great benefit to have the same possibility inside smart contracts when handling signatures, especially for Layer 2 signature schemes using [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md).
|
||||
|
||||
## Specification
|
||||
Adds a new opcode `CHAINID` at 0x46, which uses 0 stack arguments. It will push the current chain ID onto the stack. The operation costs `G_base` to execute.
|
||||
Adds a new opcode `CHAINID` at 0x46, which uses 0 stack arguments. It pushes the current chain ID onto the stack. The operation costs `G_base` to execute.
|
||||
|
||||
## Rationale
|
||||
The current approach proposed by EIP-712 is to specify the chain ID at compile time. Using this approach will result in problems after a hardfork, as well as human error that may lead to loss of funds or replay attacks on signed messages.
|
||||
|
Loading…
x
Reference in New Issue
Block a user