diff --git a/.github/workflows/deploy-subgraph-to-mainnet.yaml b/.github/workflows/deploy-subgraph-to-mainnet.yaml index f05f4c6c2..94924a7d0 100644 --- a/.github/workflows/deploy-subgraph-to-mainnet.yaml +++ b/.github/workflows/deploy-subgraph-to-mainnet.yaml @@ -22,7 +22,12 @@ jobs: # fix for EndBug/add-and-commit repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} - + + - name: Read version from package.json and set version variables + run: | + VER=$(grep version packages/subgraph/package.json | cut -d ':' -f 2 | cut -d '"' -f 2) + echo "VERSION=$VER" >> $GITHUB_ENV + - name: Setup NodeJS uses: actions/setup-node@v3 with: @@ -39,10 +44,12 @@ jobs: - name: Deploy subgraph env: - SUBGRAPH_ACCESS_TOKEN: ${{ secrets.SUBGRAPH_ACCESS_TOKEN }} - SUBGRAPH_ENVIRONMENT: ${{ vars.SUBGRAPH_ENVIRONMENT }} # eonian-bsc-development or eonian-bsc-staging + VERSION: ${{ env.VERSION }} + SUBGRAPH_DEPLOY_KEY: ${{ secrets.SUBGRAPH_DEPLOY_KEY }} + SUBGRAPH_ENVIRONMENT: ${{ vars.SUBGRAPH_ENVIRONMENT }} # eonian-sepolia-testnet # Use warapper for yarn deploy command to highlight step failure run: |- cd packages/subgraph - output=$(yarn graph deploy --product hosted-service eonian-core/$SUBGRAPH_ENVIRONMENT ./deploy/environments/$SUBGRAPH_ENVIRONMENT.yaml --access-token $SUBGRAPH_ACCESS_TOKEN 2>&1); echo "$output"; if echo "$output" | grep -q "UNCAUGHT EXCEPTION"; then exit 1; fi - + output=$(yarn graph deploy --studio $SUBGRAPH_ENVIRONMENT ./deploy/environments/$SUBGRAPH_ENVIRONMENT.yaml --version-label=$VERSION --deploy-key $SUBGRAPH_DEPLOY_KEY 2>&1); echo "$output"; if echo "$output" | grep -q "UNCAUGHT EXCEPTION"; then exit 1; fi + + \ No newline at end of file diff --git a/.github/workflows/generate-subgraph.yaml b/.github/workflows/generate-subgraph.yaml new file mode 100644 index 000000000..af0664196 --- /dev/null +++ b/.github/workflows/generate-subgraph.yaml @@ -0,0 +1,84 @@ +name: Generate Subgraphs + +on: + pull_request: + branches: + - development + types: + - opened + - labeled + paths: + - "packages/subgraph/**" + +jobs: + generate: + name: Generate Schemas and Configs + runs-on: ubuntu-latest + environment: preview + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + # fix for EndBug/add-and-commit + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + + - name: Resolve bump label + id: bump + uses: zwaldowski/match-label-action@v1 + with: + allowed: major,minor,patch + + - name: Read version from package.json and set version variables + run: | + VER=$(grep version packages/subgraph/package.json | cut -d ':' -f 2 | cut -d '"' -f 2) + echo "VERSION=$VER" >> $GITHUB_ENV + + - name: Generate new version + id: next_version + uses: leovs09/semver-release-action@v3 + with: + version: ${{ env.VERSION }} + bump: ${{ steps.bump.outputs.match }} + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Save new version in package.json + run: |- + cd packages/subgraph + sed -i -E 's/"version": "(.*)",/"version": "${{ steps.next_version.outputs.version }}",/g' package.json + + - name: Setup NodeJS + uses: actions/setup-node@v3 + with: + node-version: "20" + cache: "yarn" + + - name: Install dependencies + run: yarn --ignore-scripts + + # TODO: split schema and code generation from version bump. Currently impossuble due to github commit limitations in jobs + - name: Generate subgraph environments configurations + run: |- + cd packages/subgraph + yarn gen:configs + + # TODO: add step that load contracts ABIs before generating schema + + - name: Generate subgraph schema code + run: |- + cd packages/subgraph + yarn gen:code + + - name: Build subgraph + run: |- + cd packages/subgraph + yarn build + + - name: Commit and push changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: '[skip ci] Generate subgraph configs and schema' + fetch: --no-tags --recurse-submodules=no # Prevent failure due to submodules + pull: '--rebase --autostash' \ No newline at end of file diff --git a/packages/subgraph/abis/VaultImplementation.json b/packages/subgraph/abis/VaultImplementation.json index fde77dce7..53d043234 100644 --- a/packages/subgraph/abis/VaultImplementation.json +++ b/packages/subgraph/abis/VaultImplementation.json @@ -51,6 +51,21 @@ "name": "FalsePositiveReport", "type": "error" }, + { + "inputs": [], + "name": "GivenAssetsResultIsZeroShares", + "type": "error" + }, + { + "inputs": [], + "name": "GivenReceiverIsZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "GivenSharesResultIsZeroAssets", + "type": "error" + }, { "inputs": [], "name": "InappropriateStrategy", @@ -99,6 +114,21 @@ "name": "ListsDoNotMatch", "type": "error" }, + { + "inputs": [], + "name": "LossIsGreaterThanDebt", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughAssetsForPayment", + "type": "error" + }, + { + "inputs": [], + "name": "StrategiesLenderMustBeOwned", + "type": "error" + }, { "inputs": [], "name": "StrategyAlreadyExists", @@ -109,6 +139,11 @@ "name": "StrategyNotFound", "type": "error" }, + { + "inputs": [], + "name": "TransferFromTriggeredNotByBorrower", + "type": "error" + }, { "inputs": [], "name": "UnexpectedZeroAddress", @@ -190,6 +225,31 @@ "name": "BeaconUpgraded", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDebt", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalDebt", + "type": "uint256" + } + ], + "name": "BorrowerDebtChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -233,6 +293,37 @@ "name": "BorrowerDebtManagementReported", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDebtRatio", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalDebtRatio", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "loss", + "type": "uint256" + } + ], + "name": "BorrowerDebtRatioChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -573,6 +664,37 @@ "name": "Upgraded", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requiredAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawnAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "loss", + "type": "uint256" + } + ], + "name": "WinthdrawnFromStrategy", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -908,6 +1030,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + } + ], + "name": "currentDebtRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "debtRatio", @@ -991,21 +1132,40 @@ "type": "function" }, { - "inputs": [], - "name": "fundAssets", - "outputs": [ + "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], + "name": "depositHooks", + "outputs": [ + { + "internalType": "contract IVaultHook", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "getQueueSize", + "name": "founders", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "foundersFee", "outputs": [ { "internalType": "uint256", @@ -1017,14 +1177,21 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "fundAssets", + "outputs": [ { - "internalType": "address", - "name": "borrower", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "getUtilisationRate", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getQueueSize", "outputs": [ { "internalType": "uint256", @@ -1084,6 +1251,11 @@ "internalType": "address[]", "name": "_defaultOperators", "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_foundersFee", + "type": "uint256" } ], "name": "initialize", @@ -1754,6 +1926,24 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowerDebtRatio", + "type": "uint256" + } + ], + "name": "setBorrowerDebtRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1770,12 +1960,12 @@ { "inputs": [ { - "internalType": "uint256", - "name": "rate", - "type": "uint256" + "internalType": "address", + "name": "_founders", + "type": "address" } ], - "name": "setLockedProfitReleaseRate", + "name": "setFounders", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1784,11 +1974,11 @@ "inputs": [ { "internalType": "uint256", - "name": "_managementFee", + "name": "_foundersFee", "type": "uint256" } ], - "name": "setManagementFee", + "name": "setFoundersFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1796,52 +1986,40 @@ { "inputs": [ { - "internalType": "address", - "name": "_rewards", - "type": "address" + "internalType": "uint256", + "name": "rate", + "type": "uint256" } ], - "name": "setRewards", + "name": "setLockedProfitReleaseRate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "strategy", - "type": "address" - } - ], - "name": "strategyDebt", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "_managementFee", "type": "uint256" } ], - "stateMutability": "view", + "name": "setManagementFee", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "strategy", + "name": "_rewards", "type": "address" } ], - "name": "strategyRatio", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "name": "setRewards", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -1962,6 +2140,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IVaultHook", + "name": "hook", + "type": "address" + } + ], + "name": "unregisterLifecycleHook", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1993,6 +2190,25 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "version", @@ -2054,6 +2270,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "withdrawHooks", + "outputs": [ + { + "internalType": "contract IVaultHook", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { diff --git a/packages/subgraph/generated/BTCB Vault/Vault.ts b/packages/subgraph/generated/BTCB Vault/Vault.ts index af35f57e6..6ab201335 100644 --- a/packages/subgraph/generated/BTCB Vault/Vault.ts +++ b/packages/subgraph/generated/BTCB Vault/Vault.ts @@ -98,6 +98,32 @@ export class BeaconUpgraded__Params { } } +export class BorrowerDebtChanged extends ethereum.Event { + get params(): BorrowerDebtChanged__Params { + return new BorrowerDebtChanged__Params(this); + } +} + +export class BorrowerDebtChanged__Params { + _event: BorrowerDebtChanged; + + constructor(event: BorrowerDebtChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebt(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebt(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } +} + export class BorrowerDebtManagementReported extends ethereum.Event { get params(): BorrowerDebtManagementReported__Params { return new BorrowerDebtManagementReported__Params(this); @@ -136,6 +162,36 @@ export class BorrowerDebtManagementReported__Params { } } +export class BorrowerDebtRatioChanged extends ethereum.Event { + get params(): BorrowerDebtRatioChanged__Params { + return new BorrowerDebtRatioChanged__Params(this); + } +} + +export class BorrowerDebtRatioChanged__Params { + _event: BorrowerDebtRatioChanged; + + constructor(event: BorrowerDebtRatioChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebtRatio(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebtRatio(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Burned extends ethereum.Event { get params(): Burned__Params { return new Burned__Params(this); @@ -512,6 +568,36 @@ export class Upgraded__Params { } } +export class WinthdrawnFromStrategy extends ethereum.Event { + get params(): WinthdrawnFromStrategy__Params { + return new WinthdrawnFromStrategy__Params(this); + } +} + +export class WinthdrawnFromStrategy__Params { + _event: WinthdrawnFromStrategy; + + constructor(event: WinthdrawnFromStrategy) { + this._event = event; + } + + get strategy(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get requiredAmount(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get withdrawnAmount(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Withdraw extends ethereum.Event { get params(): Withdraw__Params { return new Withdraw__Params(this); @@ -899,6 +985,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + currentDebtRatio1(borrower: Address): BigInt { + let result = super.call( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_currentDebtRatio1(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + debtRatio(): BigInt { let result = super.call("debtRatio", "debtRatio():(uint256)", []); @@ -996,14 +1105,50 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - fundAssets(): BigInt { - let result = super.call("fundAssets", "fundAssets():(uint256)", []); + depositHooks(param0: BigInt): Address { + let result = super.call("depositHooks", "depositHooks(uint256):(address)", [ + ethereum.Value.fromUnsignedBigInt(param0) + ]); + + return result[0].toAddress(); + } + + try_depositHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "depositHooks", + "depositHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + founders(): Address { + let result = super.call("founders", "founders():(address)", []); + + return result[0].toAddress(); + } + + try_founders(): ethereum.CallResult
{ + let result = super.tryCall("founders", "founders():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + foundersFee(): BigInt { + let result = super.call("foundersFee", "foundersFee():(uint256)", []); return result[0].toBigInt(); } - try_fundAssets(): ethereum.CallResult { - let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); + try_foundersFee(): ethereum.CallResult { + let result = super.tryCall("foundersFee", "foundersFee():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1011,14 +1156,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getQueueSize(): BigInt { - let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); + fundAssets(): BigInt { + let result = super.call("fundAssets", "fundAssets():(uint256)", []); return result[0].toBigInt(); } - try_getQueueSize(): ethereum.CallResult { - let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); + try_fundAssets(): ethereum.CallResult { + let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1026,22 +1171,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getUtilisationRate(borrower: Address): BigInt { - let result = super.call( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + getQueueSize(): BigInt { + let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); return result[0].toBigInt(); } - try_getUtilisationRate(borrower: Address): ethereum.CallResult { - let result = super.tryCall( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + try_getQueueSize(): ethereum.CallResult { + let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1649,50 +1786,6 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } - strategyDebt(strategy: Address): BigInt { - let result = super.call("strategyDebt", "strategyDebt(address):(uint256)", [ - ethereum.Value.fromAddress(strategy) - ]); - - return result[0].toBigInt(); - } - - try_strategyDebt(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyDebt", - "strategyDebt(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - strategyRatio(strategy: Address): BigInt { - let result = super.call( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - - return result[0].toBigInt(); - } - - try_strategyRatio(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - symbol(): string { let result = super.call("symbol", "symbol():(string)", []); @@ -1812,6 +1905,52 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBoolean()); } + unregisterLifecycleHook(hook: Address): boolean { + let result = super.call( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + + return result[0].toBoolean(); + } + + try_unregisterLifecycleHook(hook: Address): ethereum.CallResult { + let result = super.tryCall( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + + utilizationRate(borrower: Address): BigInt { + let result = super.call( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_utilizationRate(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + version(): string { let result = super.call("version", "version():(string)", []); @@ -1881,6 +2020,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + withdrawHooks(param0: BigInt): Address { + let result = super.call( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + + return result[0].toAddress(); + } + + try_withdrawHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + withdrawalQueue(param0: BigInt): Address { let result = super.call( "withdrawalQueue", @@ -2217,6 +2379,10 @@ export class InitializeCall__Inputs { get _defaultOperators(): Array
{ return this._call.inputValues[6].value.toAddressArray(); } + + get _foundersFee(): BigInt { + return this._call.inputValues[7].value.toBigInt(); + } } export class InitializeCall__Outputs { @@ -2719,6 +2885,40 @@ export class SendCall__Outputs { } } +export class SetBorrowerDebtRatioCall extends ethereum.Call { + get inputs(): SetBorrowerDebtRatioCall__Inputs { + return new SetBorrowerDebtRatioCall__Inputs(this); + } + + get outputs(): SetBorrowerDebtRatioCall__Outputs { + return new SetBorrowerDebtRatioCall__Outputs(this); + } +} + +export class SetBorrowerDebtRatioCall__Inputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } + + get borrower(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get borrowerDebtRatio(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class SetBorrowerDebtRatioCall__Outputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } +} + export class SetEmergencyShutdownCall extends ethereum.Call { get inputs(): SetEmergencyShutdownCall__Inputs { return new SetEmergencyShutdownCall__Inputs(this); @@ -2749,6 +2949,66 @@ export class SetEmergencyShutdownCall__Outputs { } } +export class SetFoundersCall extends ethereum.Call { + get inputs(): SetFoundersCall__Inputs { + return new SetFoundersCall__Inputs(this); + } + + get outputs(): SetFoundersCall__Outputs { + return new SetFoundersCall__Outputs(this); + } +} + +export class SetFoundersCall__Inputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } + + get _founders(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class SetFoundersCall__Outputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } +} + +export class SetFoundersFeeCall extends ethereum.Call { + get inputs(): SetFoundersFeeCall__Inputs { + return new SetFoundersFeeCall__Inputs(this); + } + + get outputs(): SetFoundersFeeCall__Outputs { + return new SetFoundersFeeCall__Outputs(this); + } +} + +export class SetFoundersFeeCall__Inputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } + + get _foundersFee(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class SetFoundersFeeCall__Outputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } +} + export class SetLockedProfitReleaseRateCall extends ethereum.Call { get inputs(): SetLockedProfitReleaseRateCall__Inputs { return new SetLockedProfitReleaseRateCall__Inputs(this); @@ -2949,6 +3209,40 @@ export class TransferOwnershipCall__Outputs { } } +export class UnregisterLifecycleHookCall extends ethereum.Call { + get inputs(): UnregisterLifecycleHookCall__Inputs { + return new UnregisterLifecycleHookCall__Inputs(this); + } + + get outputs(): UnregisterLifecycleHookCall__Outputs { + return new UnregisterLifecycleHookCall__Outputs(this); + } +} + +export class UnregisterLifecycleHookCall__Inputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get hook(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class UnregisterLifecycleHookCall__Outputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get value0(): boolean { + return this._call.outputValues[0].value.toBoolean(); + } +} + export class UpgradeToCall extends ethereum.Call { get inputs(): UpgradeToCall__Inputs { return new UpgradeToCall__Inputs(this); diff --git a/packages/subgraph/generated/USDC Vault/Vault.ts b/packages/subgraph/generated/USDC Vault/Vault.ts index af35f57e6..6ab201335 100644 --- a/packages/subgraph/generated/USDC Vault/Vault.ts +++ b/packages/subgraph/generated/USDC Vault/Vault.ts @@ -98,6 +98,32 @@ export class BeaconUpgraded__Params { } } +export class BorrowerDebtChanged extends ethereum.Event { + get params(): BorrowerDebtChanged__Params { + return new BorrowerDebtChanged__Params(this); + } +} + +export class BorrowerDebtChanged__Params { + _event: BorrowerDebtChanged; + + constructor(event: BorrowerDebtChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebt(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebt(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } +} + export class BorrowerDebtManagementReported extends ethereum.Event { get params(): BorrowerDebtManagementReported__Params { return new BorrowerDebtManagementReported__Params(this); @@ -136,6 +162,36 @@ export class BorrowerDebtManagementReported__Params { } } +export class BorrowerDebtRatioChanged extends ethereum.Event { + get params(): BorrowerDebtRatioChanged__Params { + return new BorrowerDebtRatioChanged__Params(this); + } +} + +export class BorrowerDebtRatioChanged__Params { + _event: BorrowerDebtRatioChanged; + + constructor(event: BorrowerDebtRatioChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebtRatio(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebtRatio(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Burned extends ethereum.Event { get params(): Burned__Params { return new Burned__Params(this); @@ -512,6 +568,36 @@ export class Upgraded__Params { } } +export class WinthdrawnFromStrategy extends ethereum.Event { + get params(): WinthdrawnFromStrategy__Params { + return new WinthdrawnFromStrategy__Params(this); + } +} + +export class WinthdrawnFromStrategy__Params { + _event: WinthdrawnFromStrategy; + + constructor(event: WinthdrawnFromStrategy) { + this._event = event; + } + + get strategy(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get requiredAmount(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get withdrawnAmount(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Withdraw extends ethereum.Event { get params(): Withdraw__Params { return new Withdraw__Params(this); @@ -899,6 +985,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + currentDebtRatio1(borrower: Address): BigInt { + let result = super.call( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_currentDebtRatio1(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + debtRatio(): BigInt { let result = super.call("debtRatio", "debtRatio():(uint256)", []); @@ -996,14 +1105,50 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - fundAssets(): BigInt { - let result = super.call("fundAssets", "fundAssets():(uint256)", []); + depositHooks(param0: BigInt): Address { + let result = super.call("depositHooks", "depositHooks(uint256):(address)", [ + ethereum.Value.fromUnsignedBigInt(param0) + ]); + + return result[0].toAddress(); + } + + try_depositHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "depositHooks", + "depositHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + founders(): Address { + let result = super.call("founders", "founders():(address)", []); + + return result[0].toAddress(); + } + + try_founders(): ethereum.CallResult
{ + let result = super.tryCall("founders", "founders():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + foundersFee(): BigInt { + let result = super.call("foundersFee", "foundersFee():(uint256)", []); return result[0].toBigInt(); } - try_fundAssets(): ethereum.CallResult { - let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); + try_foundersFee(): ethereum.CallResult { + let result = super.tryCall("foundersFee", "foundersFee():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1011,14 +1156,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getQueueSize(): BigInt { - let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); + fundAssets(): BigInt { + let result = super.call("fundAssets", "fundAssets():(uint256)", []); return result[0].toBigInt(); } - try_getQueueSize(): ethereum.CallResult { - let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); + try_fundAssets(): ethereum.CallResult { + let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1026,22 +1171,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getUtilisationRate(borrower: Address): BigInt { - let result = super.call( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + getQueueSize(): BigInt { + let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); return result[0].toBigInt(); } - try_getUtilisationRate(borrower: Address): ethereum.CallResult { - let result = super.tryCall( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + try_getQueueSize(): ethereum.CallResult { + let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1649,50 +1786,6 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } - strategyDebt(strategy: Address): BigInt { - let result = super.call("strategyDebt", "strategyDebt(address):(uint256)", [ - ethereum.Value.fromAddress(strategy) - ]); - - return result[0].toBigInt(); - } - - try_strategyDebt(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyDebt", - "strategyDebt(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - strategyRatio(strategy: Address): BigInt { - let result = super.call( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - - return result[0].toBigInt(); - } - - try_strategyRatio(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - symbol(): string { let result = super.call("symbol", "symbol():(string)", []); @@ -1812,6 +1905,52 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBoolean()); } + unregisterLifecycleHook(hook: Address): boolean { + let result = super.call( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + + return result[0].toBoolean(); + } + + try_unregisterLifecycleHook(hook: Address): ethereum.CallResult { + let result = super.tryCall( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + + utilizationRate(borrower: Address): BigInt { + let result = super.call( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_utilizationRate(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + version(): string { let result = super.call("version", "version():(string)", []); @@ -1881,6 +2020,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + withdrawHooks(param0: BigInt): Address { + let result = super.call( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + + return result[0].toAddress(); + } + + try_withdrawHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + withdrawalQueue(param0: BigInt): Address { let result = super.call( "withdrawalQueue", @@ -2217,6 +2379,10 @@ export class InitializeCall__Inputs { get _defaultOperators(): Array
{ return this._call.inputValues[6].value.toAddressArray(); } + + get _foundersFee(): BigInt { + return this._call.inputValues[7].value.toBigInt(); + } } export class InitializeCall__Outputs { @@ -2719,6 +2885,40 @@ export class SendCall__Outputs { } } +export class SetBorrowerDebtRatioCall extends ethereum.Call { + get inputs(): SetBorrowerDebtRatioCall__Inputs { + return new SetBorrowerDebtRatioCall__Inputs(this); + } + + get outputs(): SetBorrowerDebtRatioCall__Outputs { + return new SetBorrowerDebtRatioCall__Outputs(this); + } +} + +export class SetBorrowerDebtRatioCall__Inputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } + + get borrower(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get borrowerDebtRatio(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class SetBorrowerDebtRatioCall__Outputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } +} + export class SetEmergencyShutdownCall extends ethereum.Call { get inputs(): SetEmergencyShutdownCall__Inputs { return new SetEmergencyShutdownCall__Inputs(this); @@ -2749,6 +2949,66 @@ export class SetEmergencyShutdownCall__Outputs { } } +export class SetFoundersCall extends ethereum.Call { + get inputs(): SetFoundersCall__Inputs { + return new SetFoundersCall__Inputs(this); + } + + get outputs(): SetFoundersCall__Outputs { + return new SetFoundersCall__Outputs(this); + } +} + +export class SetFoundersCall__Inputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } + + get _founders(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class SetFoundersCall__Outputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } +} + +export class SetFoundersFeeCall extends ethereum.Call { + get inputs(): SetFoundersFeeCall__Inputs { + return new SetFoundersFeeCall__Inputs(this); + } + + get outputs(): SetFoundersFeeCall__Outputs { + return new SetFoundersFeeCall__Outputs(this); + } +} + +export class SetFoundersFeeCall__Inputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } + + get _foundersFee(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class SetFoundersFeeCall__Outputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } +} + export class SetLockedProfitReleaseRateCall extends ethereum.Call { get inputs(): SetLockedProfitReleaseRateCall__Inputs { return new SetLockedProfitReleaseRateCall__Inputs(this); @@ -2949,6 +3209,40 @@ export class TransferOwnershipCall__Outputs { } } +export class UnregisterLifecycleHookCall extends ethereum.Call { + get inputs(): UnregisterLifecycleHookCall__Inputs { + return new UnregisterLifecycleHookCall__Inputs(this); + } + + get outputs(): UnregisterLifecycleHookCall__Outputs { + return new UnregisterLifecycleHookCall__Outputs(this); + } +} + +export class UnregisterLifecycleHookCall__Inputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get hook(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class UnregisterLifecycleHookCall__Outputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get value0(): boolean { + return this._call.outputValues[0].value.toBoolean(); + } +} + export class UpgradeToCall extends ethereum.Call { get inputs(): UpgradeToCall__Inputs { return new UpgradeToCall__Inputs(this); diff --git a/packages/subgraph/generated/USDT Vault/Vault.ts b/packages/subgraph/generated/USDT Vault/Vault.ts index af35f57e6..6ab201335 100644 --- a/packages/subgraph/generated/USDT Vault/Vault.ts +++ b/packages/subgraph/generated/USDT Vault/Vault.ts @@ -98,6 +98,32 @@ export class BeaconUpgraded__Params { } } +export class BorrowerDebtChanged extends ethereum.Event { + get params(): BorrowerDebtChanged__Params { + return new BorrowerDebtChanged__Params(this); + } +} + +export class BorrowerDebtChanged__Params { + _event: BorrowerDebtChanged; + + constructor(event: BorrowerDebtChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebt(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebt(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } +} + export class BorrowerDebtManagementReported extends ethereum.Event { get params(): BorrowerDebtManagementReported__Params { return new BorrowerDebtManagementReported__Params(this); @@ -136,6 +162,36 @@ export class BorrowerDebtManagementReported__Params { } } +export class BorrowerDebtRatioChanged extends ethereum.Event { + get params(): BorrowerDebtRatioChanged__Params { + return new BorrowerDebtRatioChanged__Params(this); + } +} + +export class BorrowerDebtRatioChanged__Params { + _event: BorrowerDebtRatioChanged; + + constructor(event: BorrowerDebtRatioChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebtRatio(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebtRatio(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Burned extends ethereum.Event { get params(): Burned__Params { return new Burned__Params(this); @@ -512,6 +568,36 @@ export class Upgraded__Params { } } +export class WinthdrawnFromStrategy extends ethereum.Event { + get params(): WinthdrawnFromStrategy__Params { + return new WinthdrawnFromStrategy__Params(this); + } +} + +export class WinthdrawnFromStrategy__Params { + _event: WinthdrawnFromStrategy; + + constructor(event: WinthdrawnFromStrategy) { + this._event = event; + } + + get strategy(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get requiredAmount(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get withdrawnAmount(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Withdraw extends ethereum.Event { get params(): Withdraw__Params { return new Withdraw__Params(this); @@ -899,6 +985,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + currentDebtRatio1(borrower: Address): BigInt { + let result = super.call( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_currentDebtRatio1(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + debtRatio(): BigInt { let result = super.call("debtRatio", "debtRatio():(uint256)", []); @@ -996,14 +1105,50 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - fundAssets(): BigInt { - let result = super.call("fundAssets", "fundAssets():(uint256)", []); + depositHooks(param0: BigInt): Address { + let result = super.call("depositHooks", "depositHooks(uint256):(address)", [ + ethereum.Value.fromUnsignedBigInt(param0) + ]); + + return result[0].toAddress(); + } + + try_depositHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "depositHooks", + "depositHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + founders(): Address { + let result = super.call("founders", "founders():(address)", []); + + return result[0].toAddress(); + } + + try_founders(): ethereum.CallResult
{ + let result = super.tryCall("founders", "founders():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + foundersFee(): BigInt { + let result = super.call("foundersFee", "foundersFee():(uint256)", []); return result[0].toBigInt(); } - try_fundAssets(): ethereum.CallResult { - let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); + try_foundersFee(): ethereum.CallResult { + let result = super.tryCall("foundersFee", "foundersFee():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1011,14 +1156,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getQueueSize(): BigInt { - let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); + fundAssets(): BigInt { + let result = super.call("fundAssets", "fundAssets():(uint256)", []); return result[0].toBigInt(); } - try_getQueueSize(): ethereum.CallResult { - let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); + try_fundAssets(): ethereum.CallResult { + let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1026,22 +1171,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getUtilisationRate(borrower: Address): BigInt { - let result = super.call( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + getQueueSize(): BigInt { + let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); return result[0].toBigInt(); } - try_getUtilisationRate(borrower: Address): ethereum.CallResult { - let result = super.tryCall( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + try_getQueueSize(): ethereum.CallResult { + let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1649,50 +1786,6 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } - strategyDebt(strategy: Address): BigInt { - let result = super.call("strategyDebt", "strategyDebt(address):(uint256)", [ - ethereum.Value.fromAddress(strategy) - ]); - - return result[0].toBigInt(); - } - - try_strategyDebt(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyDebt", - "strategyDebt(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - strategyRatio(strategy: Address): BigInt { - let result = super.call( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - - return result[0].toBigInt(); - } - - try_strategyRatio(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - symbol(): string { let result = super.call("symbol", "symbol():(string)", []); @@ -1812,6 +1905,52 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBoolean()); } + unregisterLifecycleHook(hook: Address): boolean { + let result = super.call( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + + return result[0].toBoolean(); + } + + try_unregisterLifecycleHook(hook: Address): ethereum.CallResult { + let result = super.tryCall( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + + utilizationRate(borrower: Address): BigInt { + let result = super.call( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_utilizationRate(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + version(): string { let result = super.call("version", "version():(string)", []); @@ -1881,6 +2020,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + withdrawHooks(param0: BigInt): Address { + let result = super.call( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + + return result[0].toAddress(); + } + + try_withdrawHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + withdrawalQueue(param0: BigInt): Address { let result = super.call( "withdrawalQueue", @@ -2217,6 +2379,10 @@ export class InitializeCall__Inputs { get _defaultOperators(): Array
{ return this._call.inputValues[6].value.toAddressArray(); } + + get _foundersFee(): BigInt { + return this._call.inputValues[7].value.toBigInt(); + } } export class InitializeCall__Outputs { @@ -2719,6 +2885,40 @@ export class SendCall__Outputs { } } +export class SetBorrowerDebtRatioCall extends ethereum.Call { + get inputs(): SetBorrowerDebtRatioCall__Inputs { + return new SetBorrowerDebtRatioCall__Inputs(this); + } + + get outputs(): SetBorrowerDebtRatioCall__Outputs { + return new SetBorrowerDebtRatioCall__Outputs(this); + } +} + +export class SetBorrowerDebtRatioCall__Inputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } + + get borrower(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get borrowerDebtRatio(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class SetBorrowerDebtRatioCall__Outputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } +} + export class SetEmergencyShutdownCall extends ethereum.Call { get inputs(): SetEmergencyShutdownCall__Inputs { return new SetEmergencyShutdownCall__Inputs(this); @@ -2749,6 +2949,66 @@ export class SetEmergencyShutdownCall__Outputs { } } +export class SetFoundersCall extends ethereum.Call { + get inputs(): SetFoundersCall__Inputs { + return new SetFoundersCall__Inputs(this); + } + + get outputs(): SetFoundersCall__Outputs { + return new SetFoundersCall__Outputs(this); + } +} + +export class SetFoundersCall__Inputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } + + get _founders(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class SetFoundersCall__Outputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } +} + +export class SetFoundersFeeCall extends ethereum.Call { + get inputs(): SetFoundersFeeCall__Inputs { + return new SetFoundersFeeCall__Inputs(this); + } + + get outputs(): SetFoundersFeeCall__Outputs { + return new SetFoundersFeeCall__Outputs(this); + } +} + +export class SetFoundersFeeCall__Inputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } + + get _foundersFee(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class SetFoundersFeeCall__Outputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } +} + export class SetLockedProfitReleaseRateCall extends ethereum.Call { get inputs(): SetLockedProfitReleaseRateCall__Inputs { return new SetLockedProfitReleaseRateCall__Inputs(this); @@ -2949,6 +3209,40 @@ export class TransferOwnershipCall__Outputs { } } +export class UnregisterLifecycleHookCall extends ethereum.Call { + get inputs(): UnregisterLifecycleHookCall__Inputs { + return new UnregisterLifecycleHookCall__Inputs(this); + } + + get outputs(): UnregisterLifecycleHookCall__Outputs { + return new UnregisterLifecycleHookCall__Outputs(this); + } +} + +export class UnregisterLifecycleHookCall__Inputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get hook(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class UnregisterLifecycleHookCall__Outputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get value0(): boolean { + return this._call.outputValues[0].value.toBoolean(); + } +} + export class UpgradeToCall extends ethereum.Call { get inputs(): UpgradeToCall__Inputs { return new UpgradeToCall__Inputs(this); diff --git a/packages/subgraph/generated/WETH Vault/Vault.ts b/packages/subgraph/generated/WETH Vault/Vault.ts index af35f57e6..6ab201335 100644 --- a/packages/subgraph/generated/WETH Vault/Vault.ts +++ b/packages/subgraph/generated/WETH Vault/Vault.ts @@ -98,6 +98,32 @@ export class BeaconUpgraded__Params { } } +export class BorrowerDebtChanged extends ethereum.Event { + get params(): BorrowerDebtChanged__Params { + return new BorrowerDebtChanged__Params(this); + } +} + +export class BorrowerDebtChanged__Params { + _event: BorrowerDebtChanged; + + constructor(event: BorrowerDebtChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebt(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebt(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } +} + export class BorrowerDebtManagementReported extends ethereum.Event { get params(): BorrowerDebtManagementReported__Params { return new BorrowerDebtManagementReported__Params(this); @@ -136,6 +162,36 @@ export class BorrowerDebtManagementReported__Params { } } +export class BorrowerDebtRatioChanged extends ethereum.Event { + get params(): BorrowerDebtRatioChanged__Params { + return new BorrowerDebtRatioChanged__Params(this); + } +} + +export class BorrowerDebtRatioChanged__Params { + _event: BorrowerDebtRatioChanged; + + constructor(event: BorrowerDebtRatioChanged) { + this._event = event; + } + + get borrower(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get newDebtRatio(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get newTotalDebtRatio(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Burned extends ethereum.Event { get params(): Burned__Params { return new Burned__Params(this); @@ -512,6 +568,36 @@ export class Upgraded__Params { } } +export class WinthdrawnFromStrategy extends ethereum.Event { + get params(): WinthdrawnFromStrategy__Params { + return new WinthdrawnFromStrategy__Params(this); + } +} + +export class WinthdrawnFromStrategy__Params { + _event: WinthdrawnFromStrategy; + + constructor(event: WinthdrawnFromStrategy) { + this._event = event; + } + + get strategy(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get requiredAmount(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get withdrawnAmount(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get loss(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + export class Withdraw extends ethereum.Event { get params(): Withdraw__Params { return new Withdraw__Params(this); @@ -899,6 +985,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + currentDebtRatio1(borrower: Address): BigInt { + let result = super.call( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_currentDebtRatio1(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "currentDebtRatio", + "currentDebtRatio(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + debtRatio(): BigInt { let result = super.call("debtRatio", "debtRatio():(uint256)", []); @@ -996,14 +1105,50 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - fundAssets(): BigInt { - let result = super.call("fundAssets", "fundAssets():(uint256)", []); + depositHooks(param0: BigInt): Address { + let result = super.call("depositHooks", "depositHooks(uint256):(address)", [ + ethereum.Value.fromUnsignedBigInt(param0) + ]); + + return result[0].toAddress(); + } + + try_depositHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "depositHooks", + "depositHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + founders(): Address { + let result = super.call("founders", "founders():(address)", []); + + return result[0].toAddress(); + } + + try_founders(): ethereum.CallResult
{ + let result = super.tryCall("founders", "founders():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + foundersFee(): BigInt { + let result = super.call("foundersFee", "foundersFee():(uint256)", []); return result[0].toBigInt(); } - try_fundAssets(): ethereum.CallResult { - let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); + try_foundersFee(): ethereum.CallResult { + let result = super.tryCall("foundersFee", "foundersFee():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1011,14 +1156,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getQueueSize(): BigInt { - let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); + fundAssets(): BigInt { + let result = super.call("fundAssets", "fundAssets():(uint256)", []); return result[0].toBigInt(); } - try_getQueueSize(): ethereum.CallResult { - let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); + try_fundAssets(): ethereum.CallResult { + let result = super.tryCall("fundAssets", "fundAssets():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1026,22 +1171,14 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - getUtilisationRate(borrower: Address): BigInt { - let result = super.call( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + getQueueSize(): BigInt { + let result = super.call("getQueueSize", "getQueueSize():(uint256)", []); return result[0].toBigInt(); } - try_getUtilisationRate(borrower: Address): ethereum.CallResult { - let result = super.tryCall( - "getUtilisationRate", - "getUtilisationRate(address):(uint256)", - [ethereum.Value.fromAddress(borrower)] - ); + try_getQueueSize(): ethereum.CallResult { + let result = super.tryCall("getQueueSize", "getQueueSize():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } @@ -1649,50 +1786,6 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } - strategyDebt(strategy: Address): BigInt { - let result = super.call("strategyDebt", "strategyDebt(address):(uint256)", [ - ethereum.Value.fromAddress(strategy) - ]); - - return result[0].toBigInt(); - } - - try_strategyDebt(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyDebt", - "strategyDebt(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - strategyRatio(strategy: Address): BigInt { - let result = super.call( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - - return result[0].toBigInt(); - } - - try_strategyRatio(strategy: Address): ethereum.CallResult { - let result = super.tryCall( - "strategyRatio", - "strategyRatio(address):(uint256)", - [ethereum.Value.fromAddress(strategy)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - symbol(): string { let result = super.call("symbol", "symbol():(string)", []); @@ -1812,6 +1905,52 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBoolean()); } + unregisterLifecycleHook(hook: Address): boolean { + let result = super.call( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + + return result[0].toBoolean(); + } + + try_unregisterLifecycleHook(hook: Address): ethereum.CallResult { + let result = super.tryCall( + "unregisterLifecycleHook", + "unregisterLifecycleHook(address):(bool)", + [ethereum.Value.fromAddress(hook)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + + utilizationRate(borrower: Address): BigInt { + let result = super.call( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + + return result[0].toBigInt(); + } + + try_utilizationRate(borrower: Address): ethereum.CallResult { + let result = super.tryCall( + "utilizationRate", + "utilizationRate(address):(uint256)", + [ethereum.Value.fromAddress(borrower)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + version(): string { let result = super.call("version", "version():(string)", []); @@ -1881,6 +2020,29 @@ export class Vault extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + withdrawHooks(param0: BigInt): Address { + let result = super.call( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + + return result[0].toAddress(); + } + + try_withdrawHooks(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "withdrawHooks", + "withdrawHooks(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + withdrawalQueue(param0: BigInt): Address { let result = super.call( "withdrawalQueue", @@ -2217,6 +2379,10 @@ export class InitializeCall__Inputs { get _defaultOperators(): Array
{ return this._call.inputValues[6].value.toAddressArray(); } + + get _foundersFee(): BigInt { + return this._call.inputValues[7].value.toBigInt(); + } } export class InitializeCall__Outputs { @@ -2719,6 +2885,40 @@ export class SendCall__Outputs { } } +export class SetBorrowerDebtRatioCall extends ethereum.Call { + get inputs(): SetBorrowerDebtRatioCall__Inputs { + return new SetBorrowerDebtRatioCall__Inputs(this); + } + + get outputs(): SetBorrowerDebtRatioCall__Outputs { + return new SetBorrowerDebtRatioCall__Outputs(this); + } +} + +export class SetBorrowerDebtRatioCall__Inputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } + + get borrower(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get borrowerDebtRatio(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class SetBorrowerDebtRatioCall__Outputs { + _call: SetBorrowerDebtRatioCall; + + constructor(call: SetBorrowerDebtRatioCall) { + this._call = call; + } +} + export class SetEmergencyShutdownCall extends ethereum.Call { get inputs(): SetEmergencyShutdownCall__Inputs { return new SetEmergencyShutdownCall__Inputs(this); @@ -2749,6 +2949,66 @@ export class SetEmergencyShutdownCall__Outputs { } } +export class SetFoundersCall extends ethereum.Call { + get inputs(): SetFoundersCall__Inputs { + return new SetFoundersCall__Inputs(this); + } + + get outputs(): SetFoundersCall__Outputs { + return new SetFoundersCall__Outputs(this); + } +} + +export class SetFoundersCall__Inputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } + + get _founders(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class SetFoundersCall__Outputs { + _call: SetFoundersCall; + + constructor(call: SetFoundersCall) { + this._call = call; + } +} + +export class SetFoundersFeeCall extends ethereum.Call { + get inputs(): SetFoundersFeeCall__Inputs { + return new SetFoundersFeeCall__Inputs(this); + } + + get outputs(): SetFoundersFeeCall__Outputs { + return new SetFoundersFeeCall__Outputs(this); + } +} + +export class SetFoundersFeeCall__Inputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } + + get _foundersFee(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class SetFoundersFeeCall__Outputs { + _call: SetFoundersFeeCall; + + constructor(call: SetFoundersFeeCall) { + this._call = call; + } +} + export class SetLockedProfitReleaseRateCall extends ethereum.Call { get inputs(): SetLockedProfitReleaseRateCall__Inputs { return new SetLockedProfitReleaseRateCall__Inputs(this); @@ -2949,6 +3209,40 @@ export class TransferOwnershipCall__Outputs { } } +export class UnregisterLifecycleHookCall extends ethereum.Call { + get inputs(): UnregisterLifecycleHookCall__Inputs { + return new UnregisterLifecycleHookCall__Inputs(this); + } + + get outputs(): UnregisterLifecycleHookCall__Outputs { + return new UnregisterLifecycleHookCall__Outputs(this); + } +} + +export class UnregisterLifecycleHookCall__Inputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get hook(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class UnregisterLifecycleHookCall__Outputs { + _call: UnregisterLifecycleHookCall; + + constructor(call: UnregisterLifecycleHookCall) { + this._call = call; + } + + get value0(): boolean { + return this._call.outputValues[0].value.toBoolean(); + } +} + export class UpgradeToCall extends ethereum.Call { get inputs(): UpgradeToCall__Inputs { return new UpgradeToCall__Inputs(this); diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 79a386b44..e78bca4b3 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,8 +1,7 @@ { "name": "@eonian/subgraph", - "version": "0.23.0", + "version": "0.23.1", "scripts": { - "gen:code": "graph codegen ./deploy/environments/eonian-sepolia-testnet.yaml", "dev": "graph codegen ./deploy/environments/eonian-sepolia-testnet.yaml --watch", "build": "graph build ./deploy/environments/eonian-sepolia-testnet.yaml", "deploy:studio": "export VERSION=$(jq -r .version package.json) && graph deploy --studio eonian-sepolia-testnet ./deploy/environments/eonian-sepolia-testnet.yaml --version-label=$VERSION", @@ -19,7 +18,8 @@ "test:docker": "graph test -d", "test:watch": "nodemon", "lint": "eslint . --ext .ts --fix", - "gen:configs": "node bin/generate-yaml-configs.js ./deploy ./deploy/environments" + "gen:configs": "node bin/generate-yaml-configs.js ./deploy ./deploy/environments", + "gen:code": "graph codegen ./deploy/environments/eonian-bsc-development.yaml" }, "dependencies": { "@graphprotocol/graph-cli": "0.51.0",