Conversation
kronosapiens
left a comment
There was a problem hiding this comment.
Looks fine to me, a few comments here and there
| @@ -0,0 +1,106 @@ | |||
| const hre = require("hardhat"); | |||
There was a problem hiding this comment.
Any reason you don't use globals here?
There was a problem hiding this comment.
This isn't being run from inside hardhat, so I don't think it exists?
| } | ||
|
|
||
| async function main() { | ||
| signer = await ethers.getImpersonatedSigner("0x56a9212f7f495fadce1f27967bef5158199b36c7"); |
There was a problem hiding this comment.
Add comment clarifying what this address is. Random?
There was a problem hiding this comment.
It's the address in control of the production network, which has to be the one to update resolvers etc.
|
|
||
| await hre.run("deploy"); | ||
|
|
||
| const DEPLOYED_NETWORK_ADDRESS = "0x777760996135F0791E2e1a74aFAa060711197777"; |
There was a problem hiding this comment.
Ditto this -- where is this coming from?
There was a problem hiding this comment.
It's the address ColonyNetwork is deployed to in production.
af57ad2 to
fc7a62c
Compare
fc7a62c to
57a3b81
Compare
|
Marking this |
To improve the accuracy and throughput of QA, there's a desire for the ability to have an entire environment that is forked from the QA environment. That includes the database and so-forth, which is out of scope for here, but this PR includes the elements that are required on our side.
There are two main features here:
deployToForkedChainscript (that's called from outside this repo). This script also downloads the latest reputation state, which the reputation miner will use.forked.jsto the miner which is only intended to be used as the miner in this circumstance. It allows mining with an address with an unknown private key (via thegetImpersonatedSignerhelper, as well as querying the oracle we've forked from in the case of an unknown (and therefore presumed historical) reputation state. This will over-query the oracle (as any reputations queried that don't exist will also be tried upstream), but without having the forked miner sync the whole of history (time-consuming and/or expensive), I think it's the best that we can do.Leaving in draft for now, as the feature as a whole is still in the testing phase, but we're getting close to this being reviewed and merged.