diff --git a/website/pages/en/developing/assemblyscript-api.mdx b/website/pages/en/developing/assemblyscript-api.mdx index 787a1350f676..ab298a9284cd 100644 --- a/website/pages/en/developing/assemblyscript-api.mdx +++ b/website/pages/en/developing/assemblyscript-api.mdx @@ -462,7 +462,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