mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 06:01:00 +00:00
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:
@@ -661,6 +661,14 @@ impl FunctionCall {
|
||||
Name::Invalid => {
|
||||
revive_llvm_context::polkavm_evm_return::invalid(context).map(|_| None)
|
||||
}
|
||||
Name::SelfDestruct => {
|
||||
let arguments = self.pop_arguments_llvm::<1>(context)?;
|
||||
revive_llvm_context::polkavm_evm_return::selfdestruct(
|
||||
context,
|
||||
arguments[0].into_int_value(),
|
||||
)
|
||||
.map(|_| None)
|
||||
}
|
||||
|
||||
Name::Log0 => {
|
||||
let arguments = self.pop_arguments_llvm::<2>(context)?;
|
||||
@@ -962,13 +970,6 @@ impl FunctionCall {
|
||||
location
|
||||
)
|
||||
}
|
||||
Name::SelfDestruct => {
|
||||
let _arguments = self.pop_arguments_llvm::<1>(context)?;
|
||||
anyhow::bail!(
|
||||
"{} The `SELFDESTRUCT` instruction is not supported",
|
||||
location
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user