-
Notifications
You must be signed in to change notification settings - Fork 766
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
[pallet-revive] Add Ethereum JSON-RPC server #5953
Changes from 44 commits
75ca3f9
19dbf4c
595e66a
96fa31d
551cd3d
2a90e9b
4dede9c
c2609fa
444970b
f10cf13
f0e21af
205d8ab
0011601
ed4c0d0
de0b0ef
a745fb0
75d39a6
7fea557
8c7fc93
865acc4
e806110
c95a99f
a4ca32b
53c72c5
511842f
c43a520
a1c0ad1
4341122
87a84ed
d3f536b
ef0b614
026453f
71cc897
0446289
1a6cbec
a82401f
26abb73
3183d67
7527e9f
c06133d
e695c13
44cd6cc
680a83b
6b5a956
7bfff66
6d91b2e
6eddc80
dcc72c5
87d2bf8
71a2439
b359f32
5894fb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
title: "[pallet-revive] Ethereum JSON-RPC" | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
Add a new Ethereum JSON-RPC server that can be used a substrate chain configured with pallet-revive | ||
crates: | ||
- name: pallet-revive-eth-rpc | ||
bump: patch | ||
- name: pallet-revive-fixtures | ||
bump: patch |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// This file is part of Substrate. | ||
|
||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#![no_std] | ||
#![no_main] | ||
|
||
use common::input; | ||
use uapi::{HostFn, HostFnImpl as api}; | ||
|
||
#[no_mangle] | ||
#[polkavm_derive::polkavm_export] | ||
pub extern "C" fn deploy() { | ||
input!(128, data: [u8],); | ||
api::deposit_event(&[], data); | ||
} | ||
|
||
#[no_mangle] | ||
#[polkavm_derive::polkavm_export] | ||
pub extern "C" fn call() { | ||
input!(128, data: [u8],); | ||
api::deposit_event(&[], data); | ||
Comment on lines
+33
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we assert the selector here? ether.js should derive a selector from the provided ABI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah right yes it does, might be easier to add the assert in the js code directly, since that's where we define the "fake ABI" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we want the assert here, too. So we can make sure that the selector actually reaches the contract. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have a better name than just "demo". Maybe "rpc_demo".