Skip to content

Commit

Permalink
Merge pull request #1081 from thesandboxgame/feat/instant_giveaway_de…
Browse files Browse the repository at this point in the history
…ploy_03082023_post_audit

Feat/instant giveaway deploy post audit
  • Loading branch information
adjisb authored Sep 1, 2023
2 parents 5430cc8 + 147b2c1 commit d99b4a2
Show file tree
Hide file tree
Showing 8 changed files with 4,097 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/deploy/deploy/100_claim/100_multi_claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const func: DeployFunction = async function (
const {deployments, getNamedAccounts} = hre;
const {deployer, upgradeAdmin, sandAdmin} = await getNamedAccounts();
const TRUSTED_FORWARDER = await deployments.get('TRUSTED_FORWARDER_V2');
await deployments.deploy('MultiGiveawayV1', {
await deployments.deploy('SignedMultiGiveaway', {
from: deployer,
contract:
'@sandbox-smart-contracts/giveaway/contracts/SignedMultiGiveaway.sol:SignedMultiGiveaway',
Expand All @@ -26,5 +26,5 @@ const func: DeployFunction = async function (
};

export default func;
func.tags = ['MultiGiveawayV1', 'MultiGiveawayV1_deploy', 'L2'];
func.tags = ['SignedMultiGiveaway', 'SignedMultiGiveaway_deploy', 'L2'];
func.dependencies = ['TRUSTED_FORWARDER_V2'];
10 changes: 5 additions & 5 deletions packages/deploy/deploy/100_claim/200_multi_claim_role_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ const func: DeployFunction = async function (
const {deployments, getNamedAccounts} = hre;
const {execute, read, catchUnknownSigner} = deployments;
const {sandAdmin, backendCashbackWallet} = await getNamedAccounts();
const signerRole = await read('MultiGiveawayV1', 'SIGNER_ROLE');
const signerRole = await read('SignedMultiGiveaway', 'SIGNER_ROLE');
if (
!(await read(
'MultiGiveawayV1',
'SignedMultiGiveaway',
'hasRole',
signerRole,
backendCashbackWallet
))
) {
await catchUnknownSigner(
execute(
'MultiGiveawayV1',
'SignedMultiGiveaway',
{from: sandAdmin, log: true},
'grantRole',
signerRole,
Expand All @@ -29,5 +29,5 @@ const func: DeployFunction = async function (
};

export default func;
func.tags = ['MultiGiveawayV1', 'MultiGiveawayV1_role_setup', 'L2'];
func.dependencies = ['MultiGiveawayV1_deploy'];
func.tags = ['SignedMultiGiveaway', 'SignedMultiGiveaway_role_setup', 'L2'];
func.dependencies = ['SignedMultiGiveaway_deploy'];
Loading

0 comments on commit d99b4a2

Please sign in to comment.