Skip to content

Commit

Permalink
refactor: remove productOperator from crop component deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
doerfli committed Dec 20, 2024
1 parent 6a04753 commit 4df3876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/deploy_all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function main() {

await deployFlightDelayComponentContracts(libraries, services, fireOwner, protocolOwner);

await deployCropComponentContracts(libraries, services, fireOwner, productOperator, protocolOwner);
await deployCropComponentContracts(libraries, services, fireOwner, protocolOwner);
}

if (require.main === module) {
Expand Down
7 changes: 3 additions & 4 deletions scripts/deploy_crop_components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { logger } from "./logger";
async function main() {
loadVerificationQueueState();

const { protocolOwner, productOwner: cropOwner, productOperator } = await getNamedAccounts();
const { protocolOwner, productOwner: cropOwner } = await getNamedAccounts();

await deployCropComponentContracts(
{
Expand Down Expand Up @@ -41,14 +41,13 @@ async function main() {
instanceServiceAddress: process.env.INSTANCE_SERVICE_ADDRESS!,
} as ServiceAddresses,
cropOwner,
productOperator,
protocolOwner,
);
}


export async function deployCropComponentContracts(
libraries: LibraryAddresses, services: ServiceAddresses, cropOwner: Signer, productOperator: Signer, registryOwner: Signer) {
libraries: LibraryAddresses, services: ServiceAddresses, cropOwner: Signer, registryOwner: Signer) {
resetBalances();
resetGasSpent();

Expand Down Expand Up @@ -209,7 +208,7 @@ export async function deployCropComponentContracts(
await executeTx(async () =>
await instance.grantRole(
roleId,
await productOperator.getAddress(),
await cropOwner.getAddress(),
getTxOpts()),
"crop - grantProductOperator",
[IInstance__factory.createInterface()]
Expand Down

0 comments on commit 4df3876

Please sign in to comment.