mstable / mstable-app Goto Github PK
View Code? Open in Web Editor NEW๐ Lite application to interface with the mStable protocol
Home Page: https://app.mstable.org
License: GNU Lesser General Public License v3.0
๐ Lite application to interface with the mStable protocol
Home Page: https://app.mstable.org
License: GNU Lesser General Public License v3.0
Describe the bug
When I follow this step in the README https://github.com/mstable/mStable-app#deploying-the-subgraph by running cd lib/graph-node/docker && docker-compose up
, I get the following error that it can't connect to IPFS at http://ipfs:5001/
Starting docker_ipfs_1 ... done
Starting docker_postgres_1 ... done
Recreating docker_graph-node_1 ... done
Attaching to docker_ipfs_1, docker_postgres_1, docker_graph-node_1
ipfs_1 | Changing user to ipfs
ipfs_1 | ipfs version 0.6.0
ipfs_1 | Found IPFS fs-repo at /data/ipfs
ipfs_1 | Initializing daemon...
ipfs_1 | go-ipfs version: 0.6.0-d6e036a
ipfs_1 | Repo version: 10
ipfs_1 | System version: amd64/linux
ipfs_1 | Golang version: go1.14.2
ipfs_1 | Swarm listening on /ip4/127.0.0.1/tcp/4001
ipfs_1 | Swarm listening on /ip4/127.0.0.1/udp/4001/quic
ipfs_1 | Swarm listening on /ip4/172.27.0.2/tcp/4001
ipfs_1 | Swarm listening on /ip4/172.27.0.2/udp/4001/quic
ipfs_1 | Swarm listening on /p2p-circuit
ipfs_1 | Swarm announcing /ip4/127.0.0.1/tcp/4001
ipfs_1 | Swarm announcing /ip4/127.0.0.1/udp/4001/quic
ipfs_1 | Swarm announcing /ip4/172.27.0.2/tcp/4001
ipfs_1 | Swarm announcing /ip4/172.27.0.2/udp/4001/quic
ipfs_1 | Swarm announcing /ip6/::1/tcp/4001
ipfs_1 | Swarm announcing /ip6/::1/udp/4001/quic
ipfs_1 | API server listening on /ip4/0.0.0.0/tcp/5001
ipfs_1 | WebUI: http://0.0.0.0:5001/webui
ipfs_1 | Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
ipfs_1 | Daemon is ready
postgres_1 |
postgres_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1 |
postgres_1 | 2020-08-24 13:58:39.756 UTC [1] LOG: starting PostgreSQL 12.4 (Debian 12.4-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
postgres_1 | 2020-08-24 13:58:39.770 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres_1 | 2020-08-24 13:58:39.776 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres_1 | 2020-08-24 13:58:39.835 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1 | 2020-08-24 13:58:39.988 UTC [27] LOG: database system was interrupted; last known up at 2020-08-24 13:56:50 UTC
postgres_1 | 2020-08-24 13:58:45.015 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
postgres_1 | 2020-08-24 13:58:45.091 UTC [27] LOG: redo starts at 0/1646038
postgres_1 | 2020-08-24 13:58:45.092 UTC [27] LOG: invalid record length at 0/1646070: wanted 24, got 0
postgres_1 | 2020-08-24 13:58:45.092 UTC [27] LOG: redo done at 0/1646038
postgres_1 | 2020-08-24 13:58:45.271 UTC [1] LOG: database system is ready to accept connections
graph-node_1 | Aug 24 13:58:45.664 INFO Graph Node version: unknown (6ab7a3fd0 2020-08-21)
graph-node_1 | Aug 24 13:58:45.686 INFO Starting up
graph-node_1 | Aug 24 13:58:45.687 INFO Trying IPFS node at: http://ipfs:5001/
graph-node_1 | Aug 24 13:58:45.697 INFO Creating transport, capabilities: archive, trace, url: http://localhost:7545, network: mainnet
graph-node_1 | thread 'tokio-runtime-worker' panicked at 'Failed to connect to IPFS: api returned unknwon error '405 - Method Not Allowed
graph-node_1 | '', node/src/main.rs:516:25
graph-node_1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
graph-node_1 | Aug 24 13:58:45.711 ERRO Is there an IPFS node running at "http://ipfs:5001/"?
graph-node_1 | Panic in tokio task, aborting!
graph-node_1 | /usr/local/bin/start: line 74: 30 Aborted graph-node --postgres-url "$postgres_url" --ethereum-rpc $ethereum --ipfs "$ipfs"
docker_graph-node_1 exited with code 134
could be related to that issue: ethers-io/ethers.js#469
when the browser is left open to the earn page for extended periods, the APY can show generally higher than usual numbers until the page is refreshed.
Win10/Chrome/Metamask
Is your feature request related to a problem? Please describe.
As an EARN participant, I want to be able to withdraw a part of my stake in a given EARN pool, instead of simply withdrawing all of it.
Describe the solution you'd like
An option to 'withdraw X amount' instead of simply calling 'exit' on the EARN pool. Then enter an amount of LP tokens to withdraw.
Additional context
Development: Instead of calling exit
on the contract, you need to call withdraw(amount)
If I enter 1.0 or any value below it, it goes 1x max. If I do 1.1, it shows 3x. Is that a bug, or something not documented?
Describe the bug
A clear and concise description of what the bug is.
When I switch to Node.js v12.18.3 or v14.7.0, then install dependencies with yarn
, and then run yarn provision
, it outputs the error shown in the "To Reproduce" section below. If I use an older version v10.22.0 then yarn provision
runs successfully.
To Reproduce
Steps to reproduce the behavior:
brew cask install ganache
npm install truffle -g
nvm use v14.7.0
git clone [email protected]:mstable/mStable-app.git && cd mStable-app
yarn
yarn provision
yarn provision
yarn run v1.22.4
$ sh ./scripts/provision.sh
Provisioning submodules
Installing contracts
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
[3/4] ๐ Linking dependencies...
warning "@nomiclabs/buidler-truffle5 > @nomiclabs/[email protected]" has unmet peer dependency "web3-core-promievent@^1.2.1".
warning "@nomiclabs/buidler-truffle5 > @nomiclabs/[email protected]" has unmet peer dependency "web3-eth-abi@^1.2.1".
warning "@openzeppelin/test-helpers > [email protected]" has unmet peer dependency "bn.js@^4.11.0".
warning " > @typescript-eslint/[email protected]" has unmet peer dependency "tslint@^5.0.0".
warning "buidler-gas-reporter > [email protected]" has unmet peer dependency "@codechecks/client@^0.1.0".
warning " > [email protected]" has unmet peer dependency "bn.js@^4.11.0".
warning "eslint-config-airbnb-typescript > [email protected]" has unmet peer dependency "eslint-plugin-react-hooks@^1.7.0".
warning "ethlint > [email protected]" has unmet peer dependency "solium@^1.0.0".
warning "typechain > [email protected]" has incorrect peer dependency "typescript@>=3.7.0".
[4/4] ๐จ Building fresh packages...
[-/24] โก waiting...
[-/24] โข waiting...
[-/24] โข waiting...
[12/24] โข scrypt
warning Error running install script for optional dependency: "/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/scrypt: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/scrypt
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.16 found at \"/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python\"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/Users/ls/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/scrypt/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/ls/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/ls/Library/Caches/node-gyp/12.18.3/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/ls/Library/Caches/node-gyp/12.18.3',
gyp info spawn args '-Dnode_gyp_dir=/Users/ls/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/ls/Library/Caches/node-gyp/12.18.3/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/scrypt',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
Expected behavior
It should build without that error, or notify the user that the error is because they are using an unsupported version of Node.js
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Opened the mint app. Deposited 1000 USDC and clicked on mint.
Transaction was successful: 0x75e17bc109de52125e22e436c63008e5a1c988c6f7e7d21db0e8aefdeacdabf6
but no mUSD was minted. wallet shows starting balance of USDC and it looks like the transaction cost of this to do nothing was 0.005927509 ETH.
Is your feature request related to a problem? Please describe.
Right now there is a lack of clarity on the Basket composition, presently and historically. We want to show users some more information about the contents of the Basket of a given mAsset.
Describe the solution you'd like
Provide 2 of 3 of the following additional stats:
Bonus
Think of some other stats that the users would like to see on the analytics page
Additional context
Is your feature request related to a problem? Please describe.
Users want to see exactly how much mUSD
they might have earned since entering the SAVE
contract. Currently the only metric is a very volatile APY.
Describe the solution you'd like
A new page - app.mstable.org/save/calculator
A nice way to visualise and calculate the two questions:
X mUSD
into the savings contract at Y
date, how much mUSD
would I have now?"X mUSD
into the savings contract now, how much am I likely to have at Y
date in the future?Bonus points
Innovate - make this fun and engaging.
Some ideas off the top of my head:
Help
The exchangeRate
variable produced by the SavingsContract
continually goes up, and makes the credits
a user owns worth more mUSD
. To get the increase in an mUSD
value between two dates, you can take the two exchange rates, and work out the percentage increase in exchange rate, applying that to the mUSD
holdings. This increase can be used to extrapolate future returns by converting it into the APY
number (this is how we work out the APY in the app currently).
Additional context
This should:
Feel free to reach out to the team for any further information.
Interested in working with mStable? Check out our dApp developer role
When following the steps in the README, after running the Ganache testnet, if I then run yarn truffle:migrate
, it outputs the following errors, because the README doesn't tell me that I need to explicitely compile the Typescript code.
yarn run v1.22.4
$ cd ./lib/mStable-subgraph && yarn truffle:migrate
$ cd lib/mStable-contracts && yarn migrate
$ truffle migrate --network development --reset
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Migrations dry-run (simulation)
===============================
> Network name: 'development-fork'
> Network id: 3
> Block gas limit: 7984452 (0x79d544)
1_main.js
=========
/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/dist/index.js:175
throw error;
^
TSError: โจฏ Unable to compile TypeScript:
migrations/src/1_initial_migration.ts:9:20 - error TS2503: Cannot find namespace 'Truffle'.
9 artifacts: Truffle.Artifacts;
~~~~~~~
migrations/src/1_initial_migration.ts:2:22 - error TS6053: File '/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/types/generated/index.d.ts' not found.
2 /// <reference path="../../types/generated/index.d.ts" />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
migrations/src/1_initial_migration.ts:3:22 - error TS6053: File '/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/types/generated/types.d.ts' not found.
3 /// <reference path="../../types/generated/types.d.ts" />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at createTSError (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/src/index.ts:245:12)
at reportTSError (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/src/index.ts:249:19)
at getOutput (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/src/index.ts:357:34)
at Object.compile (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/src/index.ts:415:32)
at Module.m._compile (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/src/index.ts:493:43)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.require.extensions.<computed> [as .ts] (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/ts-node/src/index.ts:496:12)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at require (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/require/require.js:54:1)
at /Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/migrations/1_main.js:4:26
at Script.runInContext (vm.js:130:18)
at Script.runInNewContext (vm.js:135:17)
at Object.file (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/require/require.js:92:1)
at Migration._load (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/migration.js:43:1)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Migration.run (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/migration.js:167:1)
at Object.runMigrations (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:148:1)
at Object.runFrom (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.runAll (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:114:1)
at Object.run (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:79:1)
at runMigrations (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:253:1)
at setupDryRunEnvironmentThenRunMigrations (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:241:1)
at /Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:207:1
Truffle v5.1.22 (core: 5.1.22)
Node v12.18.3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
But if I transpile the Typescript with:
cd ./lib/mStable-subgraph/lib/mStable-contracts && \
yarn run generate-typings && \
cd ../../../../
Then run yarn truffle:migrate
again, it outputs:
yarn run v1.22.4
$ cd ./lib/mStable-subgraph && yarn truffle:migrate
$ cd lib/mStable-contracts && yarn migrate
$ truffle migrate --network development --reset
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Migrations dry-run (simulation)
===============================
> Network name: 'development-fork'
> Network id: 3
> Block gas limit: 7984452 (0x79d544)
1_main.js
=========
Deploying 'Migrations'
----------------------
==============================================
Generating mock bAssets and lending platforms
==============================================
Error: *** Deployment Failed ***
"Migrations" exceeded the block limit (with a gas value you set).
* Block limit: 7984452 (0x79d544)
* Gas sent: 8000000 (0x7a1200)
* Try:
+ Sending less gas.
+ Setting a higher network block limit if you are on a
private network or test client (like ganache).
at /Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:364:1
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Migration._deploy (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/migration.js:70:1)
at Migration._load (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/migration.js:57:1)
at Migration.run (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/migration.js:167:1)
at Object.runMigrations (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:148:1)
at Object.runFrom (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.runAll (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:114:1)
at Object.run (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:79:1)
at runMigrations (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:253:1)
at setupDryRunEnvironmentThenRunMigrations (/Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:241:1)
at /Users/ls/code/src/ltfschoen/mStable-app/lib/mStable-subgraph/lib/mStable-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:207:1
Truffle v5.1.22 (core: 5.1.22)
Node v12.18.3
Because I ran Ganache with the following:
ganache-cli \
--account="0x209c205f333b5a65cc428589a51bd9f2621e2fc01de1b02dbf8c0f0b68e4974e, 50471238800000000000" \
--account="0x0edb559026c8f779be17b4c9d8e4dfc14bead6592241de4d6612f77769327f7f, 100471238800000000000" \
--unlock "0x209c205f333b5a65cc428589a51bd9f2621e2fc01de1b02dbf8c0f0b68e4974e" \
--unlock "0x0edb559026c8f779be17b4c9d8e4dfc14bead6592241de4d6612f77769327f7f" \
--port 7545 \
--hostname localhost \
--seed '0x209c205f333b5a65cc428589a51bd9f2621e2fc01de1b02dbf8c0f0b68e4974e' \
--debug true \
--mem true \
--mnemonic 'end sleep vote expire arctic magic crack wrap toddler lizard acoustic owner' \
--db './db/chain_database' \
--verbose \
--networkId=3 \
--gasLimit=7984452 \
--gasPrice=20000000000;
So I just changed --gasLimit=7984452 \
to --gasLimit=8000000 \
and it migrated successfully.
Describe the bug
when I run 'yarn start' command, ERROR display as follow:
/Users/geeker/workspace/DeFi/mstable.org/mStable-app/src/components/forms/TransactionForm/FormProvider.tsx
TypeScript error in /Users/geeker/workspace/DeFi/mstable.org/mStable-app/src/components/forms/TransactionForm/FormProvider.tsx(35,30):
Type 'TIface' does not satisfy the constraint 'Interfaces'.
Type 'unknown' is not assignable to type 'Interfaces'. TS2344
33 | interface Dispatch<TState> {
34 | setManifest<TIface extends any, TFn extends any>(
35 | manifest: SendTxManifest<TIface, TFn> | null,
| ^
36 | ): void;
37 | submitStart(): void;
38 | submitEnd(): void;
Expected behavior
NO ERROR
Desktop (please complete the following information):
When running yarn codegen
I get the following error:
ts-gen: ๐ All done! Generated files: 207
$ graphql-codegen --config ./codegen.yml -r dotenv/config
โ Parse configuration
โฏ Generate outputs
โ Generate ./src/graphql/mstable/schema.graphql
โ Generate ./src/graphql/uniswap/schema.graphql
โ Generate ./src/graphql/balancer/schema.graphql
โ Generate ./src/graphql/blocks/schema.graphql
โ Generate ./src/graphql/mstable.tsx
โ Generate ./src/graphql/uniswap.tsx
โฏ Generate ./src/graphql/balancer.tsx
โ Load GraphQL schemas
โ Load GraphQL documents
โ Generate
โ at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:40:3
โ Generate ./src/graphql/blocks.tsx
โ Generate ./src/graphql/scripts.tsx
Found 1 error
โ ./src/graphql/balancer.tsx
AggregateError:
GraphQLDocumentError: Cannot query field "totalSwapVolume" on type "Pool".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:4:3
GraphQLDocumentError: Unknown type "TokenPrice".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:16:31
GraphQLDocumentError: Cannot query field "tokenPrices" on type "Query".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:34:3
GraphQLDocumentError: Cannot query field "tokenPrice" on type "Query".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:40:3
at Object.checkValidationErrors (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-toolkit/common/index.cjs.js:451:15)
at Object.codegen (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/core/index.cjs.js:99:16)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async process (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/cli/bin.js:829:56)
at async Promise.all (index 0)
at async /home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/cli/bin.js:836:37
at async Task.task (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/cli/bin.js:618:17)
AggregateError:
GraphQLDocumentError: Cannot query field "totalSwapVolume" on type "Pool".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:4:3
GraphQLDocumentError: Unknown type "TokenPrice".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:16:31
GraphQLDocumentError: Cannot query field "tokenPrices" on type "Query".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:34:3
GraphQLDocumentError: Cannot query field "tokenPrice" on type "Query".
at /home/gus/Projects/mstable/mStable-app/src/graphql/balancer/query.graphql:40:3
at Object.checkValidationErrors (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-toolkit/common/index.cjs.js:451:15)
at Object.codegen (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/core/index.cjs.js:99:16)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async process (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/cli/bin.js:829:56)
at async Promise.all (index 0)
at async /home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/cli/bin.js:836:37
at async Task.task (/home/gus/Projects/mstable/mStable-app/node_modules/@graphql-codegen/cli/bin.js:618:17)
Something went wrong
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I've cloned the project and followed the instructions
I don't know much abount GraphQL, so I didnt go far with this issue
Thanks in advance
Describe the bug
Unable to run yarn codegen
without error
To Reproduce
Steps to reproduce the behavior:
yarn codegen
step, it generates this errorrts-gen: ๐ All done! Generated files: 211
$ graphql-codegen --config ./codegen.yml -r dotenv/config
โ Parse configuration
โ Invalid Codegen Configuration!
Generate outputs
Invalid Codegen Configuration!
Please make sure that your codegen config file contains either the "schema" field
or every generated file has its own "schema" field.
It should looks like that:
schema:
- my-schema.graphql
or:
generates:
path/to/output:
schema: my-schema.graphql
Error: Invalid Codegen Configuration!
at normalize (/Users/ls/code/src/ltfschoen/mStable-app/node_modules/@graphql-codegen/cli/bin.js:712:19)
at Task.task (/Users/ls/code/src/ltfschoen/mStable-app/node_modules/@graphql-codegen/cli/bin.js:729:21)
at Promise.resolve.then.then.skipped (/Users/ls/code/src/ltfschoen/mStable-app/node_modules/listr/lib/task.js:167:30)
Invalid Codegen Configuration!
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Expected behavior
Expect it to run yarn codegen
without error
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
A sub-set users wish to MINT or REDEEM to a recipient address, rather than having it returned to the sender.
Describe the solution you'd like
Implement a non-intrusive way for users to specify and select a recipient in the MINT and REDEEM pages.
Given that it is only for a sub set of users, it should not clog the page up, but be more of an advanced feature.
This should allow any MINT or REDEEM to be redirected to a given recipient. The function already exists on the mStable-contracts to do this.
Bonus points
Additional context
This should:
Feel free to reach out to the team for any further information.
Is your feature request related to a problem? Please describe.
As an LP in EARN, I wish to see:
Describe the solution you'd like
On the EARN page, I wish to see the total value of my LP tokens (BPT, UNI-V2) from all pools (1), with a breakdown of the amount of money I have in each pool. I also wish to see my % of the assets in the pool (see screenshot from Zapper.fi) e.g. 1500 mUSD && 20 MTA (2)
This could be added as an extra column(s) in the 'Your pools' section, or you could modify the 'Your pools' columns completely, or simply add some new data at the top of the EARN page.
I also wish to see a running counter, for all the MTA I have earned since I started staking, across all pools (3).
(3) Might be challenging. Have a go - and if it is too difficult to accumulate the results then let us know
Additional context
To get the total MTA earned per pool, you can simply add up all the 'claimed' events from the subgraph. You then add the total claimed, to the unclaimed rewards (see https://github.com/mstable/mStable-app/blob/master/src/components/pages/Earn/StakingRewardsContractProvider.tsx#L58)
Interested in working with mStable? Check out our dApp developer role
NOTE - this is particularly challenging because of how hard it is to test and develop in a test environment. If using Ropsten, beware of the mix-match between the different versions of the ERC20 tokens used by the different protocols
Is your feature request related to a problem? Please describe.
Users might want mUSD
but not have any bAsset available to mint with. If the user just has ETH, then we should support this on the MINT
page by first buying the required bAsset and then minting with it.
Describe the solution you'd like
A new function on the MINT
page to support minting with ETH. This would be seperate from the current 'advanced' implementation and help us start to support a 'lite' and easy method of allowing users to MINT. Make this easy for the user while retaining existing functionality.
The functionality at a high level is:
Step 1: User chooses that they want to mint with ETH
Step 2: Purchase required bAsset with ETH
Step 3: Mint with the bAsset
There are many ways this could be implemented.. here are two:
mStable-contracts
repoBonus points
Optimise the overall cost to the user to provide them with the cheapest mint
Additional context
It might and probably would be cheaper just to purchase mUSD on the third party exchange instead of buying ETH. This is not always guaranteed to be cheaper though. The benefit to minting is that it helps grow the mUSD token. If you choose to go down the path of just purchasing mUSD on a third party exchange, justify it here.
Feel free to reach out to the team for any further information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.