Reference
The Rosetta Table
Every core EVM / Solidity concept, mapped to its NEAR equivalent. A blank cell means there’s no direct analog on that side. Use it as a quick lookup; each idea gets a full side-by-side treatment in its chapter.
| Solidity / EVM | NEAR |
|---|---|
ERC-20 | NEP-141Fungible token |
ERC-721 | NEP-171NFT |
ERC-1155 | NEP-245Multi-token |
address | AccountIdNamed accounts (alice.near), not 20-byte hashes |
msg.sender | env::predecessor_account_id() |
tx.origin | env::signer_account_id() |
msg.value | env::attached_deposit()NearToken (yocto-NEAR) |
wei (10^18) | yocto-NEAR (10^24) |
mapping(k => v) | LookupMap / UnorderedMapExplicit, from near_sdk::store |
require / revert | assert! / env::panic_strRolls back, refunds unused gas |
constant | const (module level) |
view / pure | &self methodA receiver, not a keyword |
payable | #[payable] |
emit Event(...) | env::log_str (NEP-297 JSON) |
approve + transferFrom | ft_transfer_callTransfer-and-call; no allowance |
proxy upgrade pattern | DeployContract actionNative self-upgrade |
EIP-712 / meta-tx | NEP-366 + access keysNative account abstraction |
selfdestruct | —No equivalent (accounts deleted explicitly) |