oasisprotocol / oasisprotocol/oasis-sdk

Consider returning some bytecode for subcall address

Open
#2,283 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
90
Forks
35
Avg merge
5d 9h
Merged PRs (30d)
5

Description

MetaMask tries to detect if subcall address is a contract

curl https://sapphire.oasis.io/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getCode","params":["0x0100000000000000000000000000000000000103","latest"],"id":1,"jsonrpc":"2.0"}'
# {"jsonrpc":"2.0","id":1,"result":"0x"}

this fails, so it assumes every transaction to it is a "Transfer Request". If we returned some bytecode it would show as "Transaction Request"

Transfer Request Transaction Request
Image Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Sapphire RPC handling for the eth_getCode request shown in the issue and verify the response for address 0x0100000000000000000000000000000000000103. Determine what bytecode response would make MetaMask classify the address as a contract, then confirm the resulting behavior in MetaMask. The issue names no source files or tests, so locating the relevant RPC entry point and adding coverage will require repository research.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.