Skip to content

Commit

Permalink
Tasks updated to take into account ProfileTokenURILogic lib
Browse files Browse the repository at this point in the history
  • Loading branch information
donosonaumczuk committed Feb 22, 2022
1 parent fe4901d commit 6505053
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
9 changes: 9 additions & 0 deletions tasks/full-deploy-verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
RevertCollectModule__factory,
TimedFeeCollectModule__factory,
TransparentUpgradeableProxy__factory,
ProfileTokenURILogic__factory,
} from '../typechain-types';
import { deployWithVerify, waitForTx } from './helpers/utils';

Expand Down Expand Up @@ -79,9 +80,16 @@ task('full-deploy-verify', 'deploys the entire Lens Protocol with explorer verif
[],
'contracts/libraries/InteractionLogic.sol:InteractionLogic'
);
const profileTokenURILogic = await deployWithVerify(
new ProfileTokenURILogic__factory(deployer).deploy({ nonce: deployerNonce++ }),
[],
'contracts/libraries/ProfileTokenURILogic.sol:ProfileTokenURILogic'
);
const hubLibs = {
'contracts/libraries/PublishingLogic.sol:PublishingLogic': publishingLogic.address,
'contracts/libraries/InteractionLogic.sol:InteractionLogic': interactionLogic.address,
'contracts/libraries/ProfileTokenURILogic.sol:ProfileTokenURILogic':
profileTokenURILogic.address,
};

// Here, we pre-compute the nonces and addresses used to deploy the contracts.
Expand Down Expand Up @@ -279,6 +287,7 @@ task('full-deploy-verify', 'deploys the entire Lens Protocol with explorer verif
'lensHub impl:': lensHubImpl.address,
'publishing logic lib': publishingLogic.address,
'interaction logic lib': interactionLogic.address,
'profile token URI logic lib': profileTokenURILogic.address,
'follow NFT impl': followNFTImplAddress,
'collect NFT impl': collectNFTImplAddress,
'module globals': moduleGlobals.address,
Expand Down
13 changes: 11 additions & 2 deletions tasks/full-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
RevertCollectModule__factory,
TimedFeeCollectModule__factory,
TransparentUpgradeableProxy__factory,
ProfileTokenURILogic__factory,
} from '../typechain-types';
import { deployContract, waitForTx } from './helpers/utils';

Expand Down Expand Up @@ -57,9 +58,14 @@ task('full-deploy', 'deploys the entire Lens Protocol').setAction(async ({}, hre
const interactionLogic = await deployContract(
new InteractionLogic__factory(deployer).deploy({ nonce: deployerNonce++ })
);
const profileTokenURILogic = await deployContract(
new ProfileTokenURILogic__factory(deployer).deploy({ nonce: deployerNonce++ })
);
const hubLibs = {
'contracts/libraries/PublishingLogic.sol:PublishingLogic': publishingLogic.address,
'contracts/libraries/InteractionLogic.sol:InteractionLogic': interactionLogic.address,
'contracts/libraries/ProfileTokenURILogic.sol:ProfileTokenURILogic':
profileTokenURILogic.address,
};

// Here, we pre-compute the nonces and addresses used to deploy the contracts.
Expand All @@ -72,7 +78,8 @@ task('full-deploy', 'deploys the entire Lens Protocol').setAction(async ({}, hre
'0x' + keccak256(RLP.encode([deployer.address, followNFTNonce])).substr(26);
const collectNFTImplAddress =
'0x' + keccak256(RLP.encode([deployer.address, collectNFTNonce])).substr(26);
const hubProxyAddress = '0x' + keccak256(RLP.encode([deployer.address, hubProxyNonce])).substr(26);
const hubProxyAddress =
'0x' + keccak256(RLP.encode([deployer.address, hubProxyNonce])).substr(26);

// Next, we deploy first the hub implementation, then the followNFT implementation, the collectNFT, and finally the
// hub proxy with initialization.
Expand Down Expand Up @@ -187,7 +194,9 @@ task('full-deploy', 'deploys the entire Lens Protocol').setAction(async ({}, hre
})
);
await waitForTx(
lensHub.whitelistCollectModule(timedFeeCollectModule.address, true, { nonce: governanceNonce++ })
lensHub.whitelistCollectModule(timedFeeCollectModule.address, true, {
nonce: governanceNonce++,
})
);
await waitForTx(
lensHub.whitelistCollectModule(limitedTimedFeeCollectModule.address, true, {
Expand Down

0 comments on commit 6505053

Please sign in to comment.