Skip to content

Commit

Permalink
Merge pull request #240 from storyprotocol/dev
Browse files Browse the repository at this point in the history
rc 19 release
  • Loading branch information
edisonz0718 authored Aug 25, 2024
2 parents 3e72cbd + 1b8273c commit cedf6f4
Show file tree
Hide file tree
Showing 26 changed files with 262 additions and 343 deletions.
2 changes: 1 addition & 1 deletion packages/core-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@story-protocol/core-sdk",
"version": "1.0.0-rc.18",
"version": "1.0.0-rc.19",
"description": "Story Protocol Core SDK",
"main": "dist/story-protocol-core-sdk.cjs.js",
"module": "dist/story-protocol-core-sdk.esm.js",
Expand Down
130 changes: 54 additions & 76 deletions packages/core-sdk/src/abi/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6686,14 +6686,14 @@ export const spgAbi = [
inputs: [
{ name: "nftContract", internalType: "address", type: "address" },
{ name: "recipient", internalType: "address", type: "address" },
{ name: "nftMetadata", internalType: "string", type: "string" },
{
name: "ipMetadata",
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand All @@ -6710,14 +6710,14 @@ export const spgAbi = [
inputs: [
{ name: "nftContract", internalType: "address", type: "address" },
{ name: "recipient", internalType: "address", type: "address" },
{ name: "nftMetadata", internalType: "string", type: "string" },
{
name: "ipMetadata",
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand Down Expand Up @@ -6801,14 +6801,14 @@ export const spgAbi = [
{ name: "royaltyContext", internalType: "bytes", type: "bytes" },
],
},
{ name: "nftMetadata", internalType: "string", type: "string" },
{
name: "ipMetadata",
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand All @@ -6827,14 +6827,14 @@ export const spgAbi = [
{ name: "nftContract", internalType: "address", type: "address" },
{ name: "licenseTokenIds", internalType: "uint256[]", type: "uint256[]" },
{ name: "royaltyContext", internalType: "bytes", type: "bytes" },
{ name: "nftMetadata", internalType: "string", type: "string" },
{
name: "ipMetadata",
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand Down Expand Up @@ -6876,8 +6876,9 @@ export const spgAbi = [
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand Down Expand Up @@ -6906,8 +6907,9 @@ export const spgAbi = [
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand Down Expand Up @@ -7016,8 +7018,9 @@ export const spgAbi = [
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand Down Expand Up @@ -7058,8 +7061,9 @@ export const spgAbi = [
internalType: "struct IStoryProtocolGateway.IPMetadata",
type: "tuple",
components: [
{ name: "metadataURI", internalType: "string", type: "string" },
{ name: "metadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "ipMetadataURI", internalType: "string", type: "string" },
{ name: "ipMetadataHash", internalType: "bytes32", type: "bytes32" },
{ name: "nftMetadataURI", internalType: "string", type: "string" },
{ name: "nftMetadataHash", internalType: "bytes32", type: "bytes32" },
],
},
Expand Down Expand Up @@ -13746,16 +13750,15 @@ export type SpgCreateCollectionRequest = {
*
* @param nftContract address
* @param recipient address
* @param nftMetadata string
* @param ipMetadata tuple
*/
export type SpgMintAndRegisterIpRequest = {
nftContract: Address;
recipient: Address;
nftMetadata: string;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
};
Expand All @@ -13765,17 +13768,16 @@ export type SpgMintAndRegisterIpRequest = {
*
* @param nftContract address
* @param recipient address
* @param nftMetadata string
* @param ipMetadata tuple
* @param terms tuple
*/
export type SpgMintAndRegisterIpAndAttachPilTermsRequest = {
nftContract: Address;
recipient: Address;
nftMetadata: string;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
terms: {
Expand Down Expand Up @@ -13804,7 +13806,6 @@ export type SpgMintAndRegisterIpAndAttachPilTermsRequest = {
*
* @param nftContract address
* @param derivData tuple
* @param nftMetadata string
* @param ipMetadata tuple
* @param recipient address
*/
Expand All @@ -13816,10 +13817,10 @@ export type SpgMintAndRegisterIpAndMakeDerivativeRequest = {
licenseTermsIds: readonly bigint[];
royaltyContext: Hex;
};
nftMetadata: string;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
recipient: Address;
Expand All @@ -13831,18 +13832,17 @@ export type SpgMintAndRegisterIpAndMakeDerivativeRequest = {
* @param nftContract address
* @param licenseTokenIds uint256[]
* @param royaltyContext bytes
* @param nftMetadata string
* @param ipMetadata tuple
* @param recipient address
*/
export type SpgMintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
nftContract: Address;
licenseTokenIds: readonly bigint[];
royaltyContext: Hex;
nftMetadata: string;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
recipient: Address;
Expand All @@ -13860,8 +13860,9 @@ export type SpgRegisterIpRequest = {
nftContract: Address;
tokenId: bigint;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
sigMetadata: {
Expand All @@ -13885,8 +13886,9 @@ export type SpgRegisterIpAndAttachPilTermsRequest = {
nftContract: Address;
tokenId: bigint;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
terms: {
Expand Down Expand Up @@ -13940,8 +13942,9 @@ export type SpgRegisterIpAndMakeDerivativeRequest = {
royaltyContext: Hex;
};
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
sigMetadata: {
Expand Down Expand Up @@ -13973,8 +13976,9 @@ export type SpgRegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
licenseTokenIds: readonly bigint[];
royaltyContext: Hex;
ipMetadata: {
metadataURI: string;
metadataHash: Hex;
ipMetadataURI: string;
ipMetadataHash: Hex;
nftMetadataURI: string;
nftMetadataHash: Hex;
};
sigMetadata: {
Expand Down Expand Up @@ -14147,7 +14151,7 @@ export class SpgClient extends SpgEventClient {
address: this.address,
functionName: "mintAndRegisterIp",
account: this.wallet.account,
args: [request.nftContract, request.recipient, request.nftMetadata, request.ipMetadata],
args: [request.nftContract, request.recipient, request.ipMetadata],
});
return await this.wallet.writeContract(call as WriteContractParameters);
}
Expand All @@ -14164,7 +14168,7 @@ export class SpgClient extends SpgEventClient {
data: encodeFunctionData({
abi: spgAbi,
functionName: "mintAndRegisterIp",
args: [request.nftContract, request.recipient, request.nftMetadata, request.ipMetadata],
args: [request.nftContract, request.recipient, request.ipMetadata],
}),
};
}
Expand All @@ -14183,13 +14187,7 @@ export class SpgClient extends SpgEventClient {
address: this.address,
functionName: "mintAndRegisterIpAndAttachPILTerms",
account: this.wallet.account,
args: [
request.nftContract,
request.recipient,
request.nftMetadata,
request.ipMetadata,
request.terms,
],
args: [request.nftContract, request.recipient, request.ipMetadata, request.terms],
});
return await this.wallet.writeContract(call as WriteContractParameters);
}
Expand All @@ -14208,13 +14206,7 @@ export class SpgClient extends SpgEventClient {
data: encodeFunctionData({
abi: spgAbi,
functionName: "mintAndRegisterIpAndAttachPILTerms",
args: [
request.nftContract,
request.recipient,
request.nftMetadata,
request.ipMetadata,
request.terms,
],
args: [request.nftContract, request.recipient, request.ipMetadata, request.terms],
}),
};
}
Expand All @@ -14233,13 +14225,7 @@ export class SpgClient extends SpgEventClient {
address: this.address,
functionName: "mintAndRegisterIpAndMakeDerivative",
account: this.wallet.account,
args: [
request.nftContract,
request.derivData,
request.nftMetadata,
request.ipMetadata,
request.recipient,
],
args: [request.nftContract, request.derivData, request.ipMetadata, request.recipient],
});
return await this.wallet.writeContract(call as WriteContractParameters);
}
Expand All @@ -14258,13 +14244,7 @@ export class SpgClient extends SpgEventClient {
data: encodeFunctionData({
abi: spgAbi,
functionName: "mintAndRegisterIpAndMakeDerivative",
args: [
request.nftContract,
request.derivData,
request.nftMetadata,
request.ipMetadata,
request.recipient,
],
args: [request.nftContract, request.derivData, request.ipMetadata, request.recipient],
}),
};
}
Expand All @@ -14287,7 +14267,6 @@ export class SpgClient extends SpgEventClient {
request.nftContract,
request.licenseTokenIds,
request.royaltyContext,
request.nftMetadata,
request.ipMetadata,
request.recipient,
],
Expand All @@ -14313,7 +14292,6 @@ export class SpgClient extends SpgEventClient {
request.nftContract,
request.licenseTokenIds,
request.royaltyContext,
request.nftMetadata,
request.ipMetadata,
request.recipient,
],
Expand Down
Loading

0 comments on commit cedf6f4

Please sign in to comment.