Skip to content

Commit

Permalink
feature: GMS-999: update royalty allowlist to operator allowlist (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayden authored Aug 30, 2023
1 parent 5a474f4 commit 590d889
Show file tree
Hide file tree
Showing 9 changed files with 380 additions and 444 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- @imtbl/passport: Added support for `eth_getCode` to Passport zkEvm provider.
- @imtbl/erc721: renamed from @imtbl/erc721-hybrid-permissioned-mintable. Renamed various mint methods to match with preset methods released in zkevm-contracts v1.0.8. Added `safeBurn` and `safeBurnBatch` methods released in zkevm-contracts v1.1.0
- @imtbl/erc721-mint-by-id: renamed from @imtbl/erc721-permissioned-mintable. Added `safeBurn` and `safeBurnBatch` methods released in zkevm-contracts v1.1.0
- @imtbl/erc721: Added `safeBurn` and `safeBurnBatch` methods released in zkevm-contracts v1.1.0
- @imtbl/erc721-mint-by-id: Added `safeBurn` and `safeBurnBatch` methods released in zkevm-contracts v1.1.0

### Changed

Expand All @@ -21,6 +21,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- @imtbl/immutablex-client: Some request/response types were not being exported.

### Changed

- @imtbl/erc721: Renamed from @imtbl/erc721-hybrid-permissioned-mintable.
- @imtbl/erc721: Renamed various mint methods to match with preset methods released in zkevm-contracts v1.0.8.
- @imtbl/erc721: Renamed all instances of "Royalty Allowlist" to a more generic "Operator Allowlist"
- @imtbl/erc721-mint-by-id: Renamed from @imtbl/erc721-permissioned-mintable.
- @imtbl/erc721-mint-by-id: Renamed all instances of "Royalty Allowlist" to a more generic "Operator Allowlist"

## [0.13.0] - 2023-08-22

### Added
Expand Down
46 changes: 30 additions & 16 deletions packages/erc721-mint-by-id/src/erc721-mint-by-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import {
ImmutableERC721MintByID,
ImmutableERC721MintByID__factory,
} from '@imtbl/contracts';
import {
ImmutableERC721Base,
} from '@imtbl/contracts/dist/typechain/types/ImmutableERC721MintByID';
import { ImmutableERC721Base } from '@imtbl/contracts/dist/typechain/types/ImmutableERC721MintByID';
import { PromiseOrValue } from '@imtbl/contracts/dist/typechain/types/common';

// Struct for specifying token IDs to mint to an address.
Expand Down Expand Up @@ -199,13 +197,13 @@ export class ERC721MintByID {
}

/**
* @returns the royalty allowlist as a string.
* @returns the operator allowlist as a string.
*/
public async royaltyAllowlist(
public async operatorAllowlist(
provider: Provider,
overrides: CallOverrides = {},
): Promise<string> {
return await this.contract.connect(provider).royaltyAllowlist(overrides);
return await this.contract.connect(provider).operatorAllowlist(overrides);
}

/**
Expand Down Expand Up @@ -295,7 +293,10 @@ export class ERC721MintByID {
from?: PromiseOrValue<string>;
} = {},
): Promise<PopulatedTransaction> {
return await this.contract.populateTransaction.burnBatch(tokenIds, overrides);
return await this.contract.populateTransaction.burnBatch(
tokenIds,
overrides,
);
}

/**
Expand Down Expand Up @@ -352,7 +353,10 @@ export class ERC721MintByID {
from?: PromiseOrValue<string>;
} = {},
): Promise<PopulatedTransaction> {
return await this.contract.populateTransaction.safeMintBatch(mints, overrides);
return await this.contract.populateTransaction.safeMintBatch(
mints,
overrides,
);
}

/**
Expand All @@ -365,7 +369,11 @@ export class ERC721MintByID {
from?: PromiseOrValue<string>;
} = {},
): Promise<PopulatedTransaction> {
return await this.contract.populateTransaction.safeBurn(owner, tokenId, overrides);
return await this.contract.populateTransaction.safeBurn(
owner,
tokenId,
overrides,
);
}

/**
Expand All @@ -377,7 +385,10 @@ export class ERC721MintByID {
from?: PromiseOrValue<string>;
} = {},
): Promise<PopulatedTransaction> {
return await this.contract.populateTransaction.safeBurnBatch(burns, overrides);
return await this.contract.populateTransaction.safeBurnBatch(
burns,
overrides,
);
}

/**
Expand Down Expand Up @@ -438,7 +449,10 @@ export class ERC721MintByID {
from?: PromiseOrValue<string>;
} = {},
): Promise<PopulatedTransaction> {
return await this.contract.populateTransaction.safeTransferFromBatch(transfers, overrides);
return await this.contract.populateTransaction.safeTransferFromBatch(
transfers,
overrides,
);
}

/**
Expand Down Expand Up @@ -577,16 +591,16 @@ export class ERC721MintByID {
}

/**
* @returns a populated transaction for the setRoyaltyAllowlistRegistry contract function
* @returns a populated transaction for the setOperatorAllowlistRegistry contract function
*/
public async populateSetRoyaltyAllowlistRegistry(
_royaltyAllowlist: PromiseOrValue<string>,
public async populateSetOperatorAllowlistRegistry(
_operatorAllowlist: PromiseOrValue<string>,
overrides: Overrides & {
from?: PromiseOrValue<string>;
} = {},
): Promise<PopulatedTransaction> {
return await this.contract.populateTransaction.setRoyaltyAllowlistRegistry(
_royaltyAllowlist,
return await this.contract.populateTransaction.setOperatorAllowlistRegistry(
_operatorAllowlist,
overrides,
);
}
Expand Down
Loading

0 comments on commit 590d889

Please sign in to comment.