Skip to content

Commit 4579f9e

Browse files
committed
add back grant minter role
1 parent 3d058b6 commit 4579f9e

File tree

1 file changed

+12
-0
lines changed
  • packages/sdk/src/contract/edition-v2/read

1 file changed

+12
-0
lines changed

packages/sdk/src/contract/edition-v2/read/create.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { SOUND_METADATA_ABI, SOUND_METADATA_ADDRESS } from '../abi/sound-metadat
2121
import { SUPER_MINTER_V2_ABI, SUPER_MINTER_V2_ADDRESS } from '../abi/super-minter-v2'
2222

2323
import type { MinterScheduleConfig, TierConfig, TieredEditionConfig } from './info'
24+
import { SOUND_EDITION_V2_ABI } from '../abi/sound-edition-v2'
25+
import { MINTER_ROLE } from './helpers'
2426

2527
interface EditionV2EncodeArguments {
2628
readonly owner: Address | Readonly<Account>
@@ -58,6 +60,16 @@ export function createTieredEditionArgs({
5860
}: EditionV2EncodeArguments) {
5961
const contractCalls: ContractCall[] = []
6062

63+
// Grant MINTER_ROLE for super minter
64+
contractCalls.push({
65+
contractAddress: precomputedEdition,
66+
calldata: encodeFunctionData({
67+
abi: SOUND_EDITION_V2_ABI,
68+
functionName: 'grantRoles',
69+
args: [SUPER_MINTER_V2_ADDRESS, MINTER_ROLE],
70+
}),
71+
})
72+
6173
// Set up tier schedules on super minter
6274
for (const mintConfig of mintConfigs) {
6375
if (!isValidUint32(mintConfig.startTime)) {

0 commit comments

Comments
 (0)