GithubHelp home page GithubHelp logo

utils's Introduction

utils's People

Contributors

yasunorimatsuoka avatar kimurayu45z avatar senna46 avatar mkxultra avatar taro04 avatar kourin1996 avatar taiki1frsh avatar jununifi avatar nzk-ktl avatar tomosuke0930 avatar

Stargazers

Ace-go avatar  avatar  avatar  avatar  avatar  avatar  avatar Elsie Soriano  avatar  avatar tks avatar

Watchers

James Cloos avatar tks avatar  avatar

utils's Issues

faucetページの実装

@taro04

ローカル: http://localhost:4200/botany/faucet のページで(=リモート: http://a.test.jpyx.lcnem.net/jpyx/faucet のページで)、faucetのページを表示できるよう実装してください。

faucetの表示可否は、config.jsの中に適切なパラメーターを作って、制御してください。

Angular MaterialのUIパーツを組み合わせで実装してください。

以下必要な項目です。

  • アドレスの入力用インプットボックス ... 空白NGのバリデーション
  • ほしい数量の入力用インプットボックス(ubtc) ... 初期値10、最小値0、最大値10のバリデーション
  • ほしい数量の入力用インプットボックス(ujsmn) ... 初期値0、最小値0、最大値10のバリデーション ... まだ残高入れていないので、これはfaucetのAPIたたかないよう、しばらくは初期値0のままでデバッグお願いします。余力あれば、値を変更できないよう一時的に制御しておいてもらえると助かります。
  • ほしい数量の入力用インプットボックス(jpyx) ... 初期値0、最小値0、最大値10のバリデーション ... まだ残高入れていないので、これはfaucetのAPIたたかないよう、しばらくは初期値0のままでデバッグお願いします。余力あれば、値を変更できないよう一時的に制御しておいてもらえると助かります。
  • クリックするとフォームをsubmitできるボタン ... submitするとfaucetのAPIを以下のようにPOSTしてほしいです。フォームのアドレス値と、ほしい数量の入力に応じて、POSTするbodyを調整してほしいですが、しばらくはubtcだけでデバッグお願いします。バリデーションNGの場合、ボタンを非活性化してください。
$ curl -X POST -d '{"address": "jpyx10lcj22kzftvnduchatmnsnhfljeky5ghd398wt", "coins": ["10ubtc"]}' http://a.test.jpyx.lcnem.net:8000

# Response
{"transfers":[{"coin":"10ubtc","status":"ok"}]}

faucetのAPIの参考資料は以下となります。
https://github.com/tendermint/faucet

cosmoscan-extension jpyx で ng serveで画面が正常に表示されない

ローカルで ng serve --project cosmoscan-extension を実行して localhost:4200を表示すると以下のようなエラーが発生し、画面は空白となってしまう。

Failed to load resource: the server responded with a status of 404 (Not Found)
runtime.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
polyfills.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
main.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
localhost/:1 Refused to apply style from 'http://localhost:4200/botany/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
localhost/:1 Refused to apply style from 'http://localhost:4200/botany/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

ユーザーフレンドリーなエラーメッセージの実装

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

CDPに関して以下のような原因でトランザクションを実行できない場合があるのですが、全てStatus Code 400 or 500的なエラーになってしまい、ユーザーにとって何が問題なのか伝えることができていない現状があります。

  • 秘密鍵の入力ミス
  • 担保率不足状態になるトランザクションの試行
  • 残高不足
  • 手数料不足

Describe the solution you'd like
A clear and concise description of what you want to happen.

フォームやサービス等で適切にバリデーションやエラー通知を行えるように修正したいという内容になります。(CDPだけでなくAuctionについても本質的には同様の問題がありそうですが、現時点ではAirDropタスクにはなっていないので、優先度は若干低いと思っています。)

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

The implementation of docker-compose.yml of faucet

The current implementation is very tedious as you can see at projects/faucet/docker-compose.yml.

The problem is that it repeatedly mount the six volume for each faucet maybe because it uses ghcr.io/tendermint/faucet.

The goal is to make that file stylish to look better for us.

Private testnetのununifi-8-private-testでCDPが作れない

