Skip to content

Instantly share code, notes, and snippets.

View michaelsbradleyjr's full-sized avatar
💭
Dip trip, flip fantasia 🎺

Michael Bradley michaelsbradleyjr

💭
Dip trip, flip fantasia 🎺
View GitHub Profile
after deploying contracts
==========================
PASS SimpleStorage should set constructor value > 0.015s > 0 gas
PASS SimpleStorage set storage value > 0.064s > 53,294 gas
FAIL SimpleStorage should set to self address > 0.015s > 26,647 gas > Input A expected to strictly equal input B:
+ expected - actual
- '0x0000000000000000000000000000000000000000'
+ '0x04D45b51fe4f00b4478F8b0719Fa779f14c8A194'
PASS SimpleStorage should have the right defaultAccount > 0s > 0 gas
docker \
run \
-it \
--rm \
-v "$PWD/geth":"/geth" \
michaelsbradleyjr/geth-hera:ubuntu-ewasm-testnet-milestone1 \
--nousb \
--datadir=/geth/development/datadir \
init /geth/ewasm-testnet-geth-config.json
DEBUG[10-01|17:12:26.618] Recalculated downloader QoS values rtt=2.000000012s confidence=1.000 ttl=6.000000036s
INFO [10-01|17:12:26.687] Imported new block headers count=320 elapsed=946.556ms number=47424 hash=80307c…f16ab3 age=7mo6d16h
DEBUG[10-01|17:12:26.691] Fetching batch of headers id=58e63ffe8e8db2a1 conn=dyndial count=128 fromnum=73920 skip=191 reverse=false
DEBUG[10-01|17:12:26.691] Fetching batch of block bodies id=58e63ffe8e8db2a1 conn=dyndial count=1
DEBUG[10-01|17:12:26.694] Inserting fast-sync blocks items=160 firstnum=47105 firsthash=7c6caa…51dc0c lastnumn=47264 lasthash=69c286…a85c7a
INFO [10-01|17:12:26.702] Imported new block receipts count=160 elapsed=7.255ms number=47264 hash=69c286…a85c7a age=7mo6d17h size=640.00B
DEBUG[10-01|17:12:26.956] Filling up skeleton from=73729
DEBUG[10-01|17:12:26.959] Inserting fast-sync blocks items=160 firstnum=47265 firsthash=8fc

I started from the beginning to make sure my success was reproducible (at least on my machine!).

Here's a summary of the steps, and keep in mind that I'm on macOS:

$ brew install nim
$ pip install web3
$ git clone https://github.com/status-im/nimplay.git
$ cd nimplay
$ make get-nimclang-docker
embark reset && embark run --nobrowser --nodashboard --loglevel trace
Removing the following files:
/Users/michael/dapps/dev/snarky5/.embark
/Users/michael/dapps/dev/snarky5/chains.json
/Users/michael/dapps/dev/snarky5/coverage
/Users/michael/dapps/dev/snarky5/dist
/Users/michael/dapps/dev/snarky5/embarkArtifacts
/Users/michael/dapps/dev/snarky5/node_modules/.cache
private compile_contracts(contractFiles: any[], cb: Callback<any>) {
if (contractFiles.length === 0) {
return cb(null, {});
}
async.waterfall(
[
(next: Callback<any[]>) => {
this.plugins.runActionsForEvent("compiler:contracts:compile:before", contractFiles, (err?: Error | null, files: any[] = []) => {
if (err) {
private compile_contracts(contractFiles: any[], cb: Callback<any>) {
if (contractFiles.length === 0) {
return cb(null, {});
}
async.waterfall(
[
(next: Callback<any[]>) => {
this.plugins.runActionsForEvent(
"compiler:contracts:compile:before",
private compile_contracts(contractFiles: any[], cb: Callback<any>) {
if (contractFiles.length === 0) {
return cb(null, {});
}
async.waterfall(
[
(next: Callback<any[]>) => {
this.plugins.runActionsForEvent(
"compiler:contracts:compile:before",
/* global require setImmediate setTimeout */
const {EventEmitter} = require('events');
const {inspect} = require('util');
const {fromEvent: rxFromEvent, interval: rxInterval} = require('rxjs');
const {debounce: rxDebounce, filter: rxFilter} = require('rxjs/operators');
const {
AsyncIterableX: {from: ixFrom},
// in the top parts of the module with other imports/requires
const {fromEvent: rxFromEvent, interval: rxInterval, partition: rxPartition} = require('rxjs');
const {debounce: rxDebounce} = require('rxjs/operators');
const {AsyncIterableX: {from: ixFrom}, batch: ixBatch} = require('ix/asynciterable');
// -----------------------------------------------------------------------------
const fileChanges$ = rxFromEvent(engine.events, 'file-event');
const [assets$, others$] = rxPartition(