good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
4b483069
Commit
4b483069
authored
Sep 13, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of github.com-obscure:ethereum/eth-go into develop
parents
2fb57b2e
369e8c41
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ethpipe/js_pipe.go
+6
-0
6 additions, 0 deletions
ethpipe/js_pipe.go
ethpipe/pipe.go
+9
-0
9 additions, 0 deletions
ethpipe/pipe.go
ethrpc/packages.go
+21
-0
21 additions, 0 deletions
ethrpc/packages.go
with
36 additions
and
0 deletions
ethpipe/js_pipe.go
+
6
−
0
View file @
4b483069
...
@@ -223,6 +223,12 @@ func (self *JSPipe) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
...
@@ -223,6 +223,12 @@ func (self *JSPipe) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
return
NewJSReciept
(
contractCreation
,
tx
.
CreationAddress
(),
tx
.
Hash
(),
keyPair
.
Address
()),
nil
return
NewJSReciept
(
contractCreation
,
tx
.
CreationAddress
(),
tx
.
Hash
(),
keyPair
.
Address
()),
nil
}
}
func
(
self
*
JSPipe
)
PushTx
(
txStr
string
)
(
*
JSReceipt
,
error
)
{
tx
:=
ethchain
.
NewTransactionFromBytes
(
ethutil
.
Hex2Bytes
(
txStr
))
self
.
obj
.
TxPool
()
.
QueueTransaction
(
tx
)
return
NewJSReciept
(
tx
.
CreatesContract
(),
tx
.
CreationAddress
(),
tx
.
Hash
(),
tx
.
Sender
()),
nil
}
func
(
self
*
JSPipe
)
CompileMutan
(
code
string
)
string
{
func
(
self
*
JSPipe
)
CompileMutan
(
code
string
)
string
{
data
,
err
:=
self
.
Pipe
.
CompileMutan
(
code
)
data
,
err
:=
self
.
Pipe
.
CompileMutan
(
code
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
ethpipe/pipe.go
+
9
−
0
View file @
4b483069
...
@@ -149,6 +149,15 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price
...
@@ -149,6 +149,15 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price
return
tx
.
Hash
(),
nil
return
tx
.
Hash
(),
nil
}
}
func
(
self
*
Pipe
)
PushTx
(
tx
*
ethchain
.
Transaction
)
([]
byte
,
error
)
{
self
.
obj
.
TxPool
()
.
QueueTransaction
(
tx
)
if
tx
.
Recipient
==
nil
{
logger
.
Infof
(
"Contract addr %x"
,
tx
.
CreationAddress
())
return
tx
.
CreationAddress
(),
nil
}
return
tx
.
Hash
(),
nil
}
func
(
self
*
Pipe
)
CompileMutan
(
code
string
)
([]
byte
,
error
)
{
func
(
self
*
Pipe
)
CompileMutan
(
code
string
)
([]
byte
,
error
)
{
data
,
err
:=
ethutil
.
Compile
(
code
,
false
)
data
,
err
:=
ethutil
.
Compile
(
code
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
ethrpc/packages.go
+
21
−
0
View file @
4b483069
...
@@ -145,6 +145,27 @@ func (p *EthereumApi) Create(args *NewTxArgs, reply *string) error {
...
@@ -145,6 +145,27 @@ func (p *EthereumApi) Create(args *NewTxArgs, reply *string) error {
return
nil
return
nil
}
}
type
PushTxArgs
struct
{
Tx
string
}
func
(
a
*
PushTxArgs
)
requirementsPushTx
()
error
{
if
a
.
Tx
==
""
{
return
NewErrorResponse
(
"PushTx requires a 'tx' as argument"
)
}
return
nil
}
func
(
p
*
EthereumApi
)
PushTx
(
args
*
PushTxArgs
,
reply
*
string
)
error
{
err
:=
args
.
requirementsPushTx
()
if
err
!=
nil
{
return
err
}
result
,
_
:=
p
.
pipe
.
PushTx
(
args
.
Tx
)
*
reply
=
NewSuccessRes
(
result
)
return
nil
}
func
(
p
*
EthereumApi
)
GetKey
(
args
interface
{},
reply
*
string
)
error
{
func
(
p
*
EthereumApi
)
GetKey
(
args
interface
{},
reply
*
string
)
error
{
*
reply
=
NewSuccessRes
(
p
.
pipe
.
Key
())
*
reply
=
NewSuccessRes
(
p
.
pipe
.
Key
())
return
nil
return
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment