Skip to content

Commit

Permalink
Use mintbasev2.near instead of mintbase2.near (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenmarcus authored Jul 29, 2024
1 parent f13991f commit f5c10f4
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"parserOptions": {
"project": "./tsconfig.lint.json",
"ecmaVersion": 2018,
"sourceType": "module"
"sourceType": "module",
"tsconfigRootDir": "./"
},
"plugins": [
"@typescript-eslint",
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"author": "",
"license": "MIT",
"dependencies": {
"@mintbase-js/sdk": "^0.5.2-beta.0",
"@mintbase-js/sdk": "=0.6.0-beta-prerelease.1",
"cross-fetch": "^4.0.0",
"graphql-request": "^5.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/data/src/api/dynamicNftMetadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Example usage:
import { dynamicNftMetadata } from '@mintbase-js/data'

const props = {
contractAddress: 'dynamic.mintbase2.near',
contractAddress: 'dynamic.mintbasev2.near',
internalMetadataId: 0,
isActive: true,
network: "mainnet",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import {mbjs} from "@mintbase-js/sdk";

export const dynamicNftMetadataMockActive = {
nft_metadata: [
{
metadataId: 'dynamic.mintbase2.near:deadbeef2',
metadataId: `dynamic.${mbjs.keys.mbContractV2}:deadbeef2`,
internalMetadataId: 0,
contractAddress: 'dynamic.mintbase2.near',
contractAddress: `dynamic.${mbjs.keys.mbContractV2}`,
reference: 'https://arweave.net/reference2',
referenceBlob: {
media: 'https://arweave.net/media2',
Expand All @@ -25,8 +27,8 @@ export const dynamicNftMetadataMockActive = {
export const dynamicNftMetadataMockInactive = {
nft_metadata: [
{
metadataId: 'dynamic.mintbase2.near:deadbeef0',
contractAddress: 'dynamic.mintbase2.near',
metadataId: `dynamic.${mbjs.keys.mbContractV2}:deadbeef0`,
contractAddress: `dynamic.${mbjs.keys.mbContractV2}`,
internalMetadataId: 0,
reference: 'https://arweave.net/reference0',
referenceBlob: {
Expand All @@ -36,8 +38,8 @@ export const dynamicNftMetadataMockInactive = {
isActive: false,
},
{
metadataId: 'dynamic.mintbase2.near:deadbeef1',
contractAddress: 'dynamic.mintbase2.near',
metadataId: `dynamic.${mbjs.keys.mbContractV2}:deadbeef1`,
contractAddress: `dynamic.${mbjs.keys.mbContractV2}`,
internalMetadataId: 0,
reference: 'https://arweave.net/reference1',
referenceBlob: {
Expand All @@ -52,4 +54,4 @@ export const dynamicNftMetadataMockInactive = {
count: 3,
},
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { DynamicNftMetadataResult } from './dynamicNftMetadata.types';

import { GraphQLClient } from 'graphql-request';
import { dynamicNftMetadataMockInactive, dynamicNftMetadataMockActive } from './dynamicNftMetadata.mock';
import { Network } from '@mintbase-js/sdk';
import { Network, mbjs } from '@mintbase-js/sdk';

jest.mock('graphql-request');

const props = {
contractAddress: 'dynamic.mintbase2.near',
contractAddress: `dynamic.${mbjs.keys.mbContractV2}`,
internalMetadataId: 0,
network: 'mainnet' as Network,
};
Expand Down Expand Up @@ -59,4 +59,4 @@ describe('dynamicNftMetadata', () => {
expect(call).toStrictEqual({ error: errMessage });

});
});
});
4 changes: 2 additions & 2 deletions packages/sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export enum MINTBASE_CONTRACTS {

export enum MINTBASE_CONTRACTS_V2 {
testnet = 'mintspace3.testnet',
mainnet = 'mintbase2.near',
mainnet = 'mintbasev2.near',
}

export enum GRAPHQL_ENDPOINTS {
Expand Down Expand Up @@ -524,4 +524,4 @@ export type FinalExecutionOutcome = FEO;

// utility types
export type EmptyObject = Record<string, never>
export type AnyObject = Record<string, unknown>
export type AnyObject = Record<string, unknown>

0 comments on commit f5c10f4

Please sign in to comment.