diff --git a/abis/ApeCoinToken.json b/abis/ApeCoinToken.json new file mode 100644 index 0000000..3870d3f --- /dev/null +++ b/abis/ApeCoinToken.json @@ -0,0 +1,79 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "ClearDelegate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "SetDelegate", + "type": "event" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], + "name": "clearDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "name": "delegation", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "id", "type": "bytes32" }, + { "internalType": "address", "name": "delegate", "type": "address" } + ], + "name": "setDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/build/ApeCoinToken/abis/ApeCoinToken.json b/build/ApeCoinToken/abis/ApeCoinToken.json new file mode 100644 index 0000000..6d226e9 --- /dev/null +++ b/build/ApeCoinToken/abis/ApeCoinToken.json @@ -0,0 +1,107 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "ClearDelegate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "SetDelegate", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "clearDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "delegation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "setDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/build/subgraph.yaml b/build/subgraph.yaml index e73e803..4144aca 100644 --- a/build/subgraph.yaml +++ b/build/subgraph.yaml @@ -1,4 +1,4 @@ -specVersion: 0.0.2 +specVersion: 0.0.4 schema: file: schema.graphql dataSources: @@ -11,7 +11,7 @@ dataSources: startBlock: 13533400 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -34,7 +34,7 @@ dataSources: startBlock: 12422075 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -57,7 +57,7 @@ dataSources: startBlock: 11000400 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -80,7 +80,7 @@ dataSources: startBlock: 11870113 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -103,7 +103,7 @@ dataSources: startBlock: 10861674 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -126,7 +126,7 @@ dataSources: startBlock: 11094181 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -149,7 +149,7 @@ dataSources: startBlock: 11457421 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -172,7 +172,7 @@ dataSources: startBlock: 13674957 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -195,7 +195,7 @@ dataSources: startBlock: 12141775 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -218,7 +218,7 @@ dataSources: startBlock: 11498340 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -241,7 +241,7 @@ dataSources: startBlock: 12125705 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -264,7 +264,7 @@ dataSources: startBlock: 10886913 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -287,7 +287,7 @@ dataSources: startBlock: 9601359 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -310,7 +310,7 @@ dataSources: startBlock: 10926829 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -333,7 +333,7 @@ dataSources: startBlock: 10736094 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -356,7 +356,7 @@ dataSources: startBlock: 14923678 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -379,7 +379,7 @@ dataSources: startBlock: 11332000 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -402,7 +402,7 @@ dataSources: startBlock: 12809555 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -416,3 +416,24 @@ dataSources: - event: DelegatedPowerChanged(indexed address,uint256,uint8) handler: delegateVotesChanged file: DYDXToken/DYDXToken.wasm + - kind: ethereum/contract + name: ApeCoinToken + network: mainnet + source: + address: "0x469788fE6E9E9681C6ebF3bF78e7Fd26Fc015446" + abi: ApeCoinToken + startBlock: 11225329 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Delegate + - Delegator + abis: + - name: ApeCoinToken + file: ApeCoinToken/abis/ApeCoinToken.json + eventHandlers: + - event: SetDelegate(indexed address,indexed bytes32,indexed address) + handler: setDelegateHandle + file: ApeCoinToken/ApeCoinToken.wasm diff --git a/generated/AaveToken/AaveToken.ts b/generated/AaveToken/AaveToken.ts index 194744e..4d0ef53 100644 --- a/generated/AaveToken/AaveToken.ts +++ b/generated/AaveToken/AaveToken.ts @@ -129,6 +129,14 @@ export class AaveToken___votingSnapshotsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getBlockNumber(): BigInt { + return this.value0; + } + + getValue(): BigInt { + return this.value1; + } } export class AaveToken extends ethereum.SmartContract { diff --git a/generated/AmpleforthToken/AmpleforthToken.ts b/generated/AmpleforthToken/AmpleforthToken.ts index 7f50601..a9242e5 100644 --- a/generated/AmpleforthToken/AmpleforthToken.ts +++ b/generated/AmpleforthToken/AmpleforthToken.ts @@ -151,6 +151,14 @@ export class AmpleforthToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class AmpleforthToken extends ethereum.SmartContract { diff --git a/generated/ApeCoinToken/ApeCoinToken.ts b/generated/ApeCoinToken/ApeCoinToken.ts new file mode 100644 index 0000000..2bca8ab --- /dev/null +++ b/generated/ApeCoinToken/ApeCoinToken.ts @@ -0,0 +1,162 @@ +// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { + ethereum, + JSONValue, + TypedMap, + Entity, + Bytes, + Address, + BigInt +} from "@graphprotocol/graph-ts"; + +export class ClearDelegate extends ethereum.Event { + get params(): ClearDelegate__Params { + return new ClearDelegate__Params(this); + } +} + +export class ClearDelegate__Params { + _event: ClearDelegate; + + constructor(event: ClearDelegate) { + this._event = event; + } + + get delegator(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get id(): Bytes { + return this._event.parameters[1].value.toBytes(); + } + + get delegate(): Address { + return this._event.parameters[2].value.toAddress(); + } +} + +export class SetDelegate extends ethereum.Event { + get params(): SetDelegate__Params { + return new SetDelegate__Params(this); + } +} + +export class SetDelegate__Params { + _event: SetDelegate; + + constructor(event: SetDelegate) { + this._event = event; + } + + get delegator(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get id(): Bytes { + return this._event.parameters[1].value.toBytes(); + } + + get delegate(): Address { + return this._event.parameters[2].value.toAddress(); + } +} + +export class ApeCoinToken extends ethereum.SmartContract { + static bind(address: Address): ApeCoinToken { + return new ApeCoinToken("ApeCoinToken", address); + } + + delegation(param0: Address, param1: Bytes): Address { + let result = super.call( + "delegation", + "delegation(address,bytes32):(address)", + [ + ethereum.Value.fromAddress(param0), + ethereum.Value.fromFixedBytes(param1) + ] + ); + + return result[0].toAddress(); + } + + try_delegation(param0: Address, param1: Bytes): ethereum.CallResult
{ + let result = super.tryCall( + "delegation", + "delegation(address,bytes32):(address)", + [ + ethereum.Value.fromAddress(param0), + ethereum.Value.fromFixedBytes(param1) + ] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } +} + +export class ClearDelegateCall extends ethereum.Call { + get inputs(): ClearDelegateCall__Inputs { + return new ClearDelegateCall__Inputs(this); + } + + get outputs(): ClearDelegateCall__Outputs { + return new ClearDelegateCall__Outputs(this); + } +} + +export class ClearDelegateCall__Inputs { + _call: ClearDelegateCall; + + constructor(call: ClearDelegateCall) { + this._call = call; + } + + get id(): Bytes { + return this._call.inputValues[0].value.toBytes(); + } +} + +export class ClearDelegateCall__Outputs { + _call: ClearDelegateCall; + + constructor(call: ClearDelegateCall) { + this._call = call; + } +} + +export class SetDelegateCall extends ethereum.Call { + get inputs(): SetDelegateCall__Inputs { + return new SetDelegateCall__Inputs(this); + } + + get outputs(): SetDelegateCall__Outputs { + return new SetDelegateCall__Outputs(this); + } +} + +export class SetDelegateCall__Inputs { + _call: SetDelegateCall; + + constructor(call: SetDelegateCall) { + this._call = call; + } + + get id(): Bytes { + return this._call.inputValues[0].value.toBytes(); + } + + get delegate(): Address { + return this._call.inputValues[1].value.toAddress(); + } +} + +export class SetDelegateCall__Outputs { + _call: SetDelegateCall; + + constructor(call: SetDelegateCall) { + this._call = call; + } +} diff --git a/generated/CompoundGovernanceToken/CompoundGovernanceToken.ts b/generated/CompoundGovernanceToken/CompoundGovernanceToken.ts index d52a9a3..8546a97 100644 --- a/generated/CompoundGovernanceToken/CompoundGovernanceToken.ts +++ b/generated/CompoundGovernanceToken/CompoundGovernanceToken.ts @@ -129,6 +129,14 @@ export class CompoundGovernanceToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class CompoundGovernanceToken extends ethereum.SmartContract { diff --git a/generated/DYDXToken/DYDXToken.ts b/generated/DYDXToken/DYDXToken.ts index 69178fe..50b8fe9 100644 --- a/generated/DYDXToken/DYDXToken.ts +++ b/generated/DYDXToken/DYDXToken.ts @@ -191,6 +191,14 @@ export class DYDXToken___propositionPowerSnapshotsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getBlockNumber(): BigInt { + return this.value0; + } + + getValue(): BigInt { + return this.value1; + } } export class DYDXToken___totalSupplySnapshotsResult { @@ -208,6 +216,14 @@ export class DYDXToken___totalSupplySnapshotsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getBlockNumber(): BigInt { + return this.value0; + } + + getValue(): BigInt { + return this.value1; + } } export class DYDXToken___votingSnapshotsResult { @@ -225,6 +241,14 @@ export class DYDXToken___votingSnapshotsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getBlockNumber(): BigInt { + return this.value0; + } + + getValue(): BigInt { + return this.value1; + } } export class DYDXToken extends ethereum.SmartContract { diff --git a/generated/FeiProtocolToken/FeiProtocolToken.ts b/generated/FeiProtocolToken/FeiProtocolToken.ts index 2eecb56..3323fe6 100644 --- a/generated/FeiProtocolToken/FeiProtocolToken.ts +++ b/generated/FeiProtocolToken/FeiProtocolToken.ts @@ -151,6 +151,14 @@ export class FeiProtocolToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class FeiProtocolToken extends ethereum.SmartContract { diff --git a/generated/GitcoinToken/GitcoinToken.ts b/generated/GitcoinToken/GitcoinToken.ts index 8c808e2..c02e807 100644 --- a/generated/GitcoinToken/GitcoinToken.ts +++ b/generated/GitcoinToken/GitcoinToken.ts @@ -173,6 +173,14 @@ export class GitcoinToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class GitcoinToken extends ethereum.SmartContract { diff --git a/generated/IdleFinanceToken/IdleFinanceToken.ts b/generated/IdleFinanceToken/IdleFinanceToken.ts index fb840a3..3ed07ae 100644 --- a/generated/IdleFinanceToken/IdleFinanceToken.ts +++ b/generated/IdleFinanceToken/IdleFinanceToken.ts @@ -129,6 +129,14 @@ export class IdleFinanceToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class IdleFinanceToken extends ethereum.SmartContract { diff --git a/generated/IndexedToken/IndexedToken.ts b/generated/IndexedToken/IndexedToken.ts index 4aa21e9..d5bf00e 100644 --- a/generated/IndexedToken/IndexedToken.ts +++ b/generated/IndexedToken/IndexedToken.ts @@ -151,6 +151,14 @@ export class IndexedToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class IndexedToken extends ethereum.SmartContract { diff --git a/generated/InverseFinanceToken/InverseFinanceToken.ts b/generated/InverseFinanceToken/InverseFinanceToken.ts index 4d369df..4ef30e9 100644 --- a/generated/InverseFinanceToken/InverseFinanceToken.ts +++ b/generated/InverseFinanceToken/InverseFinanceToken.ts @@ -151,6 +151,14 @@ export class InverseFinanceToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class InverseFinanceToken extends ethereum.SmartContract { diff --git a/generated/OlympusToken/OlympusToken.ts b/generated/OlympusToken/OlympusToken.ts index 1e98624..96d9284 100644 --- a/generated/OlympusToken/OlympusToken.ts +++ b/generated/OlympusToken/OlympusToken.ts @@ -129,6 +129,14 @@ export class OlympusToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class OlympusToken extends ethereum.SmartContract { diff --git a/generated/PoolTogetherToken/PoolTogetherToken.ts b/generated/PoolTogetherToken/PoolTogetherToken.ts index d245597..722c452 100644 --- a/generated/PoolTogetherToken/PoolTogetherToken.ts +++ b/generated/PoolTogetherToken/PoolTogetherToken.ts @@ -151,6 +151,14 @@ export class PoolTogetherToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class PoolTogetherToken extends ethereum.SmartContract { diff --git a/generated/SushiSwapToken/SushiSwapToken.ts b/generated/SushiSwapToken/SushiSwapToken.ts index cb5f59b..cefc6f4 100644 --- a/generated/SushiSwapToken/SushiSwapToken.ts +++ b/generated/SushiSwapToken/SushiSwapToken.ts @@ -151,6 +151,14 @@ export class SushiSwapToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class SushiSwapToken extends ethereum.SmartContract { diff --git a/generated/UniswapToken/UniswapToken.ts b/generated/UniswapToken/UniswapToken.ts index a19b3bb..8fc0bbc 100644 --- a/generated/UniswapToken/UniswapToken.ts +++ b/generated/UniswapToken/UniswapToken.ts @@ -151,6 +151,14 @@ export class UniswapToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class UniswapToken extends ethereum.SmartContract { diff --git a/generated/YamFinanceToken/YamFinanceToken.ts b/generated/YamFinanceToken/YamFinanceToken.ts index 101064b..ae5b87b 100644 --- a/generated/YamFinanceToken/YamFinanceToken.ts +++ b/generated/YamFinanceToken/YamFinanceToken.ts @@ -309,6 +309,14 @@ export class YamFinanceToken__checkpointsResult { map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); return map; } + + getFromBlock(): BigInt { + return this.value0; + } + + getVotes(): BigInt { + return this.value1; + } } export class YamFinanceToken extends ethereum.SmartContract { diff --git a/src/apecoin_mapping.ts b/src/apecoin_mapping.ts new file mode 100644 index 0000000..d302747 --- /dev/null +++ b/src/apecoin_mapping.ts @@ -0,0 +1,42 @@ +import { BigInt } from "@graphprotocol/graph-ts"; +import { Organization, User, DelegatorOrganization } from "../generated/schema"; +import { SetDelegate } from "../generated/ApeCoinToken/ApeCoinToken"; +import { getDelegateOrganization } from "./shared/getDelegateOrganization"; +import { getFirstTokenDelegatedAt } from "./shared/getFirstTokenDelegatedAt"; + +export function setDelegateHandle(event: SetDelegate): void { + let organization = new Organization("apecoin"); + organization.token = "apecoin"; + organization.save(); + + let delegate = new User(event.params.delegate.toHexString()); + delegate.save(); + + let delegator = new User(event.params.delegator.toHexString()); + delegator.save(); + + let delegatorOrganization = new DelegatorOrganization( + `${delegator.id}-${organization.id}` + ); + delegatorOrganization.delegate = delegate.id; + delegatorOrganization.delegator = delegator.id; + delegatorOrganization.organization = organization.id; + delegatorOrganization.save(); + + let user = new User(event.params.delegate.toHexString()); + user.save(); + + const delegateOrganizationId = `${user.id}-${organization.id}`; + const delegateOrganization = getDelegateOrganization(delegateOrganizationId); + + delegateOrganization.delegate = user.id; + delegateOrganization.organization = organization.id; + delegateOrganization.voteBalance = BigInt.zero(); + + delegateOrganization.firstTokenDelegatedAt = getFirstTokenDelegatedAt( + event, + delegateOrganization + ); + + delegateOrganization.save(); +} diff --git a/subgraph.yaml b/subgraph.yaml index c06077c..147316c 100644 --- a/subgraph.yaml +++ b/subgraph.yaml @@ -1,4 +1,4 @@ -specVersion: 0.0.2 +specVersion: 0.0.4 schema: file: ./schema.graphql dataSources: @@ -11,7 +11,7 @@ dataSources: startBlock: 13533400 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -34,7 +34,7 @@ dataSources: startBlock: 12422075 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -57,7 +57,7 @@ dataSources: startBlock: 11000400 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -80,7 +80,7 @@ dataSources: startBlock: 11870113 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -103,7 +103,7 @@ dataSources: startBlock: 10861674 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -126,7 +126,7 @@ dataSources: startBlock: 11094181 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -149,7 +149,7 @@ dataSources: startBlock: 11457421 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -172,7 +172,7 @@ dataSources: startBlock: 13674957 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -195,7 +195,7 @@ dataSources: startBlock: 12141775 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -218,7 +218,7 @@ dataSources: startBlock: 11498340 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -241,7 +241,7 @@ dataSources: startBlock: 12125705 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -264,7 +264,7 @@ dataSources: startBlock: 10886913 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -287,7 +287,7 @@ dataSources: startBlock: 9601359 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -310,7 +310,7 @@ dataSources: startBlock: 10926829 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -333,7 +333,7 @@ dataSources: startBlock: 10736094 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -356,7 +356,7 @@ dataSources: startBlock: 14923678 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -379,7 +379,7 @@ dataSources: startBlock: 11332000 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -402,7 +402,7 @@ dataSources: startBlock: 12809555 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - Delegate @@ -416,3 +416,24 @@ dataSources: - event: DelegatedPowerChanged(indexed address,uint256,uint8) handler: delegateVotesChanged file: ./src/dydx_mapping.ts + - kind: ethereum/contract + name: ApeCoinToken + network: mainnet + source: + address: "0x469788fE6E9E9681C6ebF3bF78e7Fd26Fc015446" + abi: ApeCoinToken + startBlock: 11225329 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Delegate + - Delegator + abis: + - name: ApeCoinToken + file: ./abis/ApeCoinToken.json + eventHandlers: + - event: SetDelegate(indexed address,indexed bytes32,indexed address) + handler: setDelegateHandle + file: ./src/apecoin_mapping.ts