Skip to content

Commit

Permalink
Merge pull request #10 from fuseio/feat/add-tranferTokenOwnership
Browse files Browse the repository at this point in the history
Adding transferTokenOwnership to the native to ERC20 bridge
  • Loading branch information
leonprou committed Apr 18, 2024
2 parents c1930e2 + be8a2d8 commit 56bbb7c
Show file tree
Hide file tree
Showing 7 changed files with 17,979 additions and 26,070 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ There are two ways to deploy contracts:
```bash
npm install
```

If npm install not working for you, try install with `yarn`

#### Deploy
Please read the [README.md](deploy/README.md) in the `deploy` folder for instructions and .env file configuration

Expand Down
1 change: 1 addition & 0 deletions contracts/interfaces/IBurnableMintableERC677Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ contract IBurnableMintableERC677Token is ERC677 {
function mint(address _to, uint256 _amount) public returns (bool);
function burn(uint256 _value) public;
function claimTokens(address _token, address _to) public;
function transferOwnership(address _newOwner) public;
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ contract ForeignAMBNativeToErc20 is BasicAMBNativeToErc20, ReentrancyGuard, Base
return true;
}

/**
* @dev Transfer token ownership to the new owner.The metod is called by the bridge owner to deprecate the bridge.
* @param _owner address address of the new owner.
*/
function transferTokenOwnership(address _owner) external onlyOwner {
IBurnableMintableERC677Token(erc677token())
.transferOwnership(_owner);
}

/**
* @dev Burns the amount of tokens and makes the request to unlock the native tokens on the other network.
* @param _token address of the ERC677 token.
Expand Down

0 comments on commit 56bbb7c

Please sign in to comment.