initial SELFDESTRUCT support (#400)

Note:
- The unstable interface in `v2509.0.0` of `polkadot-sdk` is required.
- The differential test fails against EVM in `v2509.0.0` of
`polkadot-sdk`.

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus
2025-11-03 15:04:04 +01:00
committed by GitHub
parent c0cdde5a5a
commit 70037e1136
8 changed files with 97 additions and 31 deletions
+2
View File
@@ -101,4 +101,6 @@ POLKAVM_IMPORT(void, set_immutable_data, uint32_t, uint32_t);
POLKAVM_IMPORT(uint32_t, set_storage_or_clear, uint32_t, uint32_t, uint32_t)
POLKAVM_IMPORT(void, terminate, uint32_t)
POLKAVM_IMPORT(void, value_transferred, uint32_t)
+4 -1
View File
@@ -64,11 +64,13 @@ pub static SET_IMMUTABLE_DATA: &str = "set_immutable_data";
pub static SET_STORAGE: &str = "set_storage_or_clear";
pub static TERMINATE: &str = "terminate";
pub static VALUE_TRANSFERRED: &str = "value_transferred";
/// All imported runtime API symbols.
/// Useful for configuring common attributes and linkage.
pub static IMPORTS: [&str; 32] = [
pub static IMPORTS: [&str; 33] = [
ADDRESS,
BALANCE,
BALANCE_OF,
@@ -100,6 +102,7 @@ pub static IMPORTS: [&str; 32] = [
RETURNDATASIZE,
SET_IMMUTABLE_DATA,
SET_STORAGE,
TERMINATE,
VALUE_TRANSFERRED,
];