Skip to content
This repository was archived by the owner on Nov 26, 2022. It is now read-only.
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
6 changes: 5 additions & 1 deletion config/bttc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,9 @@
"0x18fa72e0ee4c580a129b0ce5bd0694d716c7443e",
"0xae17940943ba9440540940db0f1877f101d39e8b",
"0x17f235fd5974318e4e2a5e37919a209f7c37a6d1"
]
],
"reward_locker_v2": {
"address": "0xe79bfc312328ab75272785dbf5bd871b253709a5",
"startBlock": "5450119"
}
}
14 changes: 7 additions & 7 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ type Transaction @entity {
timestamp: BigInt!
# This is not the reverse of Mint.transaction; it is only used to
# track incomplete mints (similar for burns and swaps)
mints: [Mint]!
burns: [Burn]!
swaps: [Swap]!
harvests: [Harvest]!
vests: [Vest]!
deposits: [Deposit]!
withdraws: [Withdraw]!
mints: [Mint!]!
burns: [Burn!]!
swaps: [Swap!]!
harvests: [Harvest!]!
vests: [Vest!]!
deposits: [Deposit!]!
withdraws: [Withdraw!]!
Comment on lines +203 to +209
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ! mean that object is allow to be null/empty, I add this because It raises an error about Mint Swap... can be null

}

