runtime: solc toolchain + ERC-20 integration test (closes #52)#63
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #52.
Real Solidity contracts now run end-to-end on chains built with Cleave. Compile with the real
solc, deploy viaEvm::deploy, call standard ERC-20 functions via ABI-encoded calldata. Removes the "v0.3 EVM engine accepts raw bytecode only" caveat from the runtime README.What landed
Solidity fixture
runtime/tests/fixtures/MiniERC20.sol: minimal ERC-20 withbalanceOf,transfer,totalSupply, and a constructor that mints initial supply to the deployer. ~30 lines, no allowance / approve / events (kept narrow to focus on proving the pipeline works).Integration test (
runtime/tests/solidity.rs)solc --bin --optimizeand parses the textual output for the named contract's deployment bytecodebalanceOf(address)->0x70a08231transfer(address,uint256)->0xa9059cbbtotalSupply()->0x18160dddconstructor(uint256))erc20_deploys_and_transfers: deploys with 1M supply -> alice has 1M, bob has 0 -> alice transfers 100 to bob -> alice has 999_900, bob has 100erc20_transfer_reverts_when_insufficient_balance: bob (zero balance) transfers 1 -> revertsolcis not on PATH (same pattern as the cleavec-dependent end-to-end test)CI
apt-get install solcadded to the runtime job. Every PR now exercises real Solidity compilation in CI.Docs
Runtime README:
End-to-end demo
Local run on Apple M3 Pro:
What this PR does NOT yet do
eth_sendRawTransaction/eth_call; we haven't built that adapter.forge buildthencleave-run --evm <hex>if they want; tighter integration is a future tooling PR.What unblocks next
cargo test --test solidity.