From b5870c820123956d5ccd11be5795a6f02986e93c Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 10 Dec 2024 23:14:30 +0700 Subject: [PATCH 01/12] add operation codes --- packages/sdk-core/src/BatchCall.ts | 2 ++ packages/sdk-core/src/Operation.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/sdk-core/src/BatchCall.ts b/packages/sdk-core/src/BatchCall.ts index b5c85e3a7a..db2f965b7a 100644 --- a/packages/sdk-core/src/BatchCall.ts +++ b/packages/sdk-core/src/BatchCall.ts @@ -30,6 +30,8 @@ export const batchOperationTypeStringToTypeMap = new Map< ["SUPERTOKEN_DOWNGRADE", 102], ["SUPERFLUID_CALL_AGREEMENT", 201], ["CALL_APP_ACTION", 202], + ["SIMPLE_FORWARD_CALL", 301], + ["ERC2771_FORWARD_CALL", 302], ]); /** diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index ca91f60140..7ea113b8d0 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -20,7 +20,9 @@ export type BatchOperationType = | "SUPERTOKEN_UPGRADE" // 101 | "SUPERTOKEN_DOWNGRADE" // 102 | "SUPERFLUID_CALL_AGREEMENT" // 201 - | "CALL_APP_ACTION"; // 202 + | "CALL_APP_ACTION" // 202 + | "SIMPLE_FORWARD_CALL" // 301 + | "ERC2771_FORWARD_CALL"; // 302 /** * Operation Helper Class From 4eaf411ff78b2f467f79f4b1acceac499f1ca641 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 10 Dec 2024 23:19:24 +0700 Subject: [PATCH 02/12] convert to structs --- packages/sdk-core/src/Operation.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index 7ea113b8d0..156ef0811d 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -170,7 +170,11 @@ export default class Operation { } // Handles Superfluid.callAppAction - if (this.type === "CALL_APP_ACTION") { + if ( + this.type === "CALL_APP_ACTION" || + this.type === "SIMPLE_FORWARD_CALL" || + this.type === "ERC2771_FORWARD_CALL" + ) { const functionArgs = getCallDataFunctionArgs( Superfluid__factory.abi, populatedTransaction.data From 62bc3a01df36f2776530d0448326b11eec3aab5d Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Wed, 11 Dec 2024 14:20:45 +0700 Subject: [PATCH 03/12] simplify operation handling --- packages/sdk-core/src/Operation.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index 156ef0811d..a597e36b01 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -170,11 +170,7 @@ export default class Operation { } // Handles Superfluid.callAppAction - if ( - this.type === "CALL_APP_ACTION" || - this.type === "SIMPLE_FORWARD_CALL" || - this.type === "ERC2771_FORWARD_CALL" - ) { + if (this.type === "CALL_APP_ACTION") { const functionArgs = getCallDataFunctionArgs( Superfluid__factory.abi, populatedTransaction.data @@ -187,7 +183,16 @@ export default class Operation { }; } - // Handles remaining ERC20/ERC777/SuperToken Operations + if (this.type === "SIMPLE_FORWARD_CALL" || this.type === "ERC2771_FORWARD_CALL") { + // TODO: Should sighash be removed here? + return { + operationType: batchOperationType, + target: populatedTransaction.to, + data: populatedTransaction.data, + }; + } + + // Handles remaining ERC20/ERC777/SuperToken Operations (including SIMPLE_FORWARD_CALL and ERC2771_FORWARD_CALL) return { operationType: batchOperationType, target: populatedTransaction.to, From dad0a8ecb635fa1888cd9572a0d6bb7a4ebc26d5 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Wed, 11 Dec 2024 14:21:31 +0700 Subject: [PATCH 04/12] simplify operation handling --- packages/sdk-core/src/Operation.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index a597e36b01..7c8108b6f8 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -183,7 +183,10 @@ export default class Operation { }; } - if (this.type === "SIMPLE_FORWARD_CALL" || this.type === "ERC2771_FORWARD_CALL") { + if ( + this.type === "SIMPLE_FORWARD_CALL" || + this.type === "ERC2771_FORWARD_CALL" + ) { // TODO: Should sighash be removed here? return { operationType: batchOperationType, From d0cdfcc28a06732bcfc9843ed0970b2933c88b00 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Wed, 11 Dec 2024 14:29:49 +0700 Subject: [PATCH 05/12] simplify operation handling --- packages/sdk-core/src/Operation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index 7c8108b6f8..e9888139dc 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -184,7 +184,7 @@ export default class Operation { } if ( - this.type === "SIMPLE_FORWARD_CALL" || + this.type === "SIMPLE_FORWARD_CALL" || this.type === "ERC2771_FORWARD_CALL" ) { // TODO: Should sighash be removed here? From 5521e060e47276258972afc54e27bc8818f51283 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Thu, 12 Dec 2024 18:25:22 +0700 Subject: [PATCH 06/12] make test pass --- packages/sdk-core/src/Operation.ts | 1 - packages/sdk-core/test/2_operation.test.ts | 49 +++++++++++++++++++++- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index e9888139dc..066ac582f4 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -187,7 +187,6 @@ export default class Operation { this.type === "SIMPLE_FORWARD_CALL" || this.type === "ERC2771_FORWARD_CALL" ) { - // TODO: Should sighash be removed here? return { operationType: batchOperationType, target: populatedTransaction.to, diff --git a/packages/sdk-core/test/2_operation.test.ts b/packages/sdk-core/test/2_operation.test.ts index 94d800ade2..18b47e3aba 100644 --- a/packages/sdk-core/test/2_operation.test.ts +++ b/packages/sdk-core/test/2_operation.test.ts @@ -2,14 +2,14 @@ import { expect } from "chai"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { Framework } from "../src/index"; import { getPerSecondFlowRateByMonth } from "../src"; -import { IConstantFlowAgreementV1__factory } from "../src/typechain-types"; +import { ERC20, ERC20__factory, IConstantFlowAgreementV1__factory, TestToken, TestToken__factory } from "../src/typechain-types"; import Operation from "../src/Operation"; import hre from "hardhat"; import { SuperAppTester } from "../typechain-types"; import { SuperAppTester__factory } from "../typechain-types"; const cfaInterface = IConstantFlowAgreementV1__factory.createInterface(); import { TestEnvironment, makeSuite } from "./TestEnvironment"; -import { ethers } from "ethers"; +import { BigNumber, Contract, ethers } from "ethers"; import multiplyGasLimit from "../src/multiplyGasLimit"; /** @@ -209,6 +209,51 @@ makeSuite("Operation Tests", (testEnv: TestEnvironment) => { } }); + it("Should be able to execute SimpleForwarder operation from framework.", async () => { + const contract = (new Contract( + testEnv.wrapperSuperToken.underlyingToken.address, + TestToken__factory.abi + ) as TestToken).connect(testEnv.alice); + + const beforeBalance = await contract.balanceOf(testEnv.alice.address); + + const txn1 = contract + .populateTransaction.mint( + testEnv.alice.address, + "100" + ); + const txn2 = contract + .populateTransaction.mint( + testEnv.alice.address, + "200" + ); + + const operation1 = testEnv.sdkFramework.operation( + txn1, + "SIMPLE_FORWARD_CALL" + ); + const operation2 = testEnv.sdkFramework.operation( + txn2, + "SIMPLE_FORWARD_CALL" + ); + + const batchCall = testEnv.sdkFramework.batchCall( + [ + operation1, + operation2 + ] + ); + + const txResponse = await batchCall.exec(testEnv.alice); + const txReceipt = await txResponse.wait(); + expect(txReceipt.status).to.equal(1); + + const afterBalance = await contract.balanceOf(testEnv.alice.address); + + expect(beforeBalance.lt(afterBalance)).to.be.true; + expect(afterBalance.sub(BigNumber.from(300)).eq(beforeBalance)).to.be.true; + }); + context( "Should be able to get and execute a signed transaction", async () => { From c888d18b7c170917e9807ac021d76ea72f750cf0 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Thu, 12 Dec 2024 18:25:52 +0700 Subject: [PATCH 07/12] add git to nix flakes --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index a49a5fb1d2..471be65563 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ # test utilities lcov actionlint + git ]; # solidity dev inputs From f2f8f55b7b673a4e2163e8a317d7fcca4d279e7d Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Fri, 13 Dec 2024 16:57:46 +0700 Subject: [PATCH 08/12] forward ETH value --- packages/sdk-core/src/BatchCall.ts | 26 ++++- packages/sdk-core/src/Operation.ts | 4 + packages/sdk-core/test/2_operation.test.ts | 76 +++++-------- packages/sdk-core/test/3_batch_call.test.ts | 115 +++++++++++++++++++- 4 files changed, 168 insertions(+), 53 deletions(-) diff --git a/packages/sdk-core/src/BatchCall.ts b/packages/sdk-core/src/BatchCall.ts index db2f965b7a..ac52a87cae 100644 --- a/packages/sdk-core/src/BatchCall.ts +++ b/packages/sdk-core/src/BatchCall.ts @@ -1,5 +1,5 @@ import { JsonFragment } from "@ethersproject/abi"; -import { ethers } from "ethers"; +import { BigNumber, ethers } from "ethers"; import Host from "./Host"; import Operation, { BatchOperationType } from "./Operation"; @@ -15,6 +15,7 @@ export interface OperationStruct { readonly operationType: number; readonly target: string; readonly data: string; + readonly value?: ethers.BigNumber; } export const batchOperationTypeStringToTypeMap = new Map< @@ -91,10 +92,25 @@ export default class BatchCall { const operationStructArray = await Promise.all( this.getOperationStructArrayPromises ); - const tx = - this.host.contract.populateTransaction.batchCall( - operationStructArray - ); + + const values = operationStructArray + .filter((x) => x.value?.gt(BigNumber.from(0))) + .map((x) => x.value); + + if (values.length > 1) { + throw new SFError({ + type: "BATCH_CALL_ERROR", + message: + "There are multiple values in the batch call. The value can only be forwarded to one receiving operation.", + }); + } + + const tx = this.host.contract.populateTransaction.batchCall( + operationStructArray, + { + value: values?.length > 0 ? values[0] : undefined, + } + ); return new Operation(tx, "UNSUPPORTED"); } diff --git a/packages/sdk-core/src/Operation.ts b/packages/sdk-core/src/Operation.ts index 066ac582f4..87302d4d87 100644 --- a/packages/sdk-core/src/Operation.ts +++ b/packages/sdk-core/src/Operation.ts @@ -166,6 +166,7 @@ export default class Operation { operationType: batchOperationType, target: functionArgs["agreementClass"], data, + value: populatedTransaction.value, }; } @@ -180,6 +181,7 @@ export default class Operation { operationType: batchOperationType, target: functionArgs["app"], data: functionArgs["callData"], + value: populatedTransaction.value, }; } @@ -191,6 +193,7 @@ export default class Operation { operationType: batchOperationType, target: populatedTransaction.to, data: populatedTransaction.data, + value: populatedTransaction.value, }; } @@ -199,6 +202,7 @@ export default class Operation { operationType: batchOperationType, target: populatedTransaction.to, data: removeSigHashFromCallData(populatedTransaction.data), + value: populatedTransaction.value, }; }; } diff --git a/packages/sdk-core/test/2_operation.test.ts b/packages/sdk-core/test/2_operation.test.ts index 18b47e3aba..e3d383987b 100644 --- a/packages/sdk-core/test/2_operation.test.ts +++ b/packages/sdk-core/test/2_operation.test.ts @@ -2,14 +2,14 @@ import { expect } from "chai"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { Framework } from "../src/index"; import { getPerSecondFlowRateByMonth } from "../src"; -import { ERC20, ERC20__factory, IConstantFlowAgreementV1__factory, TestToken, TestToken__factory } from "../src/typechain-types"; +import { IConstantFlowAgreementV1__factory } from "../src/typechain-types"; import Operation from "../src/Operation"; import hre from "hardhat"; import { SuperAppTester } from "../typechain-types"; import { SuperAppTester__factory } from "../typechain-types"; const cfaInterface = IConstantFlowAgreementV1__factory.createInterface(); import { TestEnvironment, makeSuite } from "./TestEnvironment"; -import { BigNumber, Contract, ethers } from "ethers"; +import { BigNumber, ethers } from "ethers"; import multiplyGasLimit from "../src/multiplyGasLimit"; /** @@ -174,6 +174,33 @@ makeSuite("Operation Tests", (testEnv: TestEnvironment) => { expect(txn.gasLimit).to.equal("500000"); }); + it("Should move ETH value passed from the Overrides", async () => { + const value = BigNumber.from(Number(0.1e18).toString()); + + const beforeBalanceAlice = await testEnv.alice.getBalance(); + const beforeBalanceBob = await testEnv.bob.getBalance(); + + expect(beforeBalanceAlice.gt(value)).to.be.true; + + const operation = testEnv.sdkFramework.operation( + testEnv.alice.populateTransaction({ + to: testEnv.bob.address, + value + }) as Promise, + "SIMPLE_FORWARD_CALL" + ); + + const txn = await operation.exec(testEnv.alice, 2); + const txReceipt = await txn.wait(); + expect(txReceipt.status).to.equal(1); + + const afterBalanceAlice = await testEnv.alice.getBalance(); + const afterBalanceBob = await testEnv.bob.getBalance(); + + expect(afterBalanceBob.sub(beforeBalanceBob)).to.equal(value); + expect(beforeBalanceAlice.sub(afterBalanceAlice).gte(value)).to.be.true; + }); + it("Should throw an error when trying to execute a transaction with faulty callData", async () => { const callData = cfaInterface.encodeFunctionData("createFlow", [ testEnv.wrapperSuperToken.address, @@ -209,51 +236,6 @@ makeSuite("Operation Tests", (testEnv: TestEnvironment) => { } }); - it("Should be able to execute SimpleForwarder operation from framework.", async () => { - const contract = (new Contract( - testEnv.wrapperSuperToken.underlyingToken.address, - TestToken__factory.abi - ) as TestToken).connect(testEnv.alice); - - const beforeBalance = await contract.balanceOf(testEnv.alice.address); - - const txn1 = contract - .populateTransaction.mint( - testEnv.alice.address, - "100" - ); - const txn2 = contract - .populateTransaction.mint( - testEnv.alice.address, - "200" - ); - - const operation1 = testEnv.sdkFramework.operation( - txn1, - "SIMPLE_FORWARD_CALL" - ); - const operation2 = testEnv.sdkFramework.operation( - txn2, - "SIMPLE_FORWARD_CALL" - ); - - const batchCall = testEnv.sdkFramework.batchCall( - [ - operation1, - operation2 - ] - ); - - const txResponse = await batchCall.exec(testEnv.alice); - const txReceipt = await txResponse.wait(); - expect(txReceipt.status).to.equal(1); - - const afterBalance = await contract.balanceOf(testEnv.alice.address); - - expect(beforeBalance.lt(afterBalance)).to.be.true; - expect(afterBalance.sub(BigNumber.from(300)).eq(beforeBalance)).to.be.true; - }); - context( "Should be able to get and execute a signed transaction", async () => { diff --git a/packages/sdk-core/test/3_batch_call.test.ts b/packages/sdk-core/test/3_batch_call.test.ts index 740a063061..e62c46a3e1 100644 --- a/packages/sdk-core/test/3_batch_call.test.ts +++ b/packages/sdk-core/test/3_batch_call.test.ts @@ -2,10 +2,12 @@ import { expect } from "chai"; import { AUTHORIZE_FULL_CONTROL, Operation, + TestToken, + TestToken__factory, getPerSecondFlowRateByMonth, toBN, } from "../src"; -import { ethers } from "ethers"; +import { BigNumber, Contract, ethers } from "ethers"; import { createCallAppActionOperation } from "./2_operation.test"; import { TestEnvironment, makeSuite } from "./TestEnvironment"; @@ -408,4 +410,115 @@ makeSuite("Batch Call Tests", (testEnv: TestEnvironment) => { "0" ); }); + + + it("Should be able to execute SimpleForwarder batch call", async () => { + const contract = (new Contract( + testEnv.wrapperSuperToken.underlyingToken.address, + TestToken__factory.abi + ) as TestToken).connect(testEnv.alice); + + const beforeBalance = await contract.balanceOf(testEnv.alice.address); + + const txn1 = contract + .populateTransaction.mint( + testEnv.alice.address, + "100" + ); + const txn2 = contract + .populateTransaction.mint( + testEnv.alice.address, + "200" + ); + + const operation1 = testEnv.sdkFramework.operation( + txn1, + "SIMPLE_FORWARD_CALL" + ); + const operation2 = testEnv.sdkFramework.operation( + txn2, + "SIMPLE_FORWARD_CALL" + ); + + const batchCall = testEnv.sdkFramework.batchCall( + [ + operation1, + operation2 + ] + ); + + const txResponse = await batchCall.exec(testEnv.alice); + const txReceipt = await txResponse.wait(); + expect(txReceipt.status).to.equal(1); + + const afterBalance = await contract.balanceOf(testEnv.alice.address); + + expect(beforeBalance.lt(afterBalance)).to.be.true; + expect(afterBalance.sub(BigNumber.from(300)).eq(beforeBalance)).to.be.true; + }); + + it("Should be able to move ETH value", async () => { + const value = BigNumber.from(Number(0.1e18).toString()); + + const beforeBalanceAlice = await testEnv.alice.getBalance(); + const beforeBalanceBob = await testEnv.bob.getBalance(); + + expect(beforeBalanceAlice.gt(value)).to.be.true; + + const operation = testEnv.sdkFramework.operation( + testEnv.alice.populateTransaction({ + to: testEnv.bob.address, + value, + data: "0x" + }) as Promise, + "SIMPLE_FORWARD_CALL" + ); + + const batchCall = testEnv.sdkFramework.batchCall( + [ + operation + ] + ); + + const txn = await batchCall.exec(testEnv.alice, 2); + + const txReceipt = await txn.wait(); + expect(txReceipt.status).to.equal(1); + + const afterBalanceAlice = await testEnv.alice.getBalance(); + const afterBalanceBob = await testEnv.bob.getBalance(); + + expect(afterBalanceBob.sub(beforeBalanceBob)).to.equal(value); + expect(beforeBalanceAlice.sub(afterBalanceAlice).gte(value)).to.be.true; + }); + + it.only("Should throw an error when multiple Operations with ETH value", async () => { + const operation1 = testEnv.sdkFramework.operation( + testEnv.alice.populateTransaction({ + to: testEnv.bob.address, + value: BigNumber.from(Number(0.1e18).toString()), + data: "0x" + }) as Promise, + "SIMPLE_FORWARD_CALL" + ); + + const operation2 = testEnv.sdkFramework.operation( + testEnv.alice.populateTransaction({ + to: testEnv.bob.address, + value: BigNumber.from(Number(0.2e18).toString()), + data: "0x" + }) as Promise, + "SIMPLE_FORWARD_CALL" + ); + + const batchCall = testEnv.sdkFramework.batchCall( + [ + operation1, + operation2 + ] + ); + + await expect(batchCall.exec(testEnv.alice, 2)) + .to.be.rejectedWith("multiple values in the batch call"); + }); }); From 89fc62d4dac6ab1dbeec4ad89191059adcd5b45c Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Fri, 13 Dec 2024 17:02:10 +0700 Subject: [PATCH 09/12] remove .only --- packages/sdk-core/test/3_batch_call.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk-core/test/3_batch_call.test.ts b/packages/sdk-core/test/3_batch_call.test.ts index e62c46a3e1..eb521b5dbc 100644 --- a/packages/sdk-core/test/3_batch_call.test.ts +++ b/packages/sdk-core/test/3_batch_call.test.ts @@ -492,7 +492,7 @@ makeSuite("Batch Call Tests", (testEnv: TestEnvironment) => { expect(beforeBalanceAlice.sub(afterBalanceAlice).gte(value)).to.be.true; }); - it.only("Should throw an error when multiple Operations with ETH value", async () => { + it("Should throw an error when multiple Operations with ETH value", async () => { const operation1 = testEnv.sdkFramework.operation( testEnv.alice.populateTransaction({ to: testEnv.bob.address, From 798fdeb65d3b7dc3075ec6287a7588a3805f94e7 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Fri, 13 Dec 2024 19:21:33 +0700 Subject: [PATCH 10/12] bump versions --- packages/sdk-core/CHANGELOG.md | 6 ++++++ packages/sdk-core/package.json | 4 ++-- packages/subgraph/package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/sdk-core/CHANGELOG.md b/packages/sdk-core/CHANGELOG.md index 256e301e42..4d45bb3fcc 100644 --- a/packages/sdk-core/CHANGELOG.md +++ b/packages/sdk-core/CHANGELOG.md @@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed ### Fixed +## [0.9.0] - 2024-12-13 + +### Added +- Handle new Operation types with BatchCall +- Forward ETH value with BatchCall and Operation + ## [0.8.0] - 2024-08-01 ### Breaking diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 0ddafbdba4..e0459c6815 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -1,12 +1,12 @@ { "name": "@superfluid-finance/sdk-core", "description": "SDK Core for building with Superfluid Protocol", - "version": "0.8.0", + "version": "0.9.0", "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "dependencies": { "@superfluid-finance/ethereum-contracts": "1.12.0", "@superfluid-finance/metadata": "^1.5.2", - "browserify": "17.0.0", + "browserify": "17.0.1", "graphql-request": "6.1.0", "lodash": "4.17.21", "tsify": "5.0.4" diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 7902cee2de..9ae9af6f61 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -5,7 +5,7 @@ "dependencies": { "@graphprotocol/graph-cli": "0.80.1", "@graphprotocol/graph-ts": "0.35.1", - "@superfluid-finance/sdk-core": "0.8.0", + "@superfluid-finance/sdk-core": "0.9.0", "mustache": "4.2.0" }, "devDependencies": { From ce85127376196cf1067f4ac9ec7afeb2c2e297ce Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Fri, 13 Dec 2024 19:29:46 +0700 Subject: [PATCH 11/12] update yarn.lock --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index b0787bf07c..c9c650e8b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6446,10 +6446,10 @@ browserify-zlib@~0.2.0: dependencies: pako "~1.0.5" -browserify@17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-17.0.0.tgz#4c48fed6c02bfa2b51fd3b670fddb805723cdc22" - integrity sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w== +browserify@17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/browserify/-/browserify-17.0.1.tgz#d822fa701431ca94cb405b033bb2551951e5d97d" + integrity sha512-pxhT00W3ylMhCHwG5yfqtZjNnFuX5h2IJdaBfSo4ChaaBsIp9VLrEMQ1bHV+Xr1uLPXuNDDM1GlJkjli0qkRsw== dependencies: JSONStream "^1.0.3" assert "^1.4.0" @@ -6468,7 +6468,7 @@ browserify@17.0.0: duplexer2 "~0.1.2" events "^3.0.0" glob "^7.1.0" - has "^1.0.0" + hasown "^2.0.0" htmlescape "^1.1.0" https-browserify "^1.0.0" inherits "~2.0.1" @@ -11083,7 +11083,7 @@ has-unicode@2.0.1: resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== -has@^1.0.0, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== From 27879a643782d042c678def76beae3605ec163eb Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Fri, 13 Dec 2024 19:50:51 +0700 Subject: [PATCH 12/12] move browserify into devDependencies --- packages/sdk-core/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index e0459c6815..518dde768c 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -6,7 +6,6 @@ "dependencies": { "@superfluid-finance/ethereum-contracts": "1.12.0", "@superfluid-finance/metadata": "^1.5.2", - "browserify": "17.0.1", "graphql-request": "6.1.0", "lodash": "4.17.21", "tsify": "5.0.4" @@ -16,6 +15,7 @@ "@graphql-codegen/near-operation-file-preset": "^3.0.0", "@graphql-typed-document-node/core": "^3.2.0", "ajv": "^8.17.1", + "browserify": "^17.0.1", "ethers": "^5.7.2", "get-graphql-schema": "^2.1.2", "mocha": "^10.7.3" diff --git a/yarn.lock b/yarn.lock index c9c650e8b5..584c5423e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6446,7 +6446,7 @@ browserify-zlib@~0.2.0: dependencies: pako "~1.0.5" -browserify@17.0.1: +browserify@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/browserify/-/browserify-17.0.1.tgz#d822fa701431ca94cb405b033bb2551951e5d97d" integrity sha512-pxhT00W3ylMhCHwG5yfqtZjNnFuX5h2IJdaBfSo4ChaaBsIp9VLrEMQ1bHV+Xr1uLPXuNDDM1GlJkjli0qkRsw==