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
d0bdb61f
Commit
d0bdb61f
authored
Jan 28, 2019
by
jiangpeng
Committed by
vipwzw
Jan 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add paracross autotest
parent
bee936b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
0 deletions
+105
-0
paracross.go
plugin/dapp/paracross/autotest/paracross.go
+36
-0
paracross.toml
plugin/dapp/paracross/autotest/paracross.toml
+68
-0
plugin.go
plugin/dapp/paracross/plugin.go
+1
-0
No files found.
plugin/dapp/paracross/autotest/paracross.go
0 → 100644
View file @
d0bdb61f
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
autotest
import
(
"reflect"
"github.com/33cn/chain33/cmd/autotest/types"
coinautotest
"github.com/33cn/chain33/system/dapp/coins/autotest"
tokenautotest
"github.com/33cn/plugin/plugin/dapp/token/autotest"
)
type
paracrossAutoTest
struct
{
SimpleCaseArr
[]
types
.
SimpleCase
`toml:"SimpleCase,omitempty"`
TokenPreCreateCaseArr
[]
tokenautotest
.
TokenPreCreateCase
`toml:"TokenPreCreateCase,omitempty"`
TokenFinishCreateCaseArr
[]
tokenautotest
.
TokenFinishCreateCase
`toml:"TokenFinishCreateCase,omitempty"`
TransferCaseArr
[]
coinautotest
.
TransferCase
`toml:"TransferCase,omitempty"`
}
func
init
()
{
types
.
RegisterAutoTest
(
paracrossAutoTest
{})
}
func
(
config
paracrossAutoTest
)
GetName
()
string
{
return
"paracross"
}
func
(
config
paracrossAutoTest
)
GetTestConfigType
()
reflect
.
Type
{
return
reflect
.
TypeOf
(
config
)
}
plugin/dapp/paracross/autotest/paracross.toml
0 → 100644
View file @
d0bdb61f
#paracross exec addr 1HPkPopVe3ERfvaAgedDtJQ792taZFEHCe
#user.p.test.paracross exec addr 16zsMh7mvNDKPG6E9NVrPhw6zL93gWsTpR
[[TokenPreCreateCase]]
id
=
"tokenPre"
command
=
"send token precreate -f 0.01 -i testToken -n testToken -s PT -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -t 100000 -p 0.1 -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
dep
=
["transForPrecreate"]
[[TokenFinishCreateCase]]
id
=
"tokenFinish"
command
=
"send token finish -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -f 0.01 -s PT -k 0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc"
dep
=
["tokenPre"]
#send to token for precreate
[[TransferCase]]
id
=
"transForPrecreate"
command
=
"send bty transfer -a 1 -t 12hpJBHybh1mSyCijQ2MQJPk7z7kZ7jnQa -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12hpJBHybh1mSyCijQ2MQJPk7z7kZ7jnQa"
amount
=
"1"
checkItem
=
["balance"]
[[TransferCase]]
id
=
"btyToExec"
command
=
"send bty transfer -a 1 -t 1HPkPopVe3ERfvaAgedDtJQ792taZFEHCe -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"1HPkPopVe3ERfvaAgedDtJQ792taZFEHCe"
amount
=
"1"
checkItem
=
["balance"]
#send para asset bty
[[TransferCase]]
id
=
"btyParaTrans"
command
=
"send para asset_transfer --title user.p.test. -a 0.1 -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
#复用coins的transfer用例,此处to地址比较特殊,为平行链paracross合约的地址
to
=
"16zsMh7mvNDKPG6E9NVrPhw6zL93gWsTpR"
amount
=
"0.1"
checkItem
=
["balance"]
dep
=
["btyToExec"]
repeat
=
10
#send token to paracross
[[TransferCase]]
id
=
"tokenToExec"
command
=
"send token send_exec -a 10 -s PT -e paracross -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"1HPkPopVe3ERfvaAgedDtJQ792taZFEHCe"
amount
=
"10"
checkItem
=
["balance"]
dep
=
["tokenFinish"]
#send para asset token PT
[[TransferCase]]
id
=
"tokenParaTrans"
command
=
"send para asset_transfer --title user.p.test. -s PT -a 1 -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
#复用coins的transfer用例,此处to地址比较特殊,为平行链paracross合约的地址
to
=
"16zsMh7mvNDKPG6E9NVrPhw6zL93gWsTpR"
amount
=
"1"
checkItem
=
["balance"]
dep
=
["tokenToExec"]
repeat
=
10
plugin/dapp/paracross/plugin.go
View file @
d0bdb61f
...
...
@@ -6,6 +6,7 @@ package paracross
import
(
"github.com/33cn/chain33/pluginmgr"
_
"github.com/33cn/plugin/plugin/dapp/paracross/autotest"
// register autotest package
"github.com/33cn/plugin/plugin/dapp/paracross/commands"
"github.com/33cn/plugin/plugin/dapp/paracross/executor"
"github.com/33cn/plugin/plugin/dapp/paracross/rpc"
...
...
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