oasisprotocol / oasisprotocol/explorer
Can we detect push0 in contract bytecode?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 13
- Avg merge
- 58m
- Merged PRs (30d)
- 2
Description
Someone can successfully deploy a contract that was compiled using wrong evm version (not paris). These contracts are in half-malfunctioning state.
e.g. https://explorer.dev.oasis.io/testnet/sapphire/address/0x151d34946CA4F51B53cb01Dd713898458c7f1825/code#code
open it in abi playground:
Contract Data
decimals: 18
name: execution failed: invalid code 😱
Can we detect push0, or mcopy / tstore / tload in contract bytecode, to show a warning?
https://docs.blockscout.com/setup/information-and-settings/evm-version-information
some links
- https://etherscan.io/opcode-tool (need to strip some bytecode at the end - metadata, not real opcodes)
- https://jbecker.dev/research/evm-compiler-fingerprinting
- https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/examples/decode-opcodes.ts
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ABI playground behavior and the ethereumjs example decode-opcodes.ts, using the opcode tool as a reference for bytecode and metadata boundaries. Determine how push0, mcopy, tstore, and tload can be detected, then show a warning when deployed bytecode contains them and verify it against the linked example contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100