Files
cuna/contracts/mocks/MockPriceOracle.sol
sascha 8a802718d3 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>
2025-09-10 02:15:20 +02:00

20 lines
575 B
Solidity

// 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;
}
}