Private testnetのununifi-8-private-testでCDPが作れない
chain-id [ununifi-8-private-test]において、CDPを作ろうとしてSubmitボタンを押しても毎度以下のエラーを吐いて実行できない。
An error has occur: Tx simulation failed: Error: Request failed with status code 400

5つ以上アカウントを作り、Ubuntu, macos環境で試したが毎度同じ。

叩いているAPIが原因なのか、Chain側のエラーの可能性も含め究明に努め、見つけ次第Hotfixとして優先して取り掛かろうと思っている。

CDPのトランザクションが通らなかった場合でも成功メッセージが出る

CDPのトランザクションが通らなくても存在しないTx Hashが発行され、リダイレクトされる。

0ubtc担保、0jpyx発行のような極端な場合でも成功メッセージが表示される。

担保が少ない場合や2つ目のCDPを作成しようとしたときなどに発生。発生条件やエラーコードについては要検証。

Error Code 400 & 500

Withdraw and Clear return randomly 400 and 500 http status code

An error has occur: Tx simulation failed: Error: Request failed with status code 400

cosmoscan-extension内のjpyx, eurxビルド手順にconfig.jsをダウンロードするcurlコマンドの記述を追記

Created cdp is not shown in cdp list page

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

#229 (comment)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[優先度低]cdpの報酬に関する情報を表示する

@Senna46
CDPの報酬(=validator, delegatorとしての報酬とは全く別もの。JPYX固有の機能。cdpモジュールの管轄。)に関する情報を表示する。

以下URLのvalidatorに関する表示と同様の表示でよいが、最終的にこの情報を表示すべきURLはjpyx固有の機能としてbotanyレポジトリ内で実装すべきことに注意。
http://a.test.jpyx.lcnem.net/accounts/jpyx10lcj22kzftvnduchatmnsnhfljeky5ghd398wt

@kimurayu45z
違和感あればフォロー頂けると助かります。

FaucetのAPIリクエストがCORSで失敗する

ノード上にデプロイしてみたのですが、CORSエラーは変わらずという状況でした。(改めて冷静に考えたらドメインはそろっても、ポート番号が違うのでCORS扱いになってしまう?)
FaucetのCLIのオプション等でCORS許可するドメインやポート指定できないか?あるいはAngularの実装を何か間違えていないか等、確認してみます。

image

DockerイメージのビルドとDocker HubへのプッシュをGitHub Actions化

参考Issue
CauchyE/telescope#36

GitHub Actionsのymlファイルの参考
https://github.com/lcnem/cosmoscan/blob/main/.github/workflows/docker-cosmoscan.yml

以下のGitHub Actionsを、package.jsonのscriptsの中のコマンドや上記参考Issueや既に実装済のGitHub Actionsを参考に実装したいという認識です。ただし、contextとfileはpackage.json内の記述を参考に適宜反映お願いします。

  • lcnem/cosmoscan-jpyx ... docker-cosmoscan-jpyx.yml
  • lcnem/cosmoscan-eurx ... docker-cosmoscan-eurx.yml
  • lcnem/botany-pricefeed ... docker-botany-pricefeed.yml

The Deposit Collateral step is wrong

After completing the steps, the web page pops up with TxHash that needs to be recorded, and I made a record...  However, there is no record of this step when you look it up in your personal account (all other steps are there)

gitignore

projects/cosmoscan-extensionフォルダ内に.gitignoreを作って、

src/assets/config.jsを書く

pricefeedの書き込み先ブロックチェーンがテストネットの現バージョンと一致していないためcdpのcreateで価格情報が参照できずに失敗する

@kimurayu45z cc: @Senna46 @taro04

おそらく、.envファイルの中のchain-idの指定が、古いテストネットを指していて、それを現バージョンのテストネットのjpyx-3-testに書き換える必要があるのかな?と思っているのですが、他に何か注意すべき点があれば、ご指摘頂けると助かります。

ノードの動作がhost直結に変わったと思うので、RestURLの指定を.envファイルの中で変更したり、docker-compose.ymlの記述等見直す必要もある?

