2021-11-12 14:22:35 +01:00
|
|
|
import { BigDecimal, BigInt } from '@graphprotocol/graph-ts'
|
|
|
|
|
|
|
|
export const ENABLE_DEBUG = true
|
2022-01-18 15:20:02 +01:00
|
|
|
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
|
2021-11-12 14:22:35 +01:00
|
|
|
|
2021-11-23 13:59:34 +01:00
|
|
|
export const DAY = 24 * 60 * 60
|
|
|
|
|
2021-11-12 14:22:35 +01:00
|
|
|
export namespace integer {
|
|
|
|
export const NEGATIVE_ONE = BigInt.fromI32(-1)
|
|
|
|
export const ZERO = BigInt.fromI32(0)
|
|
|
|
export const ONE = BigInt.fromI32(1)
|
|
|
|
export const TWO = BigInt.fromI32(2)
|
|
|
|
export const ONE_BASE_18 = BigInt.fromI32(10).pow(18 as u8)
|
|
|
|
}
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
export namespace decimal {
|
2021-11-19 15:42:17 +01:00
|
|
|
export const ZERO = BigDecimal.fromString('0.0')
|
|
|
|
export const MINUS_1 = BigDecimal.fromString('-1.0')
|
|
|
|
export const ONE = BigDecimal.fromString('1.0')
|
2021-11-12 14:22:35 +01:00
|
|
|
export const BONE = BigDecimal.fromString('1000000000000000000')
|
|
|
|
}
|
2021-11-19 15:42:17 +01:00
|
|
|
|
2021-12-02 13:10:23 +01:00
|
|
|
// string enums don't work in wasm so this was the alternative, not optimal
|
2021-12-02 12:08:47 +01:00
|
|
|
|
2021-12-02 13:10:23 +01:00
|
|
|
export namespace NftUpdateType {
|
|
|
|
export const METADATA_CREATED = 'METADATA_CREATED'
|
|
|
|
export const METADATA_UPDATED = 'METADATA_UPDATED'
|
|
|
|
export const STATE_UPDATED = 'STATE_UPDATED'
|
|
|
|
export const TOKENURI_UPDATED = 'TOKENURI_UPDATED'
|
2021-12-02 12:08:47 +01:00
|
|
|
}
|
Implementing first pass of veAllocate schema, handlers, and test cove… (#490)
* Implementing first pass of veAllocate schema, handlers, and test coverage.
* Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come.
* Created documentation. Moving tests away from subgraph and into df-py.
* Expanding documentation to be thorough and cover more of the work involved.
* use barge artifacts
* use proper contracts in ci
* use barge artifacts folder
* fix replace
* use npm contracts dep
* use latest contracts for barge
* fix some lint
* Fix linter errors
* Update schema
* Finished basic integration of setAllocation event and verified queries/schema is working as intended.
* Fixing amount getter.
* Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors.
* Fixing import.
* Use .zero()
* Improve readability
* Add allocated to schema
* Update abi
* Update event handlers in the template
* Update veREADME
* Remove `AllocationRemoved` handler
* Hooking data for tx, firstContact, lastUpdate, block
* Update event abi
* Add chainId and nftAddress to schema
* Update `handleAllocationSet`
* Update abi
* Update readme
* Set initial values
* Fix math
* Missing event param
* set initial value of `lastContact`
* veOcean template
* VeOcean entity
* Handler functions - wip
* rename file
* Delegation schema
* veDelegate mapping file
* Rename
* Update template
* Update schema
* Update replaces
* Add handler for delegation
* Update schema
* getveDelegation
* Update naming
* Add deposit entity
* Update template
* Make delegation an array
* Add `handleDelegation`
* Add `handleDeposit` for veOCEAN
* Add `getveOCEAN` util function
* Add `getDeposit` util function
* Add `handleBurnBoost`
* Add `handleExtendBoost`
* Add `handleTransferBoost`
* Set default veOCEAN
* Remove unused import
* Rename Deposit to VeDeposit
* Include block number
* Remove `allocatedTotal`
* Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not..
* bump contracts to v1.1.1
* bump contracts
* bump to contracts 1.1.2
* fix script for networks without ve
* add veAllocation.sol's AllocationSetMultiple
* copy artfacts from barge for npm quickstart:barge
* fix using barge artifacts
* temp debug
* use barge artifacts
* use contracts 1.1.3
* use same approach for 'development'
* bump ocean-contracts
Co-authored-by: alexcos20 <alex.coseru@gmail.com>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
|
|
|
|
|
|
|
export namespace veAllocationUpdateType {
|
|
|
|
export const SET = 'SET'
|
|
|
|
export const REMOVED = 'REMOVED'
|
|
|
|
}
|