diff --git a/.gitignore b/.gitignore index 2c5d7aff8..5c16455ab 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ tsconfig.tsbuildinfo .env* !.env.sample cache +docs diff --git a/package.json b/package.json index f7c74be79..6a8e3756a 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "lefthook": "^1.6.15", "prettier": "^3.2.5", "turbo": "^2.0.0", + "typedoc": "^0.26.4", "typescript": "^5.3.3", "viem": "^2.9.9", "vite": "^5.2.13", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 3b7cf990b..274c19074 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -197,7 +197,8 @@ "bench:ci": "CI=true vitest bench", "clean": "rm -rf dist", "test": "vitest dev", - "test:ci": "CI=true vitest --coverage" + "test:ci": "CI=true vitest --coverage", + "typedoc": "typedoc" }, "devDependencies": { "@boostxyz/evm": "workspace:*" diff --git a/packages/sdk/src/BoostCore.ts b/packages/sdk/src/BoostCore.ts index 3a1e95226..fbfe006ec 100644 --- a/packages/sdk/src/BoostCore.ts +++ b/packages/sdk/src/BoostCore.ts @@ -182,7 +182,6 @@ export class BoostCore extends Deployable<[Address, Address]> { let budgetPayload: OnChainBoostPayload['budget'] = zeroAddress; if (budget.address) { budgetPayload = budget.address; - console.log(await budget.isAuthorized(coreAddress)); if (!(await budget.isAuthorized(coreAddress))) { throw new BudgetMustAuthorizeBoostCore(coreAddress); } @@ -286,8 +285,6 @@ export class BoostCore extends Deployable<[Address, Address]> { } } - console.log(incentivesPayloads); - const onChainPayload = { budget: budgetPayload, action: actionPayload, @@ -300,13 +297,6 @@ export class BoostCore extends Deployable<[Address, Address]> { owner, }; - console.log(onChainPayload); - - console.log({ - args: [prepareBoostPayload(onChainPayload)], - ...this.optionallyAttachAccount(options.account), - }); - const boostHash = await boostFactory(options.config, { args: [prepareBoostPayload(onChainPayload)], ...this.optionallyAttachAccount(options.account), diff --git a/packages/sdk/test/MockERC20.ts b/packages/sdk/test/MockERC20.ts index c9b8d0620..3e0aa2dfa 100644 --- a/packages/sdk/test/MockERC20.ts +++ b/packages/sdk/test/MockERC20.ts @@ -44,7 +44,8 @@ export class MockERC20 extends Deployable { value: bigint, params?: WriteParams, ) { - return this.awaitResult(this.mintPayableRaw(address, value, params)); + // biome-ignore lint/suspicious/noExplicitAny: this is a mock contract, it's fine + return this.awaitResult(this.mintPayableRaw(address, value, params as any)); } public async mintPayableRaw( address: Address, diff --git a/packages/sdk/typedoc.json b/packages/sdk/typedoc.json new file mode 100644 index 000000000..be1037ce0 --- /dev/null +++ b/packages/sdk/typedoc.json @@ -0,0 +1,6 @@ +{ + // Comments are supported, like tsconfig.json + "entryPoints": ["./src/index.ts"], + "exclude": ["./test", "./src/**/*.test.ts"], + "out": "docs" +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a38ec27e..25be2a3cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ importers: turbo: specifier: ^2.0.0 version: 2.0.3 + typedoc: + specifier: ^0.26.4 + version: 0.26.4(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -4612,6 +4615,12 @@ packages: tslib: 1.14.1 dev: true + /@shikijs/core@1.10.3: + resolution: {integrity: sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==} + dependencies: + '@types/hast': 3.0.4 + dev: true + /@sideway/address@4.1.5: resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} dependencies: @@ -4868,6 +4877,12 @@ packages: '@types/node': 20.12.11 dev: true + /@types/hast@3.0.4: + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /@types/istanbul-lib-coverage@2.0.6: resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -4956,6 +4971,10 @@ packages: /@types/trusted-types@2.0.7: resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + /@types/unist@3.0.2: + resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} + dev: true + /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -6974,6 +6993,11 @@ packages: strip-ansi: 6.0.1 dev: true + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: true + /env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -7991,7 +8015,7 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) + ts-node: 10.9.2(@types/node@20.12.11)(typescript@5.3.3) tsort: 0.0.1 typescript: 5.3.3 undici: 5.28.4 @@ -8851,6 +8875,12 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + dependencies: + uc.micro: 2.1.0 + dev: true + /listhen@1.7.2: resolution: {integrity: sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g==} hasBin: true @@ -9074,6 +9104,10 @@ packages: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} dev: true + /lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + dev: true + /magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} dependencies: @@ -9111,6 +9145,18 @@ packages: dependencies: tmpl: 1.0.5 + /markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + dev: true + /markdown-table@1.1.3: resolution: {integrity: sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==} dev: true @@ -9126,6 +9172,10 @@ packages: safe-buffer: 5.2.1 dev: true + /mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + dev: true + /memoize-one@5.2.1: resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==} @@ -9404,6 +9454,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -10143,6 +10200,11 @@ packages: end-of-stream: 1.4.4 once: 1.4.0 + /punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + dev: true + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} @@ -10827,6 +10889,13 @@ packages: rechoir: 0.6.2 dev: true + /shiki@1.10.3: + resolution: {integrity: sha512-eneCLncGuvPdTutJuLyUGS8QNPAVFO5Trvld2wgEq1e002mwctAhJKeMGWtWVXOIEzmlcLRqcgPSorR6AVzOmQ==} + dependencies: + '@shikijs/core': 1.10.3 + '@types/hast': 3.0.4 + dev: true + /side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -11560,6 +11629,21 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true + /typedoc@0.26.4(typescript@5.3.3): + resolution: {integrity: sha512-FlW6HpvULDKgc3rK04V+nbFyXogPV88hurarDPOjuuB5HAwuAlrCMQ5NeH7Zt68a/ikOKu6Z/0hFXAeC9xPccQ==} + engines: {node: '>= 18'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x + dependencies: + lunr: 2.3.9 + markdown-it: 14.1.0 + minimatch: 9.0.5 + shiki: 1.10.3 + typescript: 5.3.3 + yaml: 2.4.5 + dev: true + /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} @@ -11574,6 +11658,10 @@ packages: engines: {node: '>=8'} dev: true + /uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + dev: true + /ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==}