Add payments config and charge according to configured rates (#395)

* Track amount paid on payment channels and charge as per query cost

* Add payments manager config

* Fix received payment checks

* Separate out payment not received and amount insufficient errors

* Serve a query for free if its rate is not configured

* Load open payment channels from the stored state

* Take list of free queries from config

* Take mutation rates from config

* Rename query rates config fields

* Take cache settings and request timeout from config

* Upgrade ts-nitro packages

* Upgrade package versions
This commit is contained in:
prathamesh0
2023-07-27 15:52:36 +05:30
committed by GitHub
parent aa10a2dc05
commit 198d3e65db
15 changed files with 208 additions and 111 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/codegen",
"version": "0.2.49",
"version": "0.2.50",
"description": "Code generator",
"private": true,
"main": "index.js",
@@ -20,7 +20,7 @@
},
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@cerc-io/util": "^0.2.49",
"@cerc-io/util": "^0.2.50",
"@graphql-tools/load-files": "^6.5.2",
"@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git",
"@solidity-parser/parser": "^0.13.2",
@@ -41,12 +41,12 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.49",
"@cerc-io/ipld-eth-client": "^0.2.49",
"@cerc-io/solidity-mapper": "^0.2.49",
"@cerc-io/util": "^0.2.49",
"@cerc-io/cli": "^0.2.50",
"@cerc-io/ipld-eth-client": "^0.2.50",
"@cerc-io/solidity-mapper": "^0.2.50",
"@cerc-io/util": "^0.2.50",
{{#if (subgraphPath)}}
"@cerc-io/graph-node": "^0.2.49",
"@cerc-io/graph-node": "^0.2.50",
{{/if}}
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",