Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
VIP: Add support for Chain ID Opcode #1652
Add support for the chain ID opcode through a new environment variable
Being able to know what chain a contract is located on is valuable for many different kinds of signature verification operations because it is often used as a domain separator for message signing. Creating an environment variable that queries this value means there will be no human error involved in maintaining this value within contracts, so that contracts developed on testnets don't allow replay attacks when they are deployed on the mainnet.
The feature is described in full via EIP-1344. In vyper, this should appear as the
No backwards incompatibilities
Copyright and related rights waived via CC0