Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
link33
plugin
Commits
5962bfe3
Commit
5962bfe3
authored
Mar 08, 2019
by
lilinleeli1234
Committed by
vipwzw
Mar 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update linter
parent
bef7fa06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
evm.go
plugin/dapp/evm/commands/evm.go
+17
-18
No files found.
plugin/dapp/evm/commands/evm.go
View file @
5962bfe3
...
@@ -238,27 +238,26 @@ func createContract(cmd *cobra.Command, args []string) {
...
@@ -238,27 +238,26 @@ func createContract(cmd *cobra.Command, args []string) {
if
_
,
err
:=
os
.
Stat
(
sol
);
os
.
IsNotExist
(
err
)
{
if
_
,
err
:=
os
.
Stat
(
sol
);
os
.
IsNotExist
(
err
)
{
fmt
.
Fprintln
(
os
.
Stderr
,
"Sol file is not exist."
)
fmt
.
Fprintln
(
os
.
Stderr
,
"Sol file is not exist."
)
return
return
}
else
{
}
contracts
,
err
:=
compiler
.
CompileSolidity
(
solc
,
sol
)
contracts
,
err
:=
compiler
.
CompileSolidity
(
solc
,
sol
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
"Failed to build Solidity contract"
,
err
)
fmt
.
Fprintln
(
os
.
Stderr
,
"Failed to build Solidity contract"
,
err
)
return
return
}
}
if
len
(
contracts
)
>
1
{
if
len
(
contracts
)
>
1
{
fmt
.
Fprintln
(
os
.
Stderr
,
"There are too many contracts in the sol file."
)
fmt
.
Fprintln
(
os
.
Stderr
,
"There are too many contracts in the sol file."
)
return
return
}
}
for
_
,
contract
:=
range
contracts
{
for
_
,
contract
:=
range
contracts
{
abi
,
_
:=
json
.
Marshal
(
contract
.
Info
.
AbiDefinition
)
// Flatten the compiler parse
abi
,
_
:=
json
.
Marshal
(
contract
.
Info
.
AbiDefinition
)
// Flatten the compiler parse
bCode
,
err
:=
common
.
FromHex
(
contract
.
Code
)
bCode
,
err
:=
common
.
FromHex
(
contract
.
Code
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
"parse evm code error"
,
err
)
fmt
.
Fprintln
(
os
.
Stderr
,
"parse evm code error"
,
err
)
return
return
}
action
=
evmtypes
.
EVMContractAction
{
Amount
:
0
,
Code
:
bCode
,
GasLimit
:
0
,
GasPrice
:
0
,
Note
:
note
,
Alias
:
alias
,
Abi
:
string
(
abi
)}
}
}
action
=
evmtypes
.
EVMContractAction
{
Amount
:
0
,
Code
:
bCode
,
GasLimit
:
0
,
GasPrice
:
0
,
Note
:
note
,
Alias
:
alias
,
Abi
:
string
(
abi
)}
}
}
}
else
{
}
else
{
bCode
,
err
:=
common
.
FromHex
(
code
)
bCode
,
err
:=
common
.
FromHex
(
code
)
...
...
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