Comments (12)
@ArjunBhuptani I updated the repo to use the latest openethereum packages, since everything moved over from paritytech to a new org. You'll want to pull the latest changes.
from pure-evm.
If we were to implement this ourselves and PR it, how would this work?
from pure-evm.
So all we should need to do is to implement the following I think?
call(...) {
fn call(
&mut self,
_gas: &U256,
_sender_address: &Address,
_receive_address: &Address,
_value: Option<U256>,
_data: &[u8],
_code_address: &Address,
_call_type: CallType,
_trap: bool,
) -> ::std::result::Result<MessageCallResult, TrapKind> {
if _receive_address == Address::hex!("0x1") {
let d = // do ecrecover here
Ok(MessageCallResult::Success(*gas, ReturnData::&*d))
} else {
unimplemented();
}
}
from pure-evm.
@ArjunBhuptani that seems like a good place to start. You also need to keep track of the callstack depth and implement the depth
externality--though you can probably just return a fake constant since it's only used on calls and creates.
from pure-evm.
Ah good tip, thanks!
from pure-evm.
Alright, so working on creating a test that will emulate this properly within our fork. Having a bit of trouble getting the regular node tests passing, are there specific instructions for running those?
from pure-evm.
Right now the workflow is:
cargo build
in root and in/wasm
make build
in/wasm
yarn install && yarn test
in/examples/node
but I seem to be messing things up along the way
from pure-evm.
I seem to be getting this error when trying to merge the browser and node packages:
sed: pkg-node/pure-evm_bg.js: No such file or directory
from pure-evm.
Yeah, as soon as I use the imports from ../pkg-node
it starts to behave
from pure-evm.
You should only need steps 2 and 3, as listed above.
Maybe you don't have wasm-pack
installed (or something else)? pkg-node
shouldn't be there if the build was successful.
(To install wasm-pack, you can use the docker container with all the required deps or install it directly with this line https://github.com/armaniferrante/pure-evm/blob/master/.circleci/docker/Dockerfile#L18)
from pure-evm.
yeah there was a different error when I didn't have wasm installed. not sure what's off with my build step quite yet, but found a workaround so i'll probably come back to that later
from pure-evm.
PR: #13
from pure-evm.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pure-evm.