-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from yieldnest/feature/ynBNB-mainnet
Feature: ynBNB mainnet
- Loading branch information
Showing
33 changed files
with
1,723 additions
and
209 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": [], | ||
"rules": { | ||
"avoid-suicide": "error", | ||
"avoid-sha3": "warn", | ||
"compiler-version": ["error", "^0.8.0"], | ||
"func-visibility": ["warn", { "ignoreConstructors": true }], | ||
"reason-string": ["warn", { "maxLength": 64 }], | ||
"not-rely-on-time": "warn", | ||
"state-visibility": "error", | ||
"max-line-length": ["warn", 120], | ||
"no-console": "off" | ||
} | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Submodule synclub-contracts
added at
a27797
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,8 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity 0.8.24; | ||
|
||
contract ynBNBConstants { | ||
uint256 public constant MIN_DELAY = 84600; | ||
string public constant VAULT_NAME = "YieldNest: BNB Liquid Restaking"; | ||
string public constant VAULT_SYMBOL = "ynBNB"; | ||
} |
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,14 +1,23 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity ^0.8.24; | ||
|
||
interface IContracts { | ||
function DEPLOY_FACTORY() external view returns (address); | ||
function KERNEL_VAULT() external view returns (address); | ||
function KARAK_VAULT() external view returns (address); | ||
contract ChapelContracts { | ||
address public constant ACTORS = 0xbA02225f0fdB684c80ad1e829FC31f048c416Ce6; | ||
address public constant VAULT_FACTORY = 0x964C6d4050e052D627b8234CAD9CdF0981E40EB3; | ||
address public constant SINGLE_VAULT = 0xa2aE2b28c578Fbd7C18B554E7aA388Bf6694a42c; | ||
address public constant KERNEL_VAULT = address(0); | ||
address public constant KARAK_KslisBNB = address(0); | ||
address public constant KARAK_SUPERVISOR = address(0); | ||
address public constant slisBNB = 0x80815ee920Bd9d856562633C36D3eB0E43cb15e2; | ||
} | ||
|
||
contract ChapelContracts { | ||
address public constant DEPLOY_FACTORY = 0x964C6d4050e052D627b8234CAD9CdF0981E40EB3; | ||
address public constant KERNEL_VAULT = 0x0000000000000000000000000000000000000000; | ||
address public constant KARAK_VAULT = 0x0000000000000000000000000000000000000000; | ||
contract BscContracts { | ||
address public constant ACTORS = 0x1AA714a271047fA5AAFD190F084b66aA77Ba3562; | ||
address public constant VAULT_FACTORY = 0xf6B9b69B7e13D37D3846698bA2625e404C7586aF; | ||
address public constant SINGLE_VAULT = 0x40020796C11750975aD8758a1F2ab725f6b72Db2; | ||
address public constant KERNEL_VAULT = address(0); | ||
address public constant KARAK_KslisBNB = 0x8529019503c5BD707d8Eb98C5C87bF5237F89135; | ||
address public constant KARAK_VAULT_SUPERVISOR = 0x4a2b015CcB8658998692Db9eD4522B8e846962eD; | ||
address public constant slisBNB = 0xB0b84D294e0C75A6abe60171b70edEb2EFd14A1B; | ||
address public constant ListaStakeManager = 0x1adB950d8bB3dA4bE104211D5AB038628e477fE6; | ||
} |
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,13 @@ | ||
# This was the script uses to verify the ynBNB TransparentUpgradeableProxy on BscScan | ||
PROXY_CONTRACT_TO_VERIFY=0x304B5845b9114182ECb4495Be4C91a273b74B509 | ||
|
||
# NOTE: Get the constructor args from Etherscan. You can get this from the Verify and Publish section after it fails, it will tell you what it wants from the contract bytecode | ||
# The last section of the byte code is the constructor. There seems to be a difference between how cast cosntructos abi-encoded data and how Etherscan does. | ||
PROXY_CONSTRUCTOR_DATA=00000000000000000000000080815ee920bd9d856562633c36d3eb0e43cb15e2000000000000000000000000d53044093f757e8a56fed3ccfd0af5ad67aead4a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e40e12d3d5000000000000000000000000b0b84d294e0c75a6abe60171b70edeb2efd14a1b00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000721688652dea9cabec70bd99411eaeab9485d4360000000000000000000000000000000000000000000000000000000000014a78000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000001f5969656c644e6573743a20424e42204c69717569642052657374616b696e67000000000000000000000000000000000000000000000000000000000000000005796e424e420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000721688652dea9cabec70bd99411eaeab9485d4360000000000000000000000000000000000000000000000000000000000000001000000000000000000000000721688652dea9cabec70bd99411eaeab9485d43600000000000000000000000000000000000000000000000000000000 | ||
|
||
forge verify-contract $PROXY_CONTRACT_TO_VERIFY \ | ||
--constructor-args $PROXY_CONSTRUCTOR_DATA \ | ||
--num-of-optimizations 200 \ | ||
--etherscan-api-key $ETHERSCAN_API_KEY \ | ||
--rpc-url $RPC_URL \ | ||
--watch |
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,45 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity ^0.8.24; | ||
|
||
import {IERC20, IERC4626, IAccessControl} from "src/Common.sol"; | ||
|
||
interface IVaultFactory is IAccessControl { | ||
enum VaultType { | ||
SingleAsset, | ||
MultiAsset | ||
} | ||
|
||
/** | ||
* @dev Represents a vault with its timelock, name, symbol, and type. | ||
* @param timelock The address of the timelock controller for the vault. | ||
* @param name The name of the vault. | ||
* @param symbol The symbol of the vault. | ||
* @param vaultType The type of the vault, either SingleAsset or MultiAsset. | ||
*/ | ||
struct Vault { | ||
address timelock; | ||
string name; | ||
string symbol; | ||
VaultType vaultType; | ||
} | ||
|
||
function timelock() external view returns (address); | ||
|
||
function singleVaultImpl() external view returns (address); | ||
|
||
function multiVaultImpl() external view returns (address); | ||
|
||
function initialize(address singleVaultImpl_, address admin, address timelock_) external; | ||
|
||
function createSingleVault( | ||
IERC20 asset_, | ||
string memory name_, | ||
string memory symbol_, | ||
address admin_, | ||
uint256 minDelay_, | ||
address[] memory proposers_, | ||
address[] memory executors_ | ||
) external returns (address); | ||
|
||
function setVaultVersion(address implementation_, VaultType vaultType) external; | ||
} |
Oops, something went wrong.