ewasm / wrc20-examples

This repository contains examples of WRC20 tokens written in different languages.
MIT License
12 stars 5 forks source link

Test with Truffle in CircleCI #8

Open jwasinger opened 5 years ago

jwasinger commented 5 years ago

WIP

axic commented 5 years ago

Note, there is no reason to build Hera. One can use the releases: https://github.com/ewasm/hera/releases

jwasinger commented 5 years ago

Trying to use the release of hera..

panic: evmc loader: cannot open /home/builder/libhera.so

goroutine 54 [running]:
github.com/ethereum/go-ethereum/core/vm.createVM(0x7ffda1366f3d, 0x35, 0x0)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/evmc.go:60 +0x9c9
github.com/ethereum/go-ethereum/core/vm.NewEVMC(0x7ffda1366f3d, 0x35, 0xc000265500, 0xc000357cd0)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/evmc.go:89 +0x39
github.com/ethereum/go-ethereum/core/vm.NewEVM(0x108ecb8, 0x108ecc0, 0xc0052116b0, 0x9e5172cf7e977679, 0x63408c6bc1276a65, 0x786be429, 0xc00019ffa0, 0x9e5172cf7e977679, 0x63408c6bc1276a65, 0x786be429, ...)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/evm.go:144 +0x211
github.com/ethereum/go-ethereum/core.ApplyTransaction(0xc0002a8120, 0x125a560, 0xc0051a8000, 0xc024353558, 0xc0001c75c0, 0xc00568c1a0, 0xc0000d9d40, 0xc0002a85a0, 0xc0000d9f10, 0x0, ...)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/state_processor.go:97 +0x21d
github.com/ethereum/go-ethereum/miner.(*worker).commitTransaction(0xc000223c00, 0xc0002a85a0, 0x9e5172cf7e977679, 0x63408c6bc1276a65, 0xd3dd97be786be429, 0xc0786be429, 0x0, 0x0, 0x443fc1, 0x1091660)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:694 +0x13c
github.com/ethereum/go-ethereum/miner.(*worker).commitTransactions(0xc000223c00, 0xc005211650, 0x9e5172cf7e977679, 0x63408c6bc1276a65, 0x786be429, 0xc0001c74a0, 0xbf2cedd8a11802ba)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:764 +0x294
github.com/ethereum/go-ethereum/miner.(*worker).commitNewWork(0xc000223c00, 0xc0001c74a0, 0x1, 0x5cd33fe2)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:932 +0xb75
github.com/ethereum/go-ethereum/miner.(*worker).mainLoop(0xc000223c00)
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:410 +0xba4
created by github.com/ethereum/go-ethereum/miner.newWorker
        /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:218 +0x506

/home/builder/libhera.so exists

jwasinger commented 5 years ago

Also, issue persists even when not using Docker.

axic commented 5 years ago

Of it must be some missing symbol issue. (The new EVMC loader is capable returning proper error messages, but the geth PR is not updated yet.)

jwasinger commented 5 years ago

Okay, I think this should be mergeable now that it's in a state where other WRC20 implementations can make use of the tests.

I want to add more tests but C is currently failing transfer: https://github.com/ewasm/wrc20-examples/blob/25674c045a1dbe2837858522adfe06f3df877285/truffle/test/ERC20.test.js#L33-L43

This also needs an updated README and probably renaming/cleanup.