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
01d20edd
Commit
01d20edd
authored
Jun 17, 2020
by
QM
Committed by
vipwzw
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updata
parent
d72f8065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
test-rpc.sh
plugin/dapp/x2ethereum/cmd/test/test-rpc.sh
+13
-18
No files found.
plugin/dapp/x2ethereum/cmd/test/test-rpc.sh
View file @
01d20edd
...
...
@@ -5,8 +5,6 @@
source
../dapp-test-common.sh
source
"../x2ethereum/publicTest.sh"
set
-x
sendAddress
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
sendPriKey
=
"0x4257d8692ef7fe13c68b65d6a52f03933db2fa5ce8faf210b5b8b80c721ced01"
MAIN_HTTP
=
""
...
...
@@ -329,7 +327,7 @@ function TestETH2Chain33Assets() {
req
=
'{"method":"Manager.GetBalance","params":[{"owner":"'
${
bridgeBankAddr
}
'","tokenAddr":""}]}'
queryRelayerBalance
"
$req
"
"0"
#
#
eth lock 0.1
# eth lock 0.1
req
=
'{"method":"Manager.LockEthErc20Asset","params":[{"ownerKey":"'
${
ethReceiverAddrKey1
}
'","tokenAddr":"","amount":"100000000000000000","chain33Receiver":"'
${
sendAddress
}
'"}]}'
chain33_Http
"
$req
"
${
CLIA_HTTP
}
'(.error|not) and (.result != null)'
"LockEthErc20Asset"
".result"
...
...
@@ -367,14 +365,10 @@ function TestETH2Chain33Assets() {
function
TestETH2Chain33Erc20
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# ${CLIA} relayer unlock -p 123456hzj
# token4erc20 在 chain33 上先有 token,同时 mint
#tokenSymbol="testc"
local
req
=
'{"method":"Manager.CreateERC20Token","params":["testc"]}'
chain33_Http
"
$req
"
${
CLIA_HTTP
}
'(.error|not) and (.result != null)'
"CreateERC20Token"
".result.addr"
tokenAddr
=
"
${
RETURN_RESP
}
"
# tokenAddr="0xb43393f9f588fC18Bbd8E99716c25291dB804b41"
# 先铸币 1000
req
=
'{"method":"Manager.MintErc20","params":[{"owner":"'
${
ethReceiverAddr1
}
'","tokenAddr":"'
${
tokenAddr
}
'","amount":"100000000000"}]}'
...
...
@@ -426,22 +420,23 @@ function TestETH2Chain33Erc20() {
}
function
rpc_test
()
{
set
-x
set
+e
chain33_RpcTestBegin x2ethereum
MAIN_HTTP
=
"
$1
"
echo
"main_ip=
$MAIN_HTTP
"
# init
StartRelayerAndDeploy
InitChain33Vilators
EthImportKey
# test
TestChain33ToEthAssets
TestETH2Chain33Assets
TestETH2Chain33Erc20
ispara
=
$(
echo
'"'
"
${
MAIN_HTTP
}
"
'"'
| jq
'.|contains("8901")'
)
if
[
"
$ispara
"
==
false
]
;
then
# init
StartRelayerAndDeploy
InitChain33Vilators
EthImportKey
# test
TestChain33ToEthAssets
TestETH2Chain33Assets
TestETH2Chain33Erc20
fi
chain33_RpcTestRst x2ethereum
"
$CASE_ERR
"
}
...
...
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