-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix * tests * comments * removed unused deps * network addresses * removed mumbai
- Loading branch information
1 parent
3a5856e
commit 91e9218
Showing
19 changed files
with
129 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; | ||
import "@solarity/solidity-lib/access-control/MultiOwnable.sol"; | ||
|
||
import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol"; | ||
|
||
import "../../interfaces/core/INetworkProperties.sol"; | ||
|
||
contract BSCProperties is INetworkProperties { | ||
contract BSCProperties is INetworkProperties, MultiOwnable, UUPSUpgradeable { | ||
uint256 private constant BNB_SUPPLY = 150_000_000 * 10 ** 18; | ||
|
||
IWETH public weth; | ||
|
||
function __NetworkProperties_init(address weth_) external initializer { | ||
__MultiOwnable_init(); | ||
|
||
weth = IWETH(weth_); | ||
} | ||
|
||
function unwrapWeth(uint256 amount) external override { | ||
weth.withdraw(amount); | ||
|
||
(bool ok, ) = payable(msg.sender).call{value: amount}(""); | ||
assert(ok); | ||
} | ||
|
||
receive() external payable {} | ||
|
||
function getNativeSupply() external view override returns (uint256) { | ||
return BNB_SUPPLY; | ||
} | ||
|
||
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import "../../core/network-properties/BSCProperties.sol"; | ||
|
||
contract NetworkPropertiesMock is BSCProperties { | ||
function changeWeth(address newAddress) external { | ||
weth = IWETH(newAddress); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.