root@jpyx-test-a:~/jpyx# jpyxd tx cdp create-cdp 10ubtc 10jpyx ubtc-a --from main --chain-id jpyx-3-test
{"body":{"messages":[{"@type":"/botany.cdp.MsgCreateCdp","sender":"jpyx10lcj22kzftvnduchatmnsnhfljeky5ghd398wt","collateral":{"denom":"ubtc","amount":"10"},"principal":{"denom":"jpyx","amount":"10"},"collateral_type":"ubtc-a"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: y
{"height":"225727","txhash":"A19DA88A04CE343A22EA638C1E3AE6A32E99BEAFF44E6761081393FE0F483EFB","codespace":"cdp","code":19,"data":"","raw_log":"failed to execute message; message index: 0: ubtc: no price found for collateral","logs":[],"info":"","gas_wanted":"200000","gas_used":"48809","tx":null,"timestamp":""}

Claiming Test Tokens

While testing out the airdrop, I was unable to claim test tokens. It kept saying "failed". Please look into that.
image

Query param and selected account

Describe the bug

If the query parameter of the URL does not match the selected account, it will be rejected by the authentication of the private key.

To Reproduce

Steps to reproduce the behavior:

  1. Go to CDP
  2. Click on 'deposit'
  3. Pop up account select window
  4. select other account
  5. move Deposit page, enter amount & privatekey, then submit
  6. error

Expected behavior

Once you select an account, it doesn't change even if you change pages.(this is better because less operation )
Alternatively, change the query parameters when the account changes.

Screenshots

image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Error Code 400

Had this issue on the withdrawl function when I tried to use more gas than the default.

CDPページにdepositsが表示されない

Describe the bug
所持CDPのページにて、depositsが表示されない。
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to CDP
    http://a.test.ununifi.cauchye.net/ununifi/cdp/cdps/ununifi15rayjhf56y0lajhr6wgeqw5srdagvu4m43dgpj/ubtc-a

Expected behavior
depositした履歴が表示される。
(createした段階だと1件、追加でdepositすると2件のような動作と想定。)

※ざっと見た感じコンポーネントの実装は問題なさそうなので、client-ts側?

JPYX用の設定を含むcosmoscanのデバッグ方法を検討する

cosmoscanをノードが動作していない端末上でもデバッグ可能にすべきか否か?

  1. cosmoscanをノードが動作していない端末上でもデバッグできるようにする(変更必要)
  2. ノードが動作している端末上でcosmoscanを動作させてデバッグする(現状維持)

cosmoscanをノードが動作していない端末上でもデバッグできるようにする場合

  1. 方法は現時点ではイメージできていない

ノードが動作している端末上でcosmoscanを動作させてデバッグする場合

  1. ローカルでテストネットのノード、cosmoscan等一式を動作させてデバッグする ... cosmoscanの一部のファイルを誤ってJPYX用の設定を含めてコミットしてしまうミスが起こりやすい?
  2. 既にテストネットのノードが動作しているVPS上へcosmoscan, botany等のビルドが必要なリソースを展開し、VPS上でビルドしてデバッグする ... VPS上に繊細な情報が展開されることになり、セキュリティリスクが高い?

telescope修正反映

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

以下telescopeの修正をutilsに展開する必要があるかと思います。

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

9/12

リポジトリが乱立すると面倒なので、angular monorepo styleで、jpyx websiteと、eurx websiteと、いまから作るcosmoscanのjpyx,eurxのcdp用拡張をこのリポジトリにまとめてあります。projectsフォルダ以下に入っています。

まず、cosmoscan extensionの仕様ですが、

cosmoscanがhoge.comにホストされていたとすると、cosmoscan extensionがhoge.com/botany/にホストされるイメージです。
なぜこうするかというと、

  • cosmoscanはどんなSDK製ブロックチェーンにも対応できるプレーンなものであること
  • 同じドメインにホストすることで、indexeddbやブラウザ管理パスワードは流用できる

この二つの目的を同時に達成するためです。

このリポジトリにangular.jsonがありますが、そこでf5検索で"basehref"といれると、この仕掛けの方法の設定箇所もわかります。

こちらも、gitignoreされている中でのsr25519のコメントアウトが必要になると思うので、面倒ですがお願い致します。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.