Commit Graph

17 Commits

Author SHA1 Message Date
Alex Coseru b1a58b7f13
Feature/df rewards (#531)
* bump contracts * oceanjs

* add DFRewards
2022-09-13 15:45:03 +03:00
Alex Coseru 0900c1fe88
update tests for new ocean.js 2.0 (#526)
* update tests for new ocean.js 2.0

* add tx&block to veDeposit

* add veOcean tests

* bump to oceanlib 2.0.0
2022-09-07 13:30:53 +03:00
Idiom a10c6244b5
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 15:07:31 +03:00
Jamie Hewitt dbb296063b
Testing user fields (#516)
* Testing all user fields

* Adding tests for user1 selling a datatoken

* Testing user feilds after ordering a datatoken
2022-08-30 13:20:40 +03:00
Jamie Hewitt 02e980fce2
Dispenser tests (#514)
* Setting up initial dispenser tests

* Testing making user1 minter

* Creating dispenser & testing all fields

* Creating deactivate dispenser test

* Fixing handleDeactivate in dispenser

* Adding test for updating allowed swapper

* Writting test for owner withdrawing all datatokens from dispenser
2022-08-12 10:32:48 +03:00
Jamie Hewitt 82ce88c026
Fixed rate exchange tests (#513)
* Creating an inital Fixed rate exchange test

* Testing additional fields

* Testing all fields on fixed rate exchange

* Splitting up tests

* Splitting up fixed rate exachange tests

* Creating test for fixed rate price updates

* Adding test for updating allowed swapper

* Fixing templateId test

* Testing fixed rate excahnge updates

* Testing deactivate exchange

* Testing activate and deactive exchange

* Updating activate and deactivate minting

* Testing all fields of swaps after buying a DT

* Creating testing for selling a fixed rate DT

* Creating a constant for sleep ms
2022-08-11 15:59:19 +03:00
Jamie Hewitt fd40e490cc
Tracking templateId (#508)
* Creating a new set of tests for datatokens

* Testing additional fields on datatoken

* Testing value for tx, block and orderCOunt

* Adding additional tests after updating nft metadata

* SPlitting up nft tests and datatoken tests

* Updating tests for additional fields

* Adding tests for remaining datatoken fields

* Adding test for datatoken balances

* Testing if orders are correctly updated in the datatoken

* Adding comment

* Removing comments

* Adding logs

* Updating templateId

* Updating tests + removing comments

* lint:fix
2022-08-02 16:13:43 +03:00
Jamie Hewitt bd03b28197
Additional tests for NFT and Datatokens (#498)
* Creating a new set of tests for datatokens

* Testing additional fields on datatoken

* Testing value for tx, block and orderCOunt

* Adding additional tests after updating nft metadata

* SPlitting up nft tests and datatoken tests

* Updating tests for additional fields

* Adding tests for remaining datatoken fields

* Adding test for datatoken balances

* Testing if orders are correctly updated in the datatoken

* Adding comment

* Removing comments

* Updating tokenURI test

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-08-02 11:06:56 +03:00
Jamie Hewitt 3ebc29a74d
Issue 471 provider fees (#474)
* Adding providerFee to Order in the schema

* Adding ProviderFee to subgraph.template.yaml

* Creating order utils

* Saving providerFee as a string

* Saving providerFee as an array of all previous provider fees

* Creating test for providerFee

* Removing arrary from providerFee

* Updating or Creating OrderResue provider fee

* lint:fix

* Creating additional tests for testing providerFees on Order and reuseOrder

* lint:fix

* Updating JSON string notation

* Fixing first test

* fixing second test: testing provider fees after calling reuseOrder on a using a previous txId

* added providerFeeValidUntil

Co-authored-by: mihaisc <mihai@oceanprotocol.com>
2022-07-12 11:11:43 +03:00
Jamie Hewitt 603a25f26a
Tracking transfer event & updating nft owner (#436)
* Adding Tranfer eventHandler to subgraph.template.yaml

* Started adding transfer event to mapping

* updating getNftTokenWithID function

* Pulling from Origin v4main

* Removing console.log

* Updating token Utils

* Updating newOwner with User & writting new test

* Updating test

* Ensuring account is in lowercase

* Creating seperate test for transfering an NFT query

* Updating test name

* Removing console.logs

* Moviving transfer event tracking from factory to template

* Moving handleNftTransferred to nftUpdate mapping

* Adding logging

* Using correct token address

* Fix linting

* Checking the correct owner account has been set originally
2022-06-24 10:06:44 +03:00
Jamie Hewitt 796bff70e7
removing Vesting and opcFee (#432)
* removing opcFee

* Removing OPCFeeChanged from subgraph.template.yaml

* Adding OPCFeeChanged event back into subgraph.template.yml

* Adding SSContractAdded and SSContractRemoved back in

* Formatting
2022-05-12 20:31:12 +03:00
Alex Coseru 7073cd8743
bump contracts to alpha28 and ocean.js to alpha 33 (#401)
* bump contracts to alpha28 and ocean.js to alpha 33

* update dev deps

* fix pool reserves
2022-04-04 15:52:30 +03:00
Alex Coseru f04fe156ac
refactor (#314)
* refactor contracts usage

* add docker support for barge

* add tests
2022-02-14 10:35:55 +02:00
mihaisc 6646d21292
Added baseTokenSymbol to FixedRateExchange (#201)
* added baseTokenSymbol to fre

* increase wait for test

* fix format
2021-08-13 07:04:18 -07:00
mihaisc 61466749e0
Manual bump test (#181)
* bump

* ci possible fix

* ci fix

* ci fx

* fix tests

* test

* more test

* more test

* test

* t

* remove console

* test

* test

* add env

* wait contracts

* test

* t

* t

* add sleep

* bump lib again

* bump eslint

* Update Datatokens.test.ts

* log result

* test url

* fix url

* Update Datatokens.test.ts

* Update tests.yml

* url test

* Update tests.yml

* Update tests.yml

* Update tests.yml

* fix

* fix

* remove unused script

* remove console logs

* shorter wait time

* remove logs from test

Co-authored-by: Alex Coseru <alex.coseru@gmail.com>
2021-08-03 05:16:02 -07:00
Alex Coseru f47ec9bb09
add dispenser (#106)
* add dispenser


Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>
2021-05-13 09:19:21 +03:00
Alex Coseru 2a711626ed
add integration tests (#74)
* add integration tests

* try actions

* workflows check

* workflows testing

* workflow test

* workflow test

* workflow test

* increase timeout

* small fix

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* workflow test

* workflow test

* workflow test

* fix workflows

* add readme

* fix readme

* one more test

* end test

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2021-04-13 18:10:03 +03:00