-
Notifications
You must be signed in to change notification settings - Fork 45
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
Oracle v1pool #270
Oracle v1pool #270
Conversation
require(rBTCAddress != address(0), "rBTC address has not been set"); | ||
require(docAddress != address(0), "DOC address has not been set"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls move this to the constructor not to waste gas on every call
/** | ||
* @dev we had a bug in a loop: "i < endDate" instead of "i <= endDate" | ||
*/ | ||
function delegate(address _delegatee) public onlyTokenOwner { | ||
require(_delegatee != address(0), "delegatee address invalid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls check that your formatter settings correspond to those in development branch and prettier is active
@@ -106,3 +106,15 @@ def checkRates(): | |||
def readPriceFeedFor(tokenAddress): | |||
feeds = Contract.from_abi("PriceFeeds", address= conf.contracts['PriceFeeds'], abi = PriceFeeds.abi, owner = conf.acct) | |||
print(feeds.pricesFeeds(tokenAddress)) | |||
|
|||
def deployOracleV1Pool(): | |||
oraclePoolAsset = "0x28A05da0939853F7Bc9D5A17C9550D2769eE93D3" #SOV/WRBTC -- for SOV asset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one, is the v1 pool asset that's just created by rahne. I will put it in testnet_contracts.json later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change it to pulling from the contracts lists as otherwise it is a potential issue
( | ||
await LockedSOV.new(tokenSOV.address, vestingRegistry.address, cliff, duration, [owner]) | ||
).address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is false positive
shouldn't change with proper formatting switched on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be because of "Fit code within this line limit" parameters in visual code? what is the correct value should i use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be
try to switch it off and see the result
const PriceFeedV1PoolOracleMockup = artifacts.require("PriceFeedV1PoolOracleMockup"); | ||
const PriceFeedRSKOracle = artifacts.require("PriceFeedRSKOracle"); | ||
const PriceFeedRSKOracleMockup = artifacts.require("PriceFeedRSKOracleMockup"); | ||
const PriceFeedV1PoolOracle = artifacts.require("PriceFeedV1PoolOracle"); | ||
const LiquidityPoolV1ConverterMockup = artifacts.require("LiquidityPoolV1ConverterMockup"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as an experiment
pls replace the mockup contracts with
waffle mock contracts feature
let's see if it is more convenient
( | ||
await LockedSOV.new(tokenSOV.address, vestingRegistry.address, cliff, duration, [owner]) | ||
).address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably formatting issue
shouldn't change
We want to use our v1PoolOracle in our protocol. So we created the v1PoolOraclePriceFeed contract registry which is pointed to v1PoolOracle, so that can be registered in our priceFeed.sol and be used by our protocol
The deployment steps would be: