Ethereum
EIP
EIP | Name | Status | Notes |
---|---|---|---|
EIP-20 | Token Standard | Final | ERC-20 - Fungible Token/同质货 币 |
[EIP-137] | Ethereum Domain Name Service | Final | |
EIP-155 | Simple replay attack protection | Final | fork block 2,675,000 - hash(transaction) 包含 chainId |
EIP-165 | Standard Interface Detection | Final | ERC-165 - 检测合约是否实现 接口 |
EIP-191 | Signed Data Standard | Final | |
EIP-165 | Standard Interface Detection | Final | |
EIP-712 | Ethereum typed structured data hashing and signing | Review | eth_signTypedData |
EIP-721 | Non-Fungible Token Standard | Final | &EIP-165 |
EIP-777 | Token Standard | Final | ERC-20+ - Hooks,Decimals |
[EIP-1066] | Status Codes | ||
[EIP-1102] | Opt-in Account Exposure | ||
[EIP-1155] | Multi Token Standard | Final | 合约支持多种货币 - BAT |
EIP-1167 | Minimal Proxy Contract | Final | 实现代理合约 |
EIP-1193 | Ethereum Provider JavaScript API | window.ethereum | |
[EIP-1363] | Payable Token | Final | payable |
[EIP-1400] | |||
[EIP-1474] | Remote Procedure Call Specification | ||
[EIP-1559] | Fee market change for ETH 1.0 chain | Final | |
[EIP-1767] | GraphQL Interface to Ethereum Node Data | ||
EIP-1820 | Pseudo-introspection Registry Contract | ERC-165+ | |
[EIP-1822] | Universal Upgradeable Proxy Standard/UUPS | ||
[EIP-1967] | Proxy Storage Slots | ||
[EIP-2718] | Typed Transaction Envelope | Final | |
[EIP-2255] | Wallet Permissions | ||
EIP-2612 | permit | Review | ERC-20+ERC-712 |
EIP-2981 | NFT Royalty Standard | Final | |
EIP-3722 | Poster: A ridiculously simple general purpose social media smart contract | ||
[EIP-4626] | Tokenized Vault Standard | Final | |
[EIP-4675] | Multi-Fractional Non-Fungible Token Standard | ||
[EIP-6093] | Custom errors for commonly-used tokens |
- Token 标准
- EIP-1193
- Status of ERC
- ethereum/EIPs
secp256k1
签名 -v
,r
,s
EIP <-> ERC
- EIP = ERC
- EIP - Ethereum Improvement Proposals
- ERC - Ethereum Request for Comments
Fungible Token/同质货币
- 可交换 / transfer
Interface | ERC-165 ID |
---|---|
ERC165 | 0x01ffc9a7 |
ERC721 | 0x80ac58cd |
ERC721TokenReceiver | 0x150b7a02 |
ERC721Metadata | 0x5b5e139f |
ERC721Enumerable | 0x780e9d63 |
RPC
interface RPC {
// EIP-2255
wallet_requestPermissions(request: { eth_accounts: object }): Promise<object>;
wallet_getPermissions(
request: Record<string, { requiredMethods: string[] }>,
): Promise<Array<{ invoker: string; parentCapability: string; caveats: Array<{ type: string; value: string }> }>>;
// EIP-747
wallet_watchAsset(request: {
type: 'ERC:20';
options: { address: string; image?: string; decimals?: number; symbol?: string };
}): Promise<boolean>;
}
EIP-155
- 增加 chainId
(nonce, gasprice, startgas, to, value, data)
->(nonce, gasprice, startgas, to, value, data, chainid, 0, 0)
- https://chainid.network/
- ethereum-lists/chains
EIP-165
- 检测合约是否实现 接口
- interfaceID -
bytes4(keccak256('supportsInterface(bytes4)'))
=0x01ffc9a7 - < 30,000 gas
- 多个接口为 xor
interface ERC165 {
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
EIP-191
version | eip | title |
---|---|---|
0x00 | EIP-191 | Data with intended validator |
0x01 | EIP-712 | Structured data |
0x45 | EIP-191 | personal_sign messages |
- signed_data -
0x19 <1 byte version> <version specific data> <data to sign>.
EIP-712
结构化签名数据
- eth_signTypedData(address,typedData) - 增强 eth_sendTransaction 和 eth_sign 的签名能力
sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)))
- domainSeparator = hashStruct(eip712Domain)
struct EIP712Domain {
string name;
string version;
uint256 chainId; // EIP-155
address verifyingContract;
bytes32 salt;
}