Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stylus programSize and programMemoryFootprint precompiles #13

Merged
merged 5 commits into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/precompiles/ArbWasm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ interface ArbWasm {
// @return version the program version (0 for EVM contracts)
function programVersion(address program) external view returns (uint16 version);

// @notice gets the uncompressed size of the program at the given address in bytes
// @return size the size of the program in bytes rounded up to a multiple of 512
function programSize(address program) external view returns (uint32 size);

// @notice gets the memory footprint of the program at the given address in pages
// @return footprint the memory footprint of program in pages
function programMemoryFootprint(address program) external view returns (uint16 footprint);

// @notice gets the conversion rate between gas and ink
// @return price the amount of ink 1 gas buys
function inkPrice() external view returns (uint32 price);
Expand Down
Loading