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
2f5c062b
Commit
2f5c062b
authored
Dec 09, 2021
by
QM
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into bridgevmxgo_bsc_1201
parents
40754db8
a94f7b0c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
26 additions
and
25 deletions
+26
-25
build.yml
.github/workflows/build.yml
+1
-0
Makefile
Makefile
+1
-1
go.mod
go.mod
+3
-3
go.sum
go.sum
+0
-0
build.sh
plugin/dapp/coinsx/cmd/build.sh
+2
-2
setupTestEnv.go
plugin/dapp/cross2eth/contracts/test/setup/setupTestEnv.go
+2
-2
ethereum_test.go
...app/cross2eth/ebrelayer/relayer/ethereum/ethereum_test.go
+1
-1
contracts_test.go
...s2eth/ebrelayer/relayer/ethereum/ethtxs/contracts_test.go
+2
-2
ethtxs_test.go
...ross2eth/ebrelayer/relayer/ethereum/ethtxs/ethtxs_test.go
+3
-3
pack_test.go
plugin/dapp/evm/executor/abi/pack_test.go
+2
-2
instructions.go
plugin/dapp/evm/executor/vm/runtime/instructions.go
+2
-2
instructions_test.go
plugin/dapp/evm/executor/vm/runtime/instructions_test.go
+2
-2
build.sh
plugin/dapp/vote/cmd/build.sh
+1
-1
setupTestEnv.go
...ethereum/ebrelayer/ethcontract/test/setup/setupTestEnv.go
+4
-4
No files found.
.github/workflows/build.yml
View file @
2f5c062b
...
@@ -33,6 +33,7 @@ jobs:
...
@@ -33,6 +33,7 @@ jobs:
make largefile-check
make largefile-check
make checkgofmt && make fmt_go
make checkgofmt && make fmt_go
make linter
make linter
make
unit-test
:
unit-test
:
name
:
unit-test
name
:
unit-test
...
...
Makefile
View file @
2f5c062b
...
@@ -204,7 +204,7 @@ protobuf: ## Generate protbuf file of types package
...
@@ -204,7 +204,7 @@ protobuf: ## Generate protbuf file of types package
@find
./plugin/dapp
-maxdepth
2
-type
d
-name
proto
-exec
make
-C
{}
\;
@find
./plugin/dapp
-maxdepth
2
-type
d
-name
proto
-exec
make
-C
{}
\;
depends
:
##
Generate depends file of types package
depends
:
##
Generate depends file of types package
@
find ./plugin/dapp
-maxdepth
2
-type
d
-name
cmd
-exec
make
-C
{}
OUT
=
"
$(MKDIR)
build/ci"
FLAG
=
\;
@
find ./plugin/dapp
-maxdepth
2
-
print
-
type
d
-name
cmd
-exec
make
-C
{}
OUT
=
"
$(MKDIR)
build/ci"
FLAG
=
\;
help
:
##
Display this help screen
help
:
##
Display this help screen
...
...
go.mod
View file @
2f5c062b
...
@@ -17,13 +17,13 @@ require (
...
@@ -17,13 +17,13 @@ require (
github.com/coreos/etcd v3.3.15+incompatible
github.com/coreos/etcd v3.3.15+incompatible
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew v1.1.1
github.com/ethereum/go-ethereum v1.10.
0
github.com/ethereum/go-ethereum v1.10.
13
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.
3-0.20201103224600-674baa8c7fc3
github.com/golang/snappy v0.0.
4
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/holiman/uint256 v1.
1.1
github.com/holiman/uint256 v1.
2.0
github.com/huin/goupnp v1.0.2
github.com/huin/goupnp v1.0.2
github.com/jackpal/go-nat-pmp v1.0.2
github.com/jackpal/go-nat-pmp v1.0.2
github.com/mr-tron/base58 v1.2.0
github.com/mr-tron/base58 v1.2.0
...
...
go.sum
View file @
2f5c062b
This diff is collapsed.
Click to expand it.
plugin/dapp/coinsx/cmd/build.sh
View file @
2f5c062b
...
@@ -4,8 +4,8 @@ strpwd=$(pwd)
...
@@ -4,8 +4,8 @@ strpwd=$(pwd)
strcmd
=
${
strpwd
##*dapp/
}
strcmd
=
${
strpwd
##*dapp/
}
strapp
=
${
strcmd
%/cmd*
}
strapp
=
${
strcmd
%/cmd*
}
OUT_DIR
=
"
${
1
}
/
system/
$strapp
"
OUT_DIR
=
"
${
1
}
/
$strapp
"
#FLAG=$2
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
#
cp ./build/* "${OUT_DIR}"
plugin/dapp/cross2eth/contracts/test/setup/setupTestEnv.go
View file @
2f5c062b
...
@@ -25,7 +25,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
...
@@ -25,7 +25,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
alloc
:=
make
(
core
.
GenesisAlloc
)
alloc
:=
make
(
core
.
GenesisAlloc
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAccount
:=
core
.
GenesisAccount
{
genesisAccount
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
10000000000
*
10000
),
Balance
:
big
.
NewInt
(
10000000000
00
*
10000
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
}
}
alloc
[
genesisAddr
]
=
genesisAccount
alloc
[
genesisAddr
]
=
genesisAccount
...
@@ -39,7 +39,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
...
@@ -39,7 +39,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
account
:=
core
.
GenesisAccount
{
account
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
100000000
*
1
00
),
Balance
:
big
.
NewInt
(
100000000
0000
*
100
00
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
}
}
alloc
[
addr
]
=
account
alloc
[
addr
]
=
account
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum_test.go
View file @
2f5c062b
...
@@ -209,7 +209,7 @@ func Test_CreateBridgeToken(t *testing.T) {
...
@@ -209,7 +209,7 @@ func Test_CreateBridgeToken(t *testing.T) {
balance
,
err
:=
ethRelayer
.
GetBalance
(
""
,
para
.
InitValidators
[
0
]
.
String
())
balance
,
err
:=
ethRelayer
.
GetBalance
(
""
,
para
.
InitValidators
[
0
]
.
String
())
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
balance
,
"10000000000"
)
assert
.
Equal
(
t
,
balance
,
"10000000000
000000
"
)
tokenAddrbty
,
err
:=
ethRelayer
.
CreateBridgeToken
(
"BTY"
)
tokenAddrbty
,
err
:=
ethRelayer
.
CreateBridgeToken
(
"BTY"
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/contracts_test.go
View file @
2f5c062b
...
@@ -232,7 +232,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *DeployPara) {
...
@@ -232,7 +232,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *DeployPara) {
alloc
:=
make
(
core
.
GenesisAlloc
)
alloc
:=
make
(
core
.
GenesisAlloc
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAccount
:=
core
.
GenesisAccount
{
genesisAccount
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
10000000000
*
10000
),
Balance
:
big
.
NewInt
(
10000000000
00
*
10000
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
}
}
alloc
[
genesisAddr
]
=
genesisAccount
alloc
[
genesisAddr
]
=
genesisAccount
...
@@ -246,7 +246,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *DeployPara) {
...
@@ -246,7 +246,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *DeployPara) {
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
account
:=
core
.
GenesisAccount
{
account
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
100000000
*
1
00
),
Balance
:
big
.
NewInt
(
100000000
0000
*
100
00
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
}
}
alloc
[
addr
]
=
account
alloc
[
addr
]
=
account
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/ethtxs_test.go
View file @
2f5c062b
...
@@ -49,7 +49,7 @@ func Test_GetAddressFromBridgeRegistry(t *testing.T) {
...
@@ -49,7 +49,7 @@ func Test_GetAddressFromBridgeRegistry(t *testing.T) {
alloc
:=
make
(
core
.
GenesisAlloc
)
alloc
:=
make
(
core
.
GenesisAlloc
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAccount
:=
core
.
GenesisAccount
{
genesisAccount
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
10000000000
*
10000
),
Balance
:
big
.
NewInt
(
10000000000
00
*
10000
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
}
}
alloc
[
genesisAddr
]
=
genesisAccount
alloc
[
genesisAddr
]
=
genesisAccount
...
@@ -138,7 +138,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
...
@@ -138,7 +138,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
alloc
:=
make
(
core
.
GenesisAlloc
)
alloc
:=
make
(
core
.
GenesisAlloc
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAccount
:=
core
.
GenesisAccount
{
genesisAccount
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
10000000000
*
10000
),
Balance
:
big
.
NewInt
(
10000000000
00
*
10000
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
}
}
alloc
[
genesisAddr
]
=
genesisAccount
alloc
[
genesisAddr
]
=
genesisAccount
...
@@ -152,7 +152,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
...
@@ -152,7 +152,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
account
:=
core
.
GenesisAccount
{
account
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
100000000
*
1
00
),
Balance
:
big
.
NewInt
(
100000000
0000
*
100
00
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
}
}
alloc
[
addr
]
=
account
alloc
[
addr
]
=
account
...
...
plugin/dapp/evm/executor/abi/pack_test.go
View file @
2f5c062b
...
@@ -90,7 +90,7 @@ func TestMethodPack(t *testing.T) {
...
@@ -90,7 +90,7 @@ func TestMethodPack(t *testing.T) {
t
.
Errorf
(
"expected %x got %x"
,
sig
,
packed
)
t
.
Errorf
(
"expected %x got %x"
,
sig
,
packed
)
}
}
var
addrA
,
addrB
=
common
.
Uint256ToAddress
(
uint256
.
NewInt
(
)
.
SetUint64
(
1
)),
common
.
Uint256ToAddress
(
uint256
.
NewInt
()
.
SetUint64
(
1
))
var
addrA
,
addrB
=
common
.
Uint256ToAddress
(
uint256
.
NewInt
(
1
)),
common
.
Uint256ToAddress
(
uint256
.
NewInt
(
1
))
sig
=
abi
.
Methods
[
"sliceAddress"
]
.
ID
sig
=
abi
.
Methods
[
"sliceAddress"
]
.
ID
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
32
},
32
)
...
)
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
32
},
32
)
...
)
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
2
},
32
)
...
)
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
2
},
32
)
...
)
...
@@ -105,7 +105,7 @@ func TestMethodPack(t *testing.T) {
...
@@ -105,7 +105,7 @@ func TestMethodPack(t *testing.T) {
t
.
Errorf
(
"expected %x got %x"
,
sig
,
packed
)
t
.
Errorf
(
"expected %x got %x"
,
sig
,
packed
)
}
}
var
addrC
,
addrD
=
common
.
Uint256ToAddress
(
uint256
.
NewInt
(
)
.
SetUint64
(
3
)),
common
.
Uint256ToAddress
(
uint256
.
NewInt
()
.
SetUint64
(
4
))
var
addrC
,
addrD
=
common
.
Uint256ToAddress
(
uint256
.
NewInt
(
3
)),
common
.
Uint256ToAddress
(
uint256
.
NewInt
(
4
))
sig
=
abi
.
Methods
[
"sliceMultiAddress"
]
.
ID
sig
=
abi
.
Methods
[
"sliceMultiAddress"
]
.
ID
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
64
},
32
)
...
)
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
64
},
32
)
...
)
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
160
},
32
)
...
)
sig
=
append
(
sig
,
common
.
LeftPadBytes
([]
byte
{
160
},
32
)
...
)
...
...
plugin/dapp/evm/executor/vm/runtime/instructions.go
View file @
2f5c062b
...
@@ -422,7 +422,7 @@ func opExtCodeHash(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) {
...
@@ -422,7 +422,7 @@ func opExtCodeHash(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) {
// 获取当前区块的GasPrice
// 获取当前区块的GasPrice
func
opGasprice
(
pc
*
uint64
,
evm
*
EVM
,
callContext
*
callCtx
)
([]
byte
,
error
)
{
func
opGasprice
(
pc
*
uint64
,
evm
*
EVM
,
callContext
*
callCtx
)
([]
byte
,
error
)
{
v
:=
uint256
.
NewInt
(
)
.
SetUint64
(
uint64
(
evm
.
GasPrice
))
v
:=
uint256
.
NewInt
(
uint64
(
evm
.
GasPrice
))
callContext
.
stack
.
push
(
v
)
callContext
.
stack
.
push
(
v
)
return
nil
,
nil
return
nil
,
nil
}
}
...
@@ -954,7 +954,7 @@ func makeSwap(size int64) executionFunc {
...
@@ -954,7 +954,7 @@ func makeSwap(size int64) executionFunc {
// 获取自身余额
// 获取自身余额
func
opSelfBalance
(
pc
*
uint64
,
evm
*
EVM
,
callContext
*
callCtx
)
([]
byte
,
error
)
{
func
opSelfBalance
(
pc
*
uint64
,
evm
*
EVM
,
callContext
*
callCtx
)
([]
byte
,
error
)
{
balance
:=
uint256
.
NewInt
(
)
.
SetUint64
(
evm
.
StateDB
.
GetBalance
(
callContext
.
contract
.
Address
()
.
String
()))
balance
:=
uint256
.
NewInt
(
evm
.
StateDB
.
GetBalance
(
callContext
.
contract
.
Address
()
.
String
()))
callContext
.
stack
.
push
(
balance
)
callContext
.
stack
.
push
(
balance
)
return
nil
,
nil
return
nil
,
nil
}
}
...
...
plugin/dapp/evm/executor/vm/runtime/instructions_test.go
View file @
2f5c062b
...
@@ -574,11 +574,11 @@ func BenchmarkOpSHA3(bench *testing.B) {
...
@@ -574,11 +574,11 @@ func BenchmarkOpSHA3(bench *testing.B) {
//env.interpreter = evmInterpreter
//env.interpreter = evmInterpreter
mem
.
Resize
(
32
)
mem
.
Resize
(
32
)
pc
:=
uint64
(
0
)
pc
:=
uint64
(
0
)
start
:=
uint256
.
NewInt
()
start
:=
uint256
.
NewInt
(
0
)
bench
.
ResetTimer
()
bench
.
ResetTimer
()
for
i
:=
0
;
i
<
bench
.
N
;
i
++
{
for
i
:=
0
;
i
<
bench
.
N
;
i
++
{
stack
.
pushN
(
*
uint256
.
NewInt
(
)
.
SetUint64
(
32
),
*
start
)
stack
.
pushN
(
*
uint256
.
NewInt
(
32
),
*
start
)
opSha3
(
&
pc
,
env
,
&
callCtx
{
mem
,
stack
,
nil
})
opSha3
(
&
pc
,
env
,
&
callCtx
{
mem
,
stack
,
nil
})
}
}
}
}
...
...
plugin/dapp/vote/cmd/build.sh
View file @
2f5c062b
...
@@ -8,4 +8,4 @@ OUT_DIR="${1}/$strapp"
...
@@ -8,4 +8,4 @@ OUT_DIR="${1}/$strapp"
#FLAG=$2
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
#
cp ./build/* "${OUT_DIR}"
plugin/dapp/x2ethereum/ebrelayer/ethcontract/test/setup/setupTestEnv.go
View file @
2f5c062b
...
@@ -22,7 +22,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
...
@@ -22,7 +22,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
alloc
:=
make
(
core
.
GenesisAlloc
)
alloc
:=
make
(
core
.
GenesisAlloc
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAccount
:=
core
.
GenesisAccount
{
genesisAccount
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
10000000000
*
10000
),
Balance
:
big
.
NewInt
(
10000000000
00
*
10000
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
}
}
alloc
[
genesisAddr
]
=
genesisAccount
alloc
[
genesisAddr
]
=
genesisAccount
...
@@ -36,7 +36,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
...
@@ -36,7 +36,7 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
account
:=
core
.
GenesisAccount
{
account
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
100000000
*
1
00
),
Balance
:
big
.
NewInt
(
100000000
0000
*
100
00
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
}
}
alloc
[
addr
]
=
account
alloc
[
addr
]
=
account
...
@@ -64,7 +64,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
...
@@ -64,7 +64,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
alloc
:=
make
(
core
.
GenesisAlloc
)
alloc
:=
make
(
core
.
GenesisAlloc
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAddr
:=
crypto
.
PubkeyToAddress
(
genesiskey
.
PublicKey
)
genesisAccount
:=
core
.
GenesisAccount
{
genesisAccount
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
10000000000
*
10000
),
Balance
:
big
.
NewInt
(
10000000000
00
*
10000
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
PrivateKey
:
crypto
.
FromECDSA
(
genesiskey
),
}
}
alloc
[
genesisAddr
]
=
genesisAccount
alloc
[
genesisAddr
]
=
genesisAccount
...
@@ -78,7 +78,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
...
@@ -78,7 +78,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
ValidatorPriKey
=
append
(
ValidatorPriKey
,
key
)
account
:=
core
.
GenesisAccount
{
account
:=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
100000000
*
1
00
),
Balance
:
big
.
NewInt
(
100000000
0000
*
100
00
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
PrivateKey
:
crypto
.
FromECDSA
(
key
),
}
}
alloc
[
addr
]
=
account
alloc
[
addr
]
=
account
...
...
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