Skip to content
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

feature: Apecoin integration #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
79 changes: 79 additions & 0 deletions abis/ApeCoinToken.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
107 changes: 107 additions & 0 deletions build/ApeCoinToken/abis/ApeCoinToken.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
59 changes: 40 additions & 19 deletions build/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
specVersion: 0.0.2
specVersion: 0.0.4
schema:
file: schema.graphql
dataSources:
Expand All @@ -11,7 +11,7 @@ dataSources:
startBlock: 13533400
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -34,7 +34,7 @@ dataSources:
startBlock: 12422075
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -57,7 +57,7 @@ dataSources:
startBlock: 11000400
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -80,7 +80,7 @@ dataSources:
startBlock: 11870113
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -103,7 +103,7 @@ dataSources:
startBlock: 10861674
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -126,7 +126,7 @@ dataSources:
startBlock: 11094181
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -149,7 +149,7 @@ dataSources:
startBlock: 11457421
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -172,7 +172,7 @@ dataSources:
startBlock: 13674957
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -195,7 +195,7 @@ dataSources:
startBlock: 12141775
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -218,7 +218,7 @@ dataSources:
startBlock: 11498340
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -241,7 +241,7 @@ dataSources:
startBlock: 12125705
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -264,7 +264,7 @@ dataSources:
startBlock: 10886913
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -287,7 +287,7 @@ dataSources:
startBlock: 9601359
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -310,7 +310,7 @@ dataSources:
startBlock: 10926829
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -333,7 +333,7 @@ dataSources:
startBlock: 10736094
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -356,7 +356,7 @@ dataSources:
startBlock: 14923678
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -379,7 +379,7 @@ dataSources:
startBlock: 11332000
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -402,7 +402,7 @@ dataSources:
startBlock: 12809555
mapping:
kind: ethereum/events
apiVersion: 0.0.5
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Delegate
Expand All @@ -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
8 changes: 8 additions & 0 deletions generated/AaveToken/AaveToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading