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
Expose downloading Wasm binary #1712
Labels
A-RPC
Area: rpc
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-low
Priority: low
Milestone
Comments
MaksymZavershynskyi
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Nov 17, 2019
MaksymZavershynskyi
changed the title
[RPC] Expose downloading Wasm binary
Expose downloading Wasm binary
Nov 20, 2019
Clicked the subscribe button on this issue. Been talking with an experienced Ethereum dev who's excited about NEAR and he's similarly emphasized the importance of this. Wanted to give this issue a friendly bump. |
frol
pushed a commit
that referenced
this issue
Dec 17, 2020
Address #1712, also, add a dump_code command to state-viewer, so we can dump wasm file given account id, from node that doesn't yet have this rpc, e.g. testnet/mainnet: ``` nearcore (query-view-code) target/debug/state-viewer dump_code --account 1.test.near Dec 08 17:48:01.772 INFO near: Opening store database at "/home/bo/.near/data" Dec 08 17:48:01.911 INFO runtime: Tracking shards: {} Dump contract of account 1.test.near into file output.wasm nearcore (query-view-code) ls ATTRIBUTIONS.md CODEOWNERS Dockerfile METRICS.md runtime tests Cargo.lock config3601.json Dockerfile.nightly neard rustfmt.toml test-utils Cargo.toml configmaster.json docs nightly rust-toolchain tools chain CONTRIBUTING.md genesis-tools output.wasm scripts utils codecov.yml core LICENSE pytest SECURITY.md CODE_OF_CONDUCT.md deny.toml Makefile README.md target nearcore (query-view-code) base64 < output.wasm 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= ``` Test Plan ------------ ``` ~ http post http://localhost:3030 jsonrpc=2.0 id=dontcare method=query params:='{"request_type":"view_code","finality":"final","account_id":"test.near"}' HTTP/1.1 200 OK content-length: 155 content-type: application/json date: Tue, 08 Dec 2020 23:05:36 GMT { "error": { "code": -32000, "data": "contract code of account test.near does not exist while viewing", "message": "Server error" }, "id": "dontcare", "jsonrpc": "2.0" } ~ http post http://localhost:3030 jsonrpc=2.0 id=dontcare method=query params:='{"request_type":"view_code","finality":"final","account_id":"1.test.near"}' HTTP/1.1 200 OK content-length: 240 content-type: application/json date: Tue, 08 Dec 2020 23:05:43 GMT { "id": "dontcare", "jsonrpc": "2.0", "result": { "block_hash": "3mZUK6DnPUnGSKr7LdU56pNRd2vuMCsnWQQpP1qMFXnH", "block_height": 41020, "code_base64": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", "hash": "7KoFshMQkdyo5iTx8P2LbLu9jQpxRn24d27FrKShNVXs" } } ``` and also nightly ci test_upload_contract_testnet
ailisp
added this to the [Current] Public Node Interfaces 2020.11.30 - 2020.12.13 milestone
Dec 19, 2020
Done in #3714 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-RPC
Area: rpc
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-low
Priority: low
Currently, RPC allows seeing the account state (which includes Wasm code hash) and key values stored by the smart contract. But it does not allow seeing the code of the smart contract itself.
The text was updated successfully, but these errors were encountered: