Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy staking contract on BSC mainnet for in-app stakingd #1813

Open
sync-by-unito bot opened this issue Jul 13, 2022 · 18 comments
Open

Deploy staking contract on BSC mainnet for in-app stakingd #1813

sync-by-unito bot opened this issue Jul 13, 2022 · 18 comments

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Jul 13, 2022

Goal: The investors can claim daily to prevent monthly sell pressures.

Request Spec

┆Issue is synchronized with this Asana task by Unito
┆Opened By: Tammy Yang
┆Link To Issue: https://app.asana.com/0/1201016280880500/1202241994518125

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Tammy Yang commented:

Yau-Wen Sheu I thought there was no progress of this task, right? I will move it to the next sprint

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

Tammy YangBofu Chen 現在我用我自己的錢包可以deploy了,但是用numbers testnet沒辦法 我先暫時用自己的錢包測試一下 後續再繼續解決

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

測試結果:

  • Before date A, users can send multiple requests : 可以,但是我只能執行一次approve,一次approve之後可以送好次transaction,但我沒辦法approve兩次。有時候轉入token的時候會有問題,不確定是不是safeTransferForm造成的

  • After date B, users (backend) can claim rewards and staked tokens:可以,但是claim的邏輯有點問題,我應該修復了,今天已經發訊息nonceblox確認

  • Can set

    • Days of the staking period:在部署合約時設定
    • Amount of total rewards:admin可以持續存入
    • Admin wallet:合約持有人
  • Can query

    • [optional] How much rewards each user can received:無法,但是可以查詢放入stake token數量跟reward對應關係(代表user如果記得自己丟多少token就可以知道自己可以拿多少reward)
    • How many participants:無法,沒有function可以取得這個資訊
  • Backend (with user private key) can interact with the contract for the user for the following actions

    • Send the tokens:目前測試ok,但是有時候會無法,還沒找到原因
    • Get tokens and rewards back:OK

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Bofu Chen commented:

Yau-Wen Sheu (cc James Chien) My Polygon config used in another NFT project

 polygon: {
 url: "https://polygon-rpc.com/ ( https://polygon-rpc.com/ )",
 chainId: 137,
 accounts: config.networks.polygon.accounts,
 /* custom fields */
 contract: "0xb7ccc262d322D1dC1c64CBB56A6827589b4bC874",
 explorer: "https://polygonscan.com/ ( https://polygonscan.com/ )",
 },
 mumbai: {
 url: "https://rpc-mumbai.maticvigil.com/ ( https://rpc-mumbai.maticvigil.com/ )",
 chainId: 80001,
 accounts: config.networks.mumbai.accounts,
 /* custom fields */
 contract: "0xfbeA33fe2b266697404Dc5D1dC0A4ee9D0eDED23",
 explorer: "https://mumbai.polygonscan.com/ ( https://mumbai.polygonscan.com/ )",
 },

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

更新:
大部分問題是我理解錯誤,那基本上就是合約本身無法query有多少人參與跟直接取得某個user的reward,但如果backend有存參與的user以及每個user存入多少token,就可以達成

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Bofu Chen commented:

Yau-Wen Sheu 若原因是對方提供的說明文件不足,再麻煩你請對方提供使用說明文件

我們是客戶付費買服務,若要自己追 source code 才能了解如何使用,是不合理的

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

Bofu Chen 好 我跟對方講一下

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

Bofu Chen 他們感覺也不知道哪裡出問題,目前應該要先使用另一個wallet去deploy並且送測還是我們直接提供測試wallet給他們(不知道numbers testnet有沒有什麼危險的資訊)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

Bofu Chen 如果要送測可能要討論一下QA的流程,是我這邊建立一個staking讓QA去操作,還是我寫一個script讓QA從deploy staking 開始
但是前提都是QA會操作hardhat project (應該會?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Bofu Chen commented:

daily sync 的結論是做一個 testing wallet 後分享給 Nonceblox

由於還有問題尚未釐清,先讓 Nonceblox 解決,Wallfe 確認都沒問題後,我們再討論如何請 QA 測試

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Bofu Chen commented:

Yau-Wen Sheu 再麻煩把 numdev-testnet wallet 遇到的問題整理在這裡後,建一個新的 testing wallet 送測

QA 目前不會操作 Hardhat,我的想法是

  1. Waffle 錄一個短片,說明 unit tests 會測試哪些情境
  2. Waffle 確認 QA 理解所有測試情境
  3. QA 若提可能出問題、但未被 unit test 涵蓋的情境,Waffle 協助撰寫 unit tests
  4. 重複 2 - 3 直到 QA 沒有問題,即通過測試

Yau-Wen SheuScott Yan 看你們是否有其他建議

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

Bofu Chen 我ok

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Yau-Wen Sheu commented:

numbers-testnet 問題:
transaction會發不出去,也不會有error,就是pending在那邊

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 13, 2022

➤ Bofu Chen commented:

目前正在進行 explore API 與 subnet,先延後到下週

@sync-by-unito sync-by-unito bot changed the title Deploy staking contract on BSC mainnet Deploy staking contract on BSC mainnet for in-app staking Jul 13, 2022
@sync-by-unito sync-by-unito bot changed the title Deploy staking contract on BSC mainnet for in-app staking Deploy staking contract on BSC mainnet for in-app stakingd Jul 18, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 18, 2022

➤ Bofu Chen commented:

同上並暫時將此 task 放至 sprint 07.21

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jul 18, 2022

➤ Tammy Yang commented:

Remove from sprint for now as it is for sprint 22.08.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant