diff --git a/carbonmark-api/package.json b/carbonmark-api/package.json index d76c97bea2..52e883beac 100644 --- a/carbonmark-api/package.json +++ b/carbonmark-api/package.json @@ -1,6 +1,6 @@ { "name": "@klimadao/carbonmark-api", - "version": "6.1.2", + "version": "6.2.0", "description": "An API for exploring Carbonmark project data, prices and activity.", "main": "app.ts", "scripts": { diff --git a/carbonmark-api/src/.generated/mocks/marketplace.mocks.ts b/carbonmark-api/src/.generated/mocks/marketplace.mocks.ts index cfed5cf00f..949e9fe33b 100644 --- a/carbonmark-api/src/.generated/mocks/marketplace.mocks.ts +++ b/carbonmark-api/src/.generated/mocks/marketplace.mocks.ts @@ -1,5 +1,5 @@ //@ts-nocheck -import { Activity, Activity_Filter, BlockChangedFilter, Block_Height, Category, Category_Filter, Country, Country_Filter, Listing, Listing_Filter, Project, Project_Filter, Purchase, Purchase_Filter, Query, Subscription, User, User_Filter, _Block_, _Meta_, ActivityType, Activity_OrderBy, Category_OrderBy, Country_OrderBy, Listing_OrderBy, OrderDirection, Project_OrderBy, Purchase_OrderBy, User_OrderBy, _SubgraphErrorPolicy_ } from '../types/marketplace.types'; +import { Activity, Activity_Filter, BlockChangedFilter, Block_Height, Category, Category_Filter, Country, Country_Filter, Listing, Listing_Filter, Project, Project_Filter, Purchase, Purchase_Filter, Query, Subscription, User, User_Filter, _Block_, _Meta_, ActivityType, Activity_OrderBy, Category_OrderBy, Country_OrderBy, Listing_OrderBy, OrderDirection, Project_OrderBy, Purchase_OrderBy, TokenStandard, User_OrderBy, _SubgraphErrorPolicy_ } from '../types/marketplace.types'; export const anActivity = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Activity => { const relationshipsToOmit: Set = new Set(_relationshipsToOmit); @@ -312,6 +312,7 @@ export const aListing = (overrides?: Partial, _relationshipsToOmit: Set singleUnitPrice: overrides && overrides.hasOwnProperty('singleUnitPrice') ? overrides.singleUnitPrice! : '100000000000000000000', tokenAddress: overrides && overrides.hasOwnProperty('tokenAddress') ? overrides.tokenAddress! : 'at', tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + tokenStandard: overrides && overrides.hasOwnProperty('tokenStandard') ? overrides.tokenStandard! : TokenStandard.Erc20, tokenSymbol: overrides && overrides.hasOwnProperty('tokenSymbol') ? overrides.tokenSymbol! : 'assumenda', totalAmountToSell: overrides && overrides.hasOwnProperty('totalAmountToSell') ? overrides.totalAmountToSell! : '100000000000000000000', updatedAt: overrides && overrides.hasOwnProperty('updatedAt') ? overrides.updatedAt! : '100000000000000000000', @@ -454,6 +455,10 @@ export const aListing_Filter = (overrides?: Partial, _relationsh tokenId_lte: overrides && overrides.hasOwnProperty('tokenId_lte') ? overrides.tokenId_lte! : '100000000000000000000', tokenId_not: overrides && overrides.hasOwnProperty('tokenId_not') ? overrides.tokenId_not! : '100000000000000000000', tokenId_not_in: overrides && overrides.hasOwnProperty('tokenId_not_in') ? overrides.tokenId_not_in! : ['100000000000000000000'], + tokenStandard: overrides && overrides.hasOwnProperty('tokenStandard') ? overrides.tokenStandard! : TokenStandard.Erc20, + tokenStandard_in: overrides && overrides.hasOwnProperty('tokenStandard_in') ? overrides.tokenStandard_in! : [TokenStandard.Erc20], + tokenStandard_not: overrides && overrides.hasOwnProperty('tokenStandard_not') ? overrides.tokenStandard_not! : TokenStandard.Erc20, + tokenStandard_not_in: overrides && overrides.hasOwnProperty('tokenStandard_not_in') ? overrides.tokenStandard_not_in! : [TokenStandard.Erc20], tokenSymbol: overrides && overrides.hasOwnProperty('tokenSymbol') ? overrides.tokenSymbol! : 'sed', tokenSymbol_contains: overrides && overrides.hasOwnProperty('tokenSymbol_contains') ? overrides.tokenSymbol_contains! : 'quo', tokenSymbol_contains_nocase: overrides && overrides.hasOwnProperty('tokenSymbol_contains_nocase') ? overrides.tokenSymbol_contains_nocase! : 'quo', diff --git a/carbonmark-api/src/.generated/types/marketplace.types.ts b/carbonmark-api/src/.generated/types/marketplace.types.ts index 461bacac7f..462a91b5e8 100644 --- a/carbonmark-api/src/.generated/types/marketplace.types.ts +++ b/carbonmark-api/src/.generated/types/marketplace.types.ts @@ -40,6 +40,7 @@ export enum ActivityType { DeletedListing = 'DeletedListing', Purchase = 'Purchase', Sold = 'Sold', + UpdatedExpiration = 'UpdatedExpiration', UpdatedPrice = 'UpdatedPrice', UpdatedQuantity = 'UpdatedQuantity' } @@ -237,6 +238,7 @@ export enum Activity_OrderBy { listing__singleUnitPrice = 'listing__singleUnitPrice', listing__tokenAddress = 'listing__tokenAddress', listing__tokenId = 'listing__tokenId', + listing__tokenStandard = 'listing__tokenStandard', listing__tokenSymbol = 'listing__tokenSymbol', listing__totalAmountToSell = 'listing__totalAmountToSell', listing__updatedAt = 'listing__updatedAt', @@ -358,6 +360,7 @@ export type Listing = { singleUnitPrice: Scalars['BigInt']; tokenAddress: Scalars['Bytes']; tokenId: Scalars['BigInt']; + tokenStandard: TokenStandard; tokenSymbol: Scalars['String']; totalAmountToSell: Scalars['BigInt']; updatedAt: Maybe; @@ -506,6 +509,10 @@ export type Listing_Filter = { tokenId_lte: InputMaybe; tokenId_not: InputMaybe; tokenId_not_in: InputMaybe>; + tokenStandard: InputMaybe; + tokenStandard_in: InputMaybe>; + tokenStandard_not: InputMaybe; + tokenStandard_not_in: InputMaybe>; tokenSymbol: InputMaybe; tokenSymbol_contains: InputMaybe; tokenSymbol_contains_nocase: InputMaybe; @@ -569,6 +576,7 @@ export enum Listing_OrderBy { singleUnitPrice = 'singleUnitPrice', tokenAddress = 'tokenAddress', tokenId = 'tokenId', + tokenStandard = 'tokenStandard', tokenSymbol = 'tokenSymbol', totalAmountToSell = 'totalAmountToSell', updatedAt = 'updatedAt' @@ -903,6 +911,7 @@ export enum Purchase_OrderBy { listing__singleUnitPrice = 'listing__singleUnitPrice', listing__tokenAddress = 'listing__tokenAddress', listing__tokenId = 'listing__tokenId', + listing__tokenStandard = 'listing__tokenStandard', listing__tokenSymbol = 'listing__tokenSymbol', listing__totalAmountToSell = 'listing__totalAmountToSell', listing__updatedAt = 'listing__updatedAt', @@ -1214,6 +1223,11 @@ export type SubscriptionUsersArgs = { where: InputMaybe; }; +export enum TokenStandard { + ERC20 = 'ERC20', + ERC1155 = 'ERC1155' +} + export type User = { __typename?: 'User'; activities: Maybe>; diff --git a/carbonmark-api/src/app.constants.ts b/carbonmark-api/src/app.constants.ts index 32aa849d7e..ae2cfaaf3a 100644 --- a/carbonmark-api/src/app.constants.ts +++ b/carbonmark-api/src/app.constants.ts @@ -12,7 +12,7 @@ const GRAPH_API_ROOT_ID = "https://api.thegraph.com/subgraphs/id"; * This is also the case for SANITY_URLS */ const POLYGON_URLS = { - marketplace: `${GRAPH_API_ROOT_ID}/QmaHkN47zUB3b1xnfeqCwatG5DRtMuitEDf9FdFkq5V3Fr`, + marketplace: `${GRAPH_API_ROOT_ID}/QmT2YkGwTqvek54VsGkfurGLrGGKgkwcK6TLotvkjpF4Mz`, assets: `${GRAPH_API_ROOT}/cujowolf/klima-refi-current-holdings`, tokens: `${GRAPH_API_ROOT}/klimadao/klimadao-pairs`, digitalCarbon: `${GRAPH_API_ROOT}/klimadao/polygon-digital-carbon`, @@ -22,7 +22,7 @@ const POLYGON_URLS = { const MUMBAI_URLS = { ...POLYGON_URLS, digitalCarbon: `${GRAPH_API_ROOT}/psparacino/digital-carbon`, - marketplace: `${GRAPH_API_ROOT_ID}/QmUUnZTeRnfsJsQaTwLeiHmAQ5xvtk2jBW7VeP3AEW5bnv`, + marketplace: `${GRAPH_API_ROOT_ID}/QmfHDvcgSLfgQVKbWnHEZw8ZCdxuvk3si1KQa66rBzexZp`, icr: `${GRAPH_API_ROOT}/skjaldbaka17/carbon-registry-test`, }; diff --git a/package-lock.json b/package-lock.json index 06c5e6bf7d..38e5fd03a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -590,7 +590,7 @@ }, "carbonmark-api": { "name": "@klimadao/carbonmark-api", - "version": "6.1.2", + "version": "6.2.0", "license": "ISC", "dependencies": { "@fastify/autoload": "^5.0.0", @@ -605,6 +605,7 @@ "@sinclair/typebox": "^0.28.5", "dotenv": "^16.1.4", "ethers": "^5.7.2", + "ethers-v6": "npm:ethers@^6.7.1", "fastify": "^4.0.0", "fastify-lcache": "^1.1.1", "fastify-plugin": "^4.5.1",