GithubHelp home page GithubHelp logo

polyswarm / perigord Goto Github PK

View Code? Open in Web Editor NEW
104.0 13.0 26.0 220 KB

Perigord: Golang Tools for Ethereum Development

Home Page: https://polyswarm.io

License: Apache License 2.0

Go 35.59% Smarty 63.68% Shell 0.19% Dockerfile 0.53%

perigord's Introduction

NOT ACTIVELY MAINTAINED

The PolySwarm team is currently unable to actively maintain Perigord at the moment.

The PolySwarm team's priority is to faithfully deliver on our roadmap (https://polyswarm.io/road_map/index.html), which regrettably demands we turn our attention away from Perigord in the short term. The Ethereum smart contract development space is simply moving too quickly right now for us to support a Truffle alternative in addition to hitting our development milestones.

We plan to return to active Perigord maintenance in the future and will continue to welcome external contributions until we're able to resume work.

Thank you for your understanding!

~Paul

Perigord: Golang Tools for Ethereum Development

Note: Perigord is in development and it's API is subject to change.

Perigord Image (not covered by LICENSE)

This image is not covered by LICENSE.

Install

There is a Dockerfile in docker/Dockerfile to build a perigord image, to build run

$ pushd docker
$ docker build -t perigord .
$ popd

These instructions assume an Ubuntu 16.04 x86_64 environment.

Prerequisite: Golang 1.8

Some dependencies require Go 1.7+, but Go 1.6 is in Ubuntu 16.04's default repos. The below will install Go 1.8.

$ sudo add-apt-repository -y ppa:longsleep/golang-backports
$ sudo apt-get update
$ sudo apt-get install -y golang-go
$ mkdir $HOME/golang
$ echo "export GOPATH=$HOME/golang" >> ~/.bashrc
$ echo "export PATH=$PATH:$HOME/golang/bin" >> ~/.bashrc

Close / re-open your terminal or re-source your .bashrc.

Prerequisite: solc

$ sudo add-apt-repository -y ppa:ethereum/ethereum
$ sudo apt-get update
$ sudo apt-get install -y solc

Prerequisite: abigen

$ go get github.com/ethereum/go-ethereum
$ pushd $GOPATH/src/github.com/ethereum/go-ethereum
$ go install ./cmd/abigen
$ popd

Setup

$ go get -u github.com/polyswarm/perigord/...

Dev Dependency: go-bindata

$ go get -u github.com/jteeuwen/go-bindata/...

Usage

Run for usage information:

$ perigord

Tutorial

Refer to our introductory blog post for now.

perigord's People

Contributors

andreiashu avatar jkcomment avatar mjkoo avatar quantonganh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

perigord's Issues

Error when running go get -u github.com/polyswarm/perigord/...

When following the install instructions, at the Setup section, when running the command:

go get -u github.com/polyswarm/perigord/...

The following error is displayed:

package github.com/polyswarm/perigord/migration
	imports github.com/polyswarm/perigord/migration/bindings: cannot find package "github.com/polyswarm/perigord/migration/bindings" in any of:
	/usr/lib/go-1.9/src/github.com/polyswarm/perigord/migration/bindings (from $GOROOT)
	/home/frank/golang/src/github.com/polyswarm/perigord/migration/bindings (from $GOPATH)

Simplify go get instructions

Use ellipsis:

$ go get -u https://github.com/swarmdotmarket/perigord/...

In installation instructions.

Blocks on moving templated .go files to a different file extension.

Handle duplicate contract names

Currently unsure what happens with the binding generator when two or more contracts in separate subdirectories of the contracts directory have the same name, last might overwrite all preceding. Figure out proper way to handle this, perhaps we need to generate different golang packages or something similar.

bind now requires an additional param

They updated the library 2 weeks ago: https://github.com/ethereum/go-ethereum/tree/master/accounts/abi/bind

After I build my bindings, which are completely auto generated I am encountering an error with parameters/argument mismatches:

bindings/Foo.go:121:30: not enough arguments in call to
bind.NewBoundContract
have (common.Address, abi.ABI, bind.ContractCaller,
bind.ContractTransactor)
want (common.Address, abi.ABI, bind.ContractCaller,
bind.ContractTransactor, bind.ContractFilterer)

errors when installing / building

gsaxe2:~/Documents/crypto$ go get -u github.com/polyswarm/perigord/...

github.com/polyswarm/perigord/migration/bindings

../../go/src/github.com/polyswarm/perigord/migration/bindings/Migrations.go:122:61: undefined: bind.ContractFilterer
../../go/src/github.com/polyswarm/perigord/migration/bindings/Migrations.go:131:118: undefined: bind.ContractFilterer
../../go/src/github.com/polyswarm/perigord/migration/bindings/Migrations.go:136:30: too many arguments in call to bind.NewBoundContract

perigord deploy: no contract code at given address

Follow these:

Running perigord deploy, enter "blah":

Enter passphrase for account 0x945Cd603A6754cB13C3D61d8fe240990f86f9f8A:
Enter passphrase for account 0x945Cd603A6754cB13C3D61d8fe240990f86f9f8A:
Error: [no contract code at given address]
exit status 1
Error: [exit status 1]

Running perigord test:

Running migration 1
Enter passphrase for account 0x945Cd603A6754cB13C3D61d8fe240990f86f9f8A:
----------------------------------------------------------------------
FAIL: tests/Foo.go:26: foo_test.TestFoo

tests/Foo.go:28:
    c.Assert(session, NotNil)
... value = nil

Running migration 1
Enter passphrase for account 0x945Cd603A6754cB13C3D61d8fe240990f86f9f8A:
----------------------------------------------------------------------
FAIL: tests/TokenERC20.go:19: TokenERC20Suite.SetUpTest

tests/TokenERC20.go:22:
    c.Fatal(err)
... Error: authentication needed: password or unlock


----------------------------------------------------------------------
PANIC: tests/TokenERC20.go:33: TokenERC20Suite.TestName

... Panic: Fixture has panicked (see related PANIC)
OOPS: 0 passed, 2 FAILED, 1 MISSED
--- FAIL: Test (0.01s)
FAIL
exit status 1
FAIL	github.com/quantonganh/tokendapp	0.065s
Error: [exit status 1]
exit status 1
Error: [exit status 1]

Sure, default account has been unlocked:

> personal.unlockAccount(web3.eth.coinbase, "blah", 0)
true

What is the problem? Is there any configuration where I can config the passphrase for coinbase account?

Default generated migration file not working

If I try to run perigord migrations I get the following error:

migrations/1_Migrations.go:20:35: cannot use 0 (type int) as type accounts.Account in argument to network.NewTransactor
migrations/1_Migrations.go:38:35: cannot use 0 (type int) as type accounts.Account in argument to network.NewTransactor
migrations/2_Foo.go:20:35: cannot use 0 (type int) as type accounts.Account in argument to network.NewTransactor
migrations/2_Foo.go:38:35: cannot use 0 (type int) as type accounts.Account in argument to network.NewTransactor

This happens on a newly created project, out of perigord init as well as with any other project.
If it can be of any help, I'm working on macOS High Sierra.

Steps to reproduce

The issue first presented itself when working on a new contract (following your tutorial) but it happens as well on the default ones:

mkdir newProj
cd newProj
perigord init
perigord build
perigord migrate

how to watch the event of contract

Hi!

I recently development dapp using Perigord. Perigord is cool and easy to understand.
BTW, I would like to watch the event of contract, but will someone tell me how to do it?

Thank you and best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.