Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar-client-chain33
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
sidecar-client-chain33
Commits
7968566c
Commit
7968566c
authored
May 05, 2023
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update paracross
parent
060c3c67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
evmxgo.go
evmxgo/evmxgo.go
+1
-1
paracross.go
paracross/paracross.go
+10
-10
No files found.
evmxgo/evmxgo.go
View file @
7968566c
...
@@ -334,7 +334,7 @@ func (e *Evmxgo) pollAppChain() chan *types.Event {
...
@@ -334,7 +334,7 @@ func (e *Evmxgo) pollAppChain() chan *types.Event {
burnEvent
:=
action
.
BurnMap
burnEvent
:=
action
.
BurnMap
e
.
logger
.
Info
(
"printf burnEvent"
,
"burnEvent"
,
util
.
FormatJSON
(
action
))
e
.
logger
.
Info
(
"printf burnEvent"
,
"burnEvent"
,
util
.
FormatJSON
(
action
))
//销毁指定的token
//
销毁指定的token
if
strings
.
ToLower
(
burnEvent
.
Symbol
)
==
strings
.
ToLower
(
e
.
config
.
Chain33
.
Symbol
)
{
if
strings
.
ToLower
(
burnEvent
.
Symbol
)
==
strings
.
ToLower
(
e
.
config
.
Chain33
.
Symbol
)
{
// extra, _ := util.FromHex(burnEvent.Extra)
// extra, _ := util.FromHex(burnEvent.Extra)
// 已销毁
// 已销毁
...
...
paracross/paracross.go
View file @
7968566c
...
@@ -163,9 +163,9 @@ func (p *Paracross) Initialize(configPath string, ID string, extra []byte) error
...
@@ -163,9 +163,9 @@ func (p *Paracross) Initialize(configPath string, ID string, extra []byte) error
p
.
MinTxFeeRate
=
chain33Config
.
Chain33
.
Fee
p
.
MinTxFeeRate
=
chain33Config
.
Chain33
.
Fee
p
.
isTest
=
chain33Config
.
Chain33
.
IsTest
p
.
isTest
=
chain33Config
.
Chain33
.
IsTest
p
.
paraHeight
=
atomic
.
NewInt64
(
-
1
)
p
.
paraHeight
=
atomic
.
NewInt64
(
-
1
)
//判断执行器地址类型
//
判断执行器地址类型
if
strings
.
ToUpper
(
chain33Config
.
Chain33
.
Symbol
)
==
"YCC"
{
if
strings
.
ToUpper
(
chain33Config
.
Chain33
.
Symbol
)
==
"YCC"
{
//执行器地址类型,YCC是以太坊地址类型。
//
执行器地址类型,YCC是以太坊地址类型。
execAddress
,
err
:=
address
.
GetExecAddress
(
p
.
title
+
execer
,
2
)
execAddress
,
err
:=
address
.
GetExecAddress
(
p
.
title
+
execer
,
2
)
if
err
!=
nil
{
if
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"execAddress"
)
return
errors
.
Wrap
(
err
,
"execAddress"
)
...
@@ -728,21 +728,21 @@ func (p *Paracross) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
...
@@ -728,21 +728,21 @@ func (p *Paracross) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
if
event
.
Payload
.
EventType
==
types
.
EventType_Burn
{
if
event
.
Payload
.
EventType
==
types
.
EventType_Burn
{
// 用户在联盟链一侧发起销毁。
// 用户在联盟链一侧发起销毁。
// 第一次提交。
// 第一次提交。
TokenSymbol
:=
""
tokenSymbol
:=
p
.
chain33Config
.
Chain33
.
Symbol
if
strings
.
ToUpper
(
p
.
chain33Config
.
Chain33
.
Symbol
)
==
"YCC"
{
symbol
:=
strings
.
ToLower
(
p
.
chain33Config
.
Chain33
.
Symbol
)
//主链的token映射到平行链: coins.xxx
if
symbol
==
"ycc"
||
symbol
==
"bty"
{
TokenSymbol
=
"coins.ycc"
// 主链的token映射到平行链: coins.xxx
}
else
{
tokenSymbol
=
fmt
.
Sprintf
(
"coins.%s"
,
symbol
)
TokenSymbol
=
"coins.bty"
}
}
p
.
logger
.
Info
(
"SendTransaction "
,
"TokenSymbol"
,
TokenSymbol
)
p
.
logger
.
Info
(
"SendTransaction "
,
"TokenSymbol"
,
tokenSymbol
)
tx
,
err
:=
p
.
CreateRawAssetTransferTxExt
(
&
types33
.
CreateTx
{
tx
,
err
:=
p
.
CreateRawAssetTransferTxExt
(
&
types33
.
CreateTx
{
To
:
event
.
Payload
.
BurnAddress
,
To
:
event
.
Payload
.
BurnAddress
,
Amount
:
event
.
Payload
.
BurnAmount
,
Amount
:
event
.
Payload
.
BurnAmount
,
Fee
:
p
.
MinTxFeeRate
,
Fee
:
p
.
MinTxFeeRate
,
Note
:
payload
.
Content
,
// 关联数据
Note
:
payload
.
Content
,
// 关联数据
IsWithdraw
:
true
,
IsWithdraw
:
true
,
TokenSymbol
:
T
okenSymbol
,
TokenSymbol
:
t
okenSymbol
,
ExecName
:
p
.
title
+
execer
,
ExecName
:
p
.
title
+
execer
,
})
})
p
.
logger
.
Info
(
"SendTransaction "
,
"tx"
,
tx
)
p
.
logger
.
Info
(
"SendTransaction "
,
"tx"
,
tx
)
...
...
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