type Mint @entity {
Expand Down
18 changes: 9 additions & 9 deletions src/config/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'

export const ADDRESS_LOCK = '0xffffffffffffffffffffffffffffffffffffffff'

export const DMM_DYNAMIC_FEE_FACTORY_ADDRESS = '0x833e4083b7ae46cea85695c4f7ed25cdad8886de'
export const DMM_DYNAMIC_FEE_FACTORY_ADDRESS = '0xd9bfe9979e9ca4b2fe84ba5d4cf963bbcb376974'
export const DMM_STATIC_FEE_FACTORY_ADDRESS = '0x1c758af0688502e49140230f6b0ebd376d429be5'
export const DMM_STATIC_FEE_FACTORY_LEGACY_ADDRESS = ''

export const ETH_PRICING_POOLS = '0xd478953d5572f829f457a5052580cbeaee36c1aa|0x20d6b227f4a5a2a13d520329f01bb1f8f9d2d628|0xf8467ef9de03e83b5a778ac858ea5c2d1fc47188|0xce9874c42dce7fffbe5e48b026ff1182733266cb'
export const ETH_PRICING_POOLS = '0xaa70a5b819b4ee01f7e521a6e465a9b84303543d'

// minimum liquidity required to count towards tracked volume for pairs with small # of Lps
export let MINIMUM_USD_THRESHOLD_NEW_PAIRS = BigDecimal.fromString('4000')
export let MINIMUM_USD_THRESHOLD_NEW_PAIRS = BigDecimal.fromString('1000')

// minimum liquidity for price to get tracked
export let MINIMUM_LIQUIDITY_THRESHOLD_ETH = BigDecimal.fromString('2') // default is 2
export let MINIMUM_LIQUIDITY_THRESHOLD_ETH = BigDecimal.fromString('1000000000') // default is 2

export const WRAPPED_NATIVE_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
export const WRAPPED_NATIVE_ADDRESS = '0x8d193c6efa90bcff940a98785d1ce9d093d3dc8a'

export const KNC_ADDRESS = '0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202'
export const KNC_ADDRESS = ''
export const KNC_NAME = 'Kyber Network'
export const KNC_SYMBOL = 'KNC'

export const KNCL_ADDRESS = '0xdd974d5c2e2928dea5f71b9825b8b646686bd200'
export const KNCL_ADDRESS = ''
export const KNCL_NAME = 'Kyber Network Legacy'
export const KNCL_SYMBOL = 'KNCL'

export let FACTORY_BPS = BigDecimal.fromString('10000')

export let NETWORK = 'mainnet'
export let NETWORK = 'bttc'

export let WHITELISTED_TOKENS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0x6b175474e89094c44da98b954eedeac495271d0f,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0xdac17f958d2ee523a2206206994597c13d831ec7,0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202'
export let WHITELISTED_TOKENS = '0x8d193c6efa90bcff940a98785d1ce9d093d3dc8a,0xe7dc549ae8db61bde71f22097becc8db542ca100,0xca424b845497f7204d9301bd13ff87c0e2e86fcf,0x9b5f27f6ea9bbd753ce3793a07cba3c74644330d,0x1249c65afb11d179ffb3ce7d4eedd1d9b98ad006,0xe887512ab8bc60bcc9224e1c3b5be68e26048b8b,0xcbb9edf6775e39748ea6483a7fa6a385cd7e9a4e,0xdb28719f7f938507dbfe4f0eae55668903d34a15,0xa20dfb01dca223c0e52b0d4991d4afa7e08e3a50,0x185a4091027e2db459a2433f85f894dc3013aeb5,0xedf53026aea60f8f75fca25f8830b7e2d6200662,0x65676055e58b02e61272cedec6e5c6d56badfb86,0x935faa2fcec6ab81265b301a30467bbc804b43d3,0x9888221fe6b5a2ad4ce7266c7826d2ad74d40ccf,0xe467f79e9869757dd818dfb8535068120f6bcb97,0x18fa72e0ee4c580a129b0ce5bd0694d716c7443e,0xae17940943ba9440540940db0f1877f101d39e8b,0x17f235fd5974318e4e2a5e37919a209f7c37a6d1'
58 changes: 29 additions & 29 deletions subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ schema:
dataSources:
- kind: ethereum/contract
name: DmmDynamicFeeFactory
network: mainnet
network: bttc
source:
address: '0x833e4083b7ae46cea85695c4f7ed25cdad8886de'
address: '0xd9bfe9979e9ca4b2fe84ba5d4cf963bbcb376974'
abi: DmmDynamicFeeFactory
startBlock: 12178218 # contract creation block
startBlock: 5450119 # contract creation block
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factory.ts
entities: # defines which entities are written to stores
Expand All @@ -37,14 +37,14 @@ dataSources:

- kind: ethereum/contract
name: DmmStaticFeeFactory
network: mainnet
network: bttc
source:
address: '0x1c758af0688502e49140230f6b0ebd376d429be5'
abi: DmmStaticFeeFactory
startBlock: 14971899 # contract creation block
startBlock: 7855046 # contract creation block
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factory.ts
entities: # defines which entities are written to stores
Expand All @@ -68,24 +68,24 @@ dataSources:


- kind: ethereum/contract
name: KyberRewardLocker
network: mainnet
name: KyberRewardLockerV2
network: bttc
source:
address: '0xfab5186a194588f5ad5074bd52659302906b4522'
abi: KyberRewardLocker
startBlock: 12720768 # contract creation block
address: '0xE79bfc312328Ab75272785DBf5Bd871b253709A5'
abi: KyberRewardLockerV2
startBlock: 5450119 # contract creation block
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/rewardLocker.ts
entities: # defines which entities are written to stores
file: ./src/mappings/rewardLockerV2.ts
entities: # defines which entities are written to stores
- RewardLocker
abis:
- name: KyberRewardLocker
file: ./abis/KyberRewardLocker.json
- name: KyberFairLaunch
file: ./abis/KyberFairLaunch.json
- name: KyberRewardLockerV2
file: ./abis/KyberRewardLockerV2.json
- name: KyberFairLaunchV2
file: ./abis/KyberFairLaunchV2.json
eventHandlers:
- event: RewardContractAdded(indexed address,indexed address,bool)
handler: handleRewardContractAdded
Expand All @@ -95,12 +95,12 @@ dataSources:
templates:
- kind: ethereum/contract
name: Pool
network: mainnet
network: bttc
source:
abi: Pool
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/core.ts
entities:
Expand All @@ -126,27 +126,27 @@ templates:
handler: handleSync

- kind: ethereum/contract
name: KyberFairLaunch
network: mainnet
name: KyberFairLaunchV2
network: bttc
source:
abi: KyberFairLaunch
abi: KyberFairLaunchV2
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/fairLaunch.ts
file: ./src/mappings/fairLaunchV2.ts
entities:
- Pool
- Token
abis:
- name: KyberFairLaunch
file: ./abis/KyberFairLaunch.json
- name: KyberFairLaunchV2
file: ./abis/KyberFairLaunchV2.json
eventHandlers:
- event: Deposit(indexed address,indexed uint256,indexed uint256,uint256)
handler: handleDeposit
- event: Harvest(indexed address,indexed uint256,indexed address,uint256,uint256)
handler: handleHarvest
- event: Withdraw(indexed address,indexed uint256,indexed uint256,uint256)
handler: handleWithdraw
- event: AddNewPool(indexed address,indexed uint32,indexed uint32,uint256[])
- event: AddNewPool(indexed address,indexed address,uint32,uint32,uint32)
handler: handleAddNewPool