-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[contract] geth 네크워크의 표준 priceOracle 컨트랙트 #292
Comments
컨트랙트 상세 내용은 다음과 같습니다 // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract PriceOracleMock {
uint256 public btcPrice;
uint256 public ethPrice;
uint256 public linkPrice;
constructor(
uint256 _initialBTCPrice,
uint256 _initialETHPrice,
uint256 _initialLinkPrice
) {
btcPrice = _initialBTCPrice;
ethPrice = _initialETHPrice;
linkPrice = _initialLinkPrice;
}
function setBTCPrice(uint256 _price) public returns (uint256) {
btcPrice = _price;
return btcPrice;
}
function setETHPrice(uint256 _price) public returns (uint256) {
ethPrice = _price;
return ethPrice;
}
function setLinkPrice(uint256 _price) public returns (uint256) {
linkPrice = _price;
return linkPrice;
}
} 발행은 Admin 주소로 하였습니다 |
초기값을 인자로 받지 않고 생성자에 포함하는 형식으로 바꾸었습니다 // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract PriceOracleMock {
uint256 public btcPrice;
uint256 public ethPrice;
uint256 public linkPrice;
constructor(
) {
btcPrice = 2500000000000;
ethPrice = 160000000000;
linkPrice = 750000000;
}
function setBTCPrice(uint256 _price) public returns (uint256) {
btcPrice = _price;
return btcPrice;
}
function setETHPrice(uint256 _price) public returns (uint256) {
ethPrice = _price;
return ethPrice;
}
function setLinkPrice(uint256 _price) public returns (uint256) {
linkPrice = _price;
return linkPrice;
}
} |
decimal이 기본 8인가요? |
네 체인링크의 /USDT 가격호출 단위에 맞추었습니다 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BTC, ETH, LINK 세가지 자산 종류에 대한 모킹 priceOracle 컨트랙트 주소입니다.
0xc6632bad92Ae7600D75d2c376dd21f0997877891
초기값은
BTC - 2500000000000
ETH - 160000000000
LINK - 750000000
입니다
The text was updated successfully, but these errors were encountered: