Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
56c2f651
Commit
56c2f651
authored
May 21, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
7fe73deb
c371f9a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
packages.go
ethrpc/packages.go
+60
-0
No files found.
ethrpc/packages.go
View file @
56c2f651
...
@@ -182,6 +182,66 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *string) error {
...
@@ -182,6 +182,66 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *string) error {
return
nil
return
nil
}
}
type
GetTxCountArgs
struct
{
Address
string
`json:"address"`
}
type
GetTxCountRes
struct
{
Nonce
int
`json:"nonce"`
}
func
(
a
*
GetTxCountArgs
)
requirements
()
error
{
if
a
.
Address
==
""
{
return
NewErrorResponse
(
"GetTxCountAt requires an 'address' value as argument"
)
}
return
nil
}
type
GetPeerCountRes
struct
{
PeerCount
int
`json:"peerCount"`
}
func
(
p
*
EthereumApi
)
GetPeerCount
(
args
*
interface
{},
reply
*
string
)
error
{
*
reply
=
NewSuccessRes
(
GetPeerCountRes
{
PeerCount
:
p
.
ethp
.
GetPeerCount
()})
return
nil
}
type
GetListeningRes
struct
{
IsListening
bool
`json:"isListening"`
}
func
(
p
*
EthereumApi
)
GetIsListening
(
args
*
interface
{},
reply
*
string
)
error
{
*
reply
=
NewSuccessRes
(
GetListeningRes
{
IsListening
:
p
.
ethp
.
GetIsListening
()})
return
nil
}
type
GetCoinbaseRes
struct
{
Coinbase
string
`json:"coinbase"`
}
func
(
p
*
EthereumApi
)
GetCoinbase
(
args
*
interface
{},
reply
*
string
)
error
{
*
reply
=
NewSuccessRes
(
GetCoinbaseRes
{
Coinbase
:
p
.
ethp
.
GetCoinBase
()})
return
nil
}
type
GetMiningRes
struct
{
IsMining
bool
`json:"isMining"`
}
func
(
p
*
EthereumApi
)
GetIsMining
(
args
*
interface
{},
reply
*
string
)
error
{
*
reply
=
NewSuccessRes
(
GetMiningRes
{
IsMining
:
p
.
ethp
.
GetIsMining
()})
return
nil
}
func
(
p
*
EthereumApi
)
GetTxCountAt
(
args
*
GetTxCountArgs
,
reply
*
string
)
error
{
err
:=
args
.
requirements
()
if
err
!=
nil
{
return
err
}
state
:=
p
.
ethp
.
GetTxCountAt
(
args
.
Address
)
*
reply
=
NewSuccessRes
(
GetTxCountRes
{
Nonce
:
state
})
return
nil
}
type
GetBalanceArgs
struct
{
type
GetBalanceArgs
struct
{
Address
string
Address
string
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment