mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 16:21:05 +00:00
@@ -126,6 +126,8 @@ sol!(
|
||||
sol!(
|
||||
contract ExtCode {
|
||||
function ExtCodeSize(address who) public view returns (uint ret);
|
||||
|
||||
function CodeSize() public pure returns (uint ret);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -461,6 +463,18 @@ impl Contract {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn code_size() -> Self {
|
||||
let code = include_str!("../contracts/ExtCode.sol");
|
||||
let name = "ExtCode";
|
||||
|
||||
Self {
|
||||
name,
|
||||
evm_runtime: crate::compile_evm_bin_runtime(name, code),
|
||||
pvm_runtime: crate::compile_blob(name, code),
|
||||
calldata: ExtCode::CodeSizeCall::new(()).abi_encode(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn memcpy(payload: Vec<u8>) -> Self {
|
||||
let code = include_str!("../contracts/MCopy.sol");
|
||||
let name = "MCopy";
|
||||
|
||||
Reference in New Issue
Block a user