-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix #196
base: dev
Are you sure you want to change the base?
fix #196
Conversation
adamskrodzki
commented
May 10, 2023
- sanity checks added in contract constructors
- using existing serviceRegistry rather than redeploying
- delay set to 0 also on mainnet
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.
left comments
console.log('address 0x0 deploying ', serviceName) | ||
return (await utils.deployContract(ethers.getContractFactory(contractName), params)) as T | ||
} else { | ||
console.log('"address not 0x0 fetching instead ', serviceName) |
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.
maybe this?
console.log('"address not 0x0 fetching instead ', serviceName) | |
console.log('service address not 0x0 - fetching from Service Registry ', serviceName) |
const address = await serviceRegistry.getRegisteredService(serviceName) | ||
|
||
if (address === constants.AddressZero) { | ||
console.log('address 0x0 deploying ', serviceName) |
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.
maybe
console.log('address 0x0 deploying ', serviceName) | |
console.log('service address 0x0 - deploying ', serviceName) |
@@ -67,6 +68,9 @@ const createServiceRegistry = (utils: HardhatUtils, serviceRegistry: ServiceRegi | |||
const existingAddress = await serviceRegistry.getServiceAddress(hash) | |||
const gasSettings = await utils.getGasSettings() | |||
if (existingAddress === constants.AddressZero) { | |||
// console.log( |
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.
remove
const ServiceRegistryInstance = | ||
utils.hre.network.name === Network.HARDHAT | ||
? ((await utils.deployContract(ethers.getContractFactory('ServiceRegistry'), [0])) as ServiceRegistry) | ||
: await ethers.getContractAt('ServiceRegistry', '0x5e81a7515f956ab642eb698821a449fe8fe7498e', signer) |
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.
move address to addresses.ts
) | ||
const signer = | ||
utils.hre.network.name === Network.LOCAL | ||
? await ethers.getImpersonatedSigner('0x0B5a3C04D1199283938fbe887A2C82C808aa89Fb') |
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.
move to addresses.ts
or get with owner()
directly from SR
await ensureServiceRegistryEntry(getExecuteAdapterNameHash(address), adapter) | ||
} | ||
} | ||
|
||
/* | ||
if (system.closeCommand && system.closeCommand.address !== constants.AddressZero) { |
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.
remove