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
a8d839c6
Commit
a8d839c6
authored
May 20, 2020
by
hezhengjun
Committed by
whisker
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add token address when burn from chain33
parent
fc3dafc5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
7 deletions
+11
-7
BridgeBank.go
.../x2Ethereum/ebrelayer/ethcontract/generated/BridgeBank.go
+0
-0
Chain33Bank.sol
...ayer/ethcontract/sol_contracts/BridgeBank/Chain33Bank.sol
+0
-2
Chain33Bridge.sol
...eum/ebrelayer/ethcontract/sol_contracts/Chain33Bridge.sol
+7
-3
Oracle.sol
...x2Ethereum/ebrelayer/ethcontract/sol_contracts/Oracle.sol
+2
-0
auxiliary.go
plugin/dapp/x2Ethereum/ebrelayer/ethtxs/auxiliary.go
+1
-1
relayToEthereum.go
plugin/dapp/x2Ethereum/ebrelayer/ethtxs/relayToEthereum.go
+1
-1
No files found.
plugin/dapp/x2Ethereum/ebrelayer/ethcontract/generated/BridgeBank.go
View file @
a8d839c6
This source diff could not be displayed because it is too large. You can
view the blob
instead.
plugin/dapp/x2Ethereum/ebrelayer/ethcontract/sol_contracts/BridgeBank/Chain33Bank.sol
View file @
a8d839c6
...
...
@@ -379,6 +379,5 @@ contract Chain33Bank {
{
bytes32 symHash = keccak256(abi.encodePacked(_symbol));
return token2address[symHash];
}
}
\ No newline at end of file
plugin/dapp/x2Ethereum/ebrelayer/ethcontract/sol_contracts/Chain33Bridge.sol
View file @
a8d839c6
...
...
@@ -208,6 +208,7 @@ contract Chain33Bridge {
bytes memory _chain33Sender,
address payable _ethereumReceiver,
address _originalValidator,
address _tokenAddress,
string memory _symbol,
uint256 _amount
)
...
...
@@ -219,7 +220,10 @@ contract Chain33Bridge {
prophecyClaimCount = prophecyClaimCount.add(1);
ClaimType claimType = ClaimType(_claimType);
address tokenAddress = bridgeBank.getToken2address(_symbol);
//overwrite the token address in case of lock
if (claimType == ClaimType.Lock) {
_tokenAddress = bridgeBank.getToken2address(_symbol);
}
// Create the new ProphecyClaim
ProphecyClaim memory prophecyClaim = ProphecyClaim(
...
...
@@ -227,7 +231,7 @@ contract Chain33Bridge {
_chain33Sender,
_ethereumReceiver,
_originalValidator,
tokenAddress,
_
tokenAddress,
_symbol,
_amount,
Status.Pending
...
...
@@ -242,7 +246,7 @@ contract Chain33Bridge {
_chain33Sender,
_ethereumReceiver,
_originalValidator,
tokenAddress,
_
tokenAddress,
_symbol,
_amount
);
...
...
plugin/dapp/x2Ethereum/ebrelayer/ethcontract/sol_contracts/Oracle.sol
View file @
a8d839c6
...
...
@@ -130,6 +130,7 @@ contract Oracle {
ClaimType _claimType,
bytes memory _chain33Sender,
address payable _ethereumReceiver,
address _tokenAddress,
string memory _symbol,
uint256 _amount,
bytes32 _claimID,
...
...
@@ -163,6 +164,7 @@ contract Oracle {
_chain33Sender,
_ethereumReceiver,
validatorAddress,
_tokenAddress,
_symbol,
_amount);
}
...
...
plugin/dapp/x2Ethereum/ebrelayer/ethtxs/auxiliary.go
View file @
a8d839c6
...
...
@@ -467,7 +467,7 @@ func MakeNewProphecyClaim(newProphecyClaimPara *NewProphecyClaimPara, client *et
return
""
,
err
}
tx
,
err
:=
x2EthContracts
.
Oracle
.
NewOracleClaim
(
authVali
,
newProphecyClaimPara
.
ClaimType
,
newProphecyClaimPara
.
Chain33Sender
,
ethReceiver
,
newProphecyClaimPara
.
Symbol
,
amount
,
claimID
,
signature
)
tx
,
err
:=
x2EthContracts
.
Oracle
.
NewOracleClaim
(
authVali
,
newProphecyClaimPara
.
ClaimType
,
newProphecyClaimPara
.
Chain33Sender
,
ethReceiver
,
newProphecyClaimPara
.
TokenAddr
,
newProphecyClaimPara
.
Symbol
,
amount
,
claimID
,
signature
)
if
nil
!=
err
{
return
""
,
err
}
...
...
plugin/dapp/x2Ethereum/ebrelayer/ethtxs/relayToEthereum.go
View file @
a8d839c6
...
...
@@ -40,7 +40,7 @@ func RelayOracleClaimToEthereum(oracleInstance *generated.Oracle, client *ethcli
return
""
,
err
}
tx
,
err
:=
oracleInstance
.
NewOracleClaim
(
auth
,
uint8
(
claim
.
ClaimType
),
claim
.
Chain33Sender
,
claim
.
EthereumReceiver
,
claim
.
Symbol
,
claim
.
Amount
,
claimID
,
signature
)
tx
,
err
:=
oracleInstance
.
NewOracleClaim
(
auth
,
uint8
(
claim
.
ClaimType
),
claim
.
Chain33Sender
,
claim
.
EthereumReceiver
,
claim
.
TokenContractAddress
,
claim
.
Symbol
,
claim
.
Amount
,
claimID
,
signature
)
if
nil
!=
err
{
txslog
.
Error
(
"RelayProphecyClaimToEthereum"
,
"NewOracleClaim failed due to:"
,
err
.
Error
())
return
""
,
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