From 0d12a5c719549e8a04a0142cf46f35c5bdc42277 Mon Sep 17 00:00:00 2001 From: ak Date: Tue, 6 May 2025 19:28:45 +0300 Subject: [PATCH 1/6] add staking-abi link pr#289 --- website/src/pages/en/indexing/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/indexing/overview.mdx b/website/src/pages/en/indexing/overview.mdx index 8a35d638be7c..61e668d6d0e1 100644 --- a/website/src/pages/en/indexing/overview.mdx +++ b/website/src/pages/en/indexing/overview.mdx @@ -772,7 +772,7 @@ Once an Indexer has staked GRT in the protocol, the [Indexer components](/indexi 1. Open the [Remix app](https://remix.ethereum.org/) in a browser -2. In the `File Explorer` create a file named **Staking.abi** with the staking ABI. +2. In the `File Explorer` create a file named **Staking.abi** with the [staking ABI](https://raw.githubusercontent.com/graphprotocol/contracts/mainnet-deploy-build/build/abis/Staking.json). 3. With `Staking.abi` selected and open in the editor, switch to the `Deploy and run transactions` section in the Remix interface. From e8a9f4c520a85de519b5af23a381aff829a77d58 Mon Sep 17 00:00:00 2001 From: ak Date: Tue, 6 May 2025 19:51:42 +0300 Subject: [PATCH 2/6] add youtube link pr#489 --- .../src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx index c36983307869..560af0373c34 100644 --- a/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx @@ -660,6 +660,8 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` + + ### IPFS API ```typescript From ade4910d4c37fa9d4ecd13878a7934775a8262eb Mon Sep 17 00:00:00 2001 From: ak Date: Tue, 6 May 2025 20:01:38 +0300 Subject: [PATCH 3/6] pr-515 --- .../src/pages/en/archived/arbitrum/l2-transfer-tools-faq.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/archived/arbitrum/l2-transfer-tools-faq.mdx b/website/src/pages/en/archived/arbitrum/l2-transfer-tools-faq.mdx index 27ebaeb8405a..3d5e72d7c713 100644 --- a/website/src/pages/en/archived/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/src/pages/en/archived/arbitrum/l2-transfer-tools-faq.mdx @@ -116,7 +116,9 @@ To transfer your delegation, you will need to complete the following steps: ### What happens to my rewards if I initiate a transfer with an open allocation on Ethereum mainnet? -If the Indexer to whom you're delegating is still operating on L1, when you transfer to Arbitrum you will forfeit any delegation rewards from open allocations on Ethereum mainnet. This means that you will lose the rewards from, at most, the last 28-day period. If you time the transfer right after the Indexer has closed allocations you can make sure this is the least amount possible. If you have a communication channel with your Indexer(s), consider discussing with them to find the best time to do your transfer. +If the Indexer to whom you're delegating has started transferring stake to L2 but is still operating on L1, when you transfer to Arbitrum you will forfeit any delegation rewards from open allocations on Ethereum mainnet. This means that you will lose the rewards from, at most, the last 28-day period. If you time the transfer right after the Indexer has closed allocations you can make sure this is the least amount possible. If you have a communication channel with your Indexer(s), consider discussing with them to find the best time to do your transfer. Other than this, your unrealized rewards will be transferred to L2 with the delegation. + +If the Indexer has transferred all their stake to L2, they will not have open allocations on L1 and therefore all your rewards will be transferred to L2 with the delegation transfer. ### What happens if the Indexer I currently delegate to isn't on Arbitrum One? From dbc69e5a72ae1a4deeb7bb09f41626202820c8a0 Mon Sep 17 00:00:00 2001 From: ak Date: Wed, 7 May 2025 15:16:23 +0300 Subject: [PATCH 4/6] pr#340 --- .../developing/creating/graph-ts/api.mdx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx index 560af0373c34..a259a11f6d0b 100644 --- a/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx @@ -500,7 +500,24 @@ export function handleTransfer(event: TransferEvent) { As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. -Any other contract that is part of the Subgraph can be imported from the generated code and can be bound to a valid address. +Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. Example of that is presented within the steps below: + +- extend `subgraph.yaml` file with desired ABI file: + +```yaml +mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Gravatar + abis: + - name: Gravity + file: ./abis/Gravity.json + - name: OtherContract + file: ./abis/OtherContract.json +``` +- import and bind to the contract using its address. #### Handling Reverted Calls From 351a084eb9971c22f80c3ed6df192d0ae350a2fa Mon Sep 17 00:00:00 2001 From: ak Date: Wed, 7 May 2025 15:21:48 +0300 Subject: [PATCH 5/6] pr543 --- .../en/subgraphs/developing/creating/subgraph-manifest.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx b/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx index 7273c0a30fc9..725f9d1d5af4 100644 --- a/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx @@ -452,6 +452,8 @@ let tradingPair = context.getString('tradingPair') There are setters and getters like `setString` and `getString` for all value types. +> **Note:** Referecing an entity is done via ID in graphQL. That id can be passed into the instantiated data source by setting it in the context and then accessed within the mapping of the template. Example can be found in the [documenation of graph-ts](https://github.com/graphprotocol/graph-tooling/tree/main/packages/ts#api). + ## Start Blocks The `startBlock` is an optional setting that allows you to define from which block in the chain the data source will start indexing. Setting the start block allows the data source to skip potentially millions of blocks that are irrelevant. Typically, a Subgraph developer will set `startBlock` to the block in which the smart contract of the data source was created. From dd5d277f77503d96544e349311f14a0c72d3c31f Mon Sep 17 00:00:00 2001 From: ak Date: Wed, 7 May 2025 15:24:06 +0300 Subject: [PATCH 6/6] format --- .../src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx index a259a11f6d0b..fa8e3be3d59a 100644 --- a/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx @@ -517,6 +517,7 @@ mapping: - name: OtherContract file: ./abis/OtherContract.json ``` + - import and bind to the contract using its address. #### Handling Reverted Calls