eosspark / geos Goto Github PK
View Code? Open in Web Editor NEWgolang implementation of the EOS protocol
License: MIT License
golang implementation of the EOS protocol
License: MIT License
Can i get some contacts with you guys?
I tried to compile eos-go, but have too many errors.
May you make some guide for doing it?
as subject
I have one table:
root@gytan-VirtualBox:~# cleos get table pegzone pegzone transferinfo
{
"rows": [{
"id": 0,
"from": "user",
"to": "pegzone",
"quantity": "1.0000 SYS",
"memo": "xxxxx"
},{
"id": 1,
"from": "pegzone",
"to": "user",
"quantity": "1.0000 SYS",
"memo": "xxx"
},{
"id": 2,
"from": "user",
"to": "pegzone",
"quantity": "1.0000 SYS",
"memo": "cccc"
},{
"id": 3,
"from": "user",
"to": "pegzone",
"quantity": "1.0000 SYS",
"memo": "AAAA"
},{
"id": 4,
"from": "user",
"to": "pegzone",
"quantity": "1.0000 SYS",
"memo": "AAAA"
},{
"id": 5,
"from": "user",
"to": "pegzone",
"quantity": "1.0000 SYS",
"memo": "AAAA"
}
],
"more": false
}
I get data by the following way:
//
type eostransfer struct {
id uint64 json:"id"
from eos.AccountName json:"from"
to eos.AccountName json:"to"
quantity eos.Asset json:"quantity"
memo string json:"memo"
}
//
eos_api := eos.New("http://127.0.0.1:8888")
eos_info, _ := eos_api.GetInfo() // successful
//
gettable_request := eos.GetTableRowsRequest {
Code: "pegzone",
Scope: "pegzone",
Table: "transferinfo",
LowerBound: strconv.FormatInt(0, 10),
}
//
gettable_response, eos_err := eos_api.GetTableRows(gettable_request)
if eos_err != nil {
panic("eos get table failed")
}
//
var transfers []*eostransfer
err_json := gettable_response.BinaryToStructs(&transfers)
if err_json != nil {
panic("eos get table failed")
}
//
c.logger.Info("query chain table", "total", len(transfers)) // 6
for i, tran := range transfers {
c.logger.Info("eos transfer", "id", tran.id)
c.logger.Info("eos transfer", "from", tran.from)
c.logger.Info("eos transfer", "to", tran.to)
c.logger.Info("eos transfer", "quantity", tran.quantity.String())
c.logger.Info("eos transfer", "memo", tran.memo)
}
// id = 0, from & to & memo is empty
what's going wrong?
[INFO] --> Fetching github.com/pmezard/go-difflib
[ERROR] Error scanning github.com/eosspark/eos-go/btcsuite/btcd/btcec: cannot find package "." in:
/data/go/src/github.com/eosspark/eos-go/btcsuite/btcd/btcec
[ERROR] Error scanning github.com/eosspark/eos-go/btcsuite/btcutil: cannot find package "." in:
/data/go/src/github.com/eosspark/eos-go/btcsuite/btcutil
[ERROR] Error scanning github.com/eosspark/eos-go/btcsuite/btcutil/base58: cannot find package "." in:
/data/go/src/github.com/eosspark/eos-go/btcsuite/btcutil/base58
[ERROR] Failed to retrieve a list of test dependencies: Error resolving imports
Seems like https://github.com/perlin-network/life is more promising than wagon
.
Have you taken a look?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.