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
3b585d22
Commit
3b585d22
authored
Dec 20, 2021
by
hezhengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure proxyReceiver is needed to be set when do the withdraw
parent
a1c96130
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
BridgeBank.sol
...eth/contracts/contracts4chain33/BridgeBank/BridgeBank.sol
+1
-2
EthereumBank.sol
...h/contracts/contracts4chain33/BridgeBank/EthereumBank.sol
+7
-6
BridgeBank.go
...s2eth/contracts/contracts4chain33/generated/BridgeBank.go
+0
-0
No files found.
plugin/dapp/cross2eth/contracts/contracts4chain33/BridgeBank/BridgeBank.sol
View file @
3b585d22
...
...
@@ -111,10 +111,9 @@ contract BridgeBank is EthereumBank, Chain33Bank {
* @param _proxyReceiver: The address to receive asset
* @return: indicate whether set successfully or not
*/
function setWithdrawProxy(address payable _proxyReceiver) public onlyOperator
returns(bool)
function setWithdrawProxy(address payable _proxyReceiver) public onlyOperator
{
proxyReceiver = _proxyReceiver;
return true;
}
/*
...
...
plugin/dapp/cross2eth/contracts/contracts4chain33/BridgeBank/EthereumBank.sol
View file @
3b585d22
...
...
@@ -360,19 +360,20 @@ contract EthereumBank {
)
internal
{
require(proxyReceiver != address(0), "proxy receiver hasn't been set");
// Must be whitelisted bridge token
require(bridgeTokenWhitelist[_bridgeTokenAddress], "Token must be a whitelisted bridge token");
// burn bridge tokens
BridgeToken bridgeTokenInstance = BridgeToken(_bridgeTokenAddress);
bridgeTokenInstance.transferFrom(_from, proxyReceiver, _amount);
DepositBurnWithdrawCount memory w
ith
Count = depositBurnWithdrawCounts[_bridgeTokenAddress];
DepositBurnWithdrawCount memory w
d
Count = depositBurnWithdrawCounts[_bridgeTokenAddress];
require(
w
ithCount.withdrawCount + 1 > with
Count.withdrawCount,
"
burn
nonce is not available"
w
dCount.withdrawCount + 1 > wd
Count.withdrawCount,
"
withdraw
nonce is not available"
);
w
ithCount.withdrawCount = with
Count.withdrawCount.add(1);
depositBurnWithdrawCounts[_bridgeTokenAddress] = w
ith
Count;
w
dCount.withdrawCount = wd
Count.withdrawCount.add(1);
depositBurnWithdrawCounts[_bridgeTokenAddress] = w
d
Count;
emit LogEthereumTokenWithdraw(
_bridgeTokenAddress,
...
...
@@ -381,7 +382,7 @@ contract EthereumBank {
_from,
_ethereumReceiver,
proxyReceiver,
w
ith
Count.withdrawCount
w
d
Count.withdrawCount
);
}
...
...
plugin/dapp/cross2eth/contracts/contracts4chain33/generated/BridgeBank.go
View file @
3b585d22
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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