From f9c18bea3b5c7e18e9d60ee6bc45296dad2ead49 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Tue, 17 Jun 2025 23:56:03 -0700 Subject: [PATCH] Use `.eas` file extension instead of `.evm` for EVM assembly `.eas` appears to be latest practice as per recent assembly used in Pectra system smart contracts (May 2025): https://github.com/ethereum/sys-asm --- README.md | 6 +++--- burner.evm => burner.eas | 2 +- deployer.evm => deployer.eas | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename burner.evm => burner.eas (85%) rename deployer.evm => deployer.eas (87%) diff --git a/README.md b/README.md index a8d2f7f..fd14fd5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ See example JavaScript below. Copy this code into the DevTools console in any we ```javascript const addr = (await ethereum.request({ method: 'eth_requestAccounts' }))[0]; // Your current wallet address -const deployer = '0x696130ff5f526002601ef35f52600a601634f05f5f5f5f5f855af1'; // deployer.evm, compiled +const deployer = '0x696130ff5f526002601ef35f52600a601634f05f5f5f5f5f855af1'; // deployer.eas, assembled const burn = '100000000000000000'; // Amount of ETH to burn (in wei) // Irreversibly destroys all ETH sent @@ -44,7 +44,7 @@ const { provider } = wallets[0]; // Replace 0 with the index of the wallet you w // The remainder is the same as above except using `provider` instead of `ethereum` const addr = (await provider.request({ method: 'eth_requestAccounts' }))[0]; // Your current wallet address -const deployer = '0x696130ff5f526002601ef35f52600a601634f05f5f5f5f5f855af1'; // deployer.evm, compiled +const deployer = '0x696130ff5f526002601ef35f52600a601634f05f5f5f5f5f855af1'; // deployer.eas, assembled const burn = '100000000000000000'; // Amount of ETH to burn (in wei) // Irreversibly destroys all ETH sent @@ -62,7 +62,7 @@ await provider.request({ [EIP-6780](https://eips.ethereum.org/EIPS/eip-6780) (which went live in the [Dencun upgrade](https://eips.ethereum.org/EIPS/eip-7569) in March 2024) updates the behavior of the `SELFDESTRUCT` opcode so that a smart contract calling `SELFDESTRUCT` will only delete itself when it's called in the same transaction that created it. -Since the `deployer.evm` bytecode creates a new smart contract and then immediately calls it in the same transaction, its behavior is not changed by EIP-6780. +Since the `deployer.eas` bytecode creates a new smart contract and then immediately calls it in the same transaction, its behavior is not changed by EIP-6780. ## References - [Best way to burn ethers and other ethereum tokens?](https://ethereum.stackexchange.com/questions/16188/best-way-to-burn-ethers-and-other-ethereum-tokens/17617) diff --git a/burner.evm b/burner.eas similarity index 85% rename from burner.evm rename to burner.eas index 4901871..927196b 100644 --- a/burner.evm +++ b/burner.eas @@ -7,5 +7,5 @@ PUSH1 2 ;; size PUSH1 30 ;; offset RETURN -;; The above code, compiled: +;; The above code, assembled: ;; 0x6130ff5f526002601ef3 diff --git a/deployer.evm b/deployer.eas similarity index 87% rename from deployer.evm rename to deployer.eas index 3f9b24d..10275c6 100644 --- a/deployer.evm +++ b/deployer.eas @@ -2,7 +2,7 @@ ;; 1. Create a new smart contract using burner.evm ;; 2. Call the new smart contract -;; burner.evm, compiled +;; burner.evm, assembled PUSH10 0x6130ff5f526002601ef3 ;; value PUSH0 ;; offset MSTORE @@ -21,5 +21,5 @@ DUP6 ;; address GAS ;; gas CALL -;; This smart contract, compiled: +;; This smart contract, assembled: ;; 0x696130ff5f526002601ef35f52600a601634f05f5f5f5f5f855af1 -- 2.47.3