Skip to content
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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

fix #196

wants to merge 4 commits into from

Conversation

adamskrodzki
Copy link
Contributor

  • sanity checks added in contract constructors
  • using existing serviceRegistry rather than redeploying
  • delay set to 0 also on mainnet

@adamskrodzki adamskrodzki requested a review from halaprix May 10, 2023 12:21
Copy link
Member

@halaprix halaprix left a 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this?

Suggested change
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe

Suggested change
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(
Copy link
Member

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)
Copy link
Member

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')
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants