File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/sdk/src/contract/edition-v2/read Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import { SOUND_METADATA_ABI, SOUND_METADATA_ADDRESS } from '../abi/sound-metadat
21
21
import { SUPER_MINTER_V2_ABI , SUPER_MINTER_V2_ADDRESS } from '../abi/super-minter-v2'
22
22
23
23
import type { MinterScheduleConfig , TierConfig , TieredEditionConfig } from './info'
24
+ import { SOUND_EDITION_V2_ABI } from '../abi/sound-edition-v2'
25
+ import { MINTER_ROLE } from './helpers'
24
26
25
27
interface EditionV2EncodeArguments {
26
28
readonly owner : Address | Readonly < Account >
@@ -58,6 +60,16 @@ export function createTieredEditionArgs({
58
60
} : EditionV2EncodeArguments ) {
59
61
const contractCalls : ContractCall [ ] = [ ]
60
62
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
+
61
73
// Set up tier schedules on super minter
62
74
for ( const mintConfig of mintConfigs ) {
63
75
if ( ! isValidUint32 ( mintConfig . startTime ) ) {
You can’t perform that action at this time.
0 commit comments