mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-04 19:13:48 +00:00
EIP-1344: Updated links (#2264)
* EIP-1344: Updated links * EIP-1344: Fixed link formatting
This commit is contained in:
parent
4c4dd7dd11
commit
aaea642106
@ -14,7 +14,7 @@ created: 2018-08-22
|
|||||||
This EIP adds an opcode that returns the current chain's EIP-155 unique identifier.
|
This EIP adds an opcode that returns the current chain's EIP-155 unique identifier.
|
||||||
|
|
||||||
## Motivation
|
## Motivation
|
||||||
[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).
|
[EIP-155](https://eips.ethereum.org/EIPS/eip-155) 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://eips.ethereum.org/EIPS/eip-712).
|
||||||
|
|
||||||
## Specification
|
## Specification
|
||||||
Adds a new opcode `CHAINID` at 0x46, which uses 0 stack arguments. It pushes the current chain ID onto the stack. Chain ID is a 256-bit value. 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. Chain ID is a 256-bit value. The operation costs `G_base` to execute.
|
||||||
@ -43,11 +43,9 @@ This was previously suggested as part of [EIP901](https://github.com/ethereum/EI
|
|||||||
TBD
|
TBD
|
||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
A reference implementation is here:
|
A reference implementation for the Trinity Python client is [here](https://github.com/ethereum/py-evm/pull/1803).
|
||||||
https://github.com/fubuloubu/py-evm/tree/eip1344-chain-id
|
|
||||||
|
|
||||||
An example implementation of a trustless chain ID oracle was implemented here:
|
An example implementation of a trustless chain ID oracle was implemented [here](https://github.com/fubuloubu/chain-id-oracle/blob/master/ChainIdOracle.vy).
|
||||||
https://github.com/fubuloubu/chain-id-oracle/blob/master/ChainIdOracle.vy
|
|
||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user