Skip to content

clean up prs/issues #946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/en/indexing/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,25 @@ 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

Expand Down Expand Up @@ -660,6 +678,8 @@ export function handleSomeEvent(event: SomeEvent): void {
}
```

<VideoEmbed title="How to Use Logging to Debug a Subgraph Mappins Error" youtube="7H3bm87u5Jw" />

### IPFS API

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading