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

Support both L1 and L2 contract interfaces #2204

Merged
merged 6 commits into from
Jan 24, 2022

Conversation

leszko
Copy link
Contributor

@leszko leszko commented Jan 24, 2022

What does this pull request do? Explain your changes. (required)
Use different WithdrawFee contract protocol depending if L1 or L2 is used.

The context for this change is that we have a slight difference in the protocols deployed in L1 (mainnet, rinkeby) and L2 (Arbitrum).

Specific updates (required)
N/A

How did you test each of these updates (required)

  1. Rinkeby
./livepeer   -network rinkeby   -ethUrl <RINKEBY_INFRURA_URL>   -orchestrator -transcoder   -currentManifest -pricePerUnit
$ curl http://localhost:7935/orchestratorEarningPoolsForRound?round=45
{"TotalStake":0,"TranscoderRewardCut":0,"TranscoderFeeShare":0,"CumulativeRewardFactor":0,"CumulativeFeeFactor":0}

Withdraw Fees from the client results in

E0124 17:43:22.790598   98098 handlers.go:38] HTTP Response Error 500: could not execute WithdrawFees: execution reverted: no fees to withdraw
  1. Arbitrum Test Rinkeby
./livepeer -network arbitrum-one-rinkeby -ethController 0xb709f13ed04a5D8BAd7389504e4f35a68cb6580e -ethUrl https://rinkeby.arbitrum.io/rpc -orchestrator -transcoder -pricePerUnit 0 -ethAcctAddr 0x7E71B5087bc14abd6aF3Bbe2d87Ea0ADC14Ce56F -serviceAddr 127.0.0.1:8935
$ curl http://localhost:7935/orchestratorEarningPoolsForRound?round=45
{"TotalStake":0,"TranscoderRewardCut":0,"TranscoderFeeShare":0,"CumulativeRewardFactor":0,"CumulativeFeeFactor":0}

WithdrawFees called from Livepeer CLI results in.

******************************Eth Transaction******************************

Invoking transaction: "withdrawFees". Inputs: "_recipient: 0x7E71B5087bc14abd6aF3Bbe2d87Ea0ADC14Ce56F  _amount: 0"  Hash: "0x43f2ef05bdd6c9e5128c7ad1293d9560baeb127324c706e553cb04b2fd94a301". 

***************************************************************************

Does this pull request close any open issues?
fix https://github.com/livepeer/internal-project-tracking/issues/301

Checklist:

@leszko leszko requested a review from yondonfu January 24, 2022 16:54
Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Will push a small change to remove unnecessary line.


mux.HandleFunc("/claimEarnings", func(w http.ResponseWriter, r *http.Request) {
s.LivepeerNode.Database.ChainID()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed.

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

Successfully merging this pull request may close these issues.

None yet

2 participants