Initial commit: CunaFinanceBsc smart contract
- Add upgradeable smart contract with vesting and staking functionality - Include comprehensive deployment script for proxy deployments and upgrades - Configure Hardhat with BSC testnet and verification support - Successfully deployed to BSC testnet at 0x12d705781764b7750d5622727EdA2392b512Ca3d 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1215
contracts/CunaFinanceBsc.sol
Normal file
1215
contracts/CunaFinanceBsc.sol
Normal file
File diff suppressed because it is too large
Load Diff
18
contracts/mocks/MockERC20.sol
Normal file
18
contracts/mocks/MockERC20.sol
Normal file
@@ -0,0 +1,18 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||
|
||||
contract MockERC20 is ERC20 {
|
||||
constructor(
|
||||
string memory name,
|
||||
string memory symbol,
|
||||
uint256 initialSupply
|
||||
) ERC20(name, symbol) {
|
||||
_mint(msg.sender, initialSupply);
|
||||
}
|
||||
|
||||
function mint(address to, uint256 amount) external {
|
||||
_mint(to, amount);
|
||||
}
|
||||
}
|
||||
20
contracts/mocks/MockPriceOracle.sol
Normal file
20
contracts/mocks/MockPriceOracle.sol
Normal file
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
contract MockPriceOracle {
|
||||
mapping(address => uint256) public prices;
|
||||
uint256 private defaultPrice = 1e18; // $1.00 default price
|
||||
|
||||
function setPrice(address token, uint256 price) external {
|
||||
prices[token] = price;
|
||||
}
|
||||
|
||||
function getLatestPrice(address token) external view returns (uint256) {
|
||||
uint256 price = prices[token];
|
||||
return price == 0 ? defaultPrice : price;
|
||||
}
|
||||
|
||||
function setDefaultPrice(uint256 price) external {
|
||||
defaultPrice = price;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user