Created
August 11, 2018 18:34
-
-
Save hgedia/1d75d88296a2ad39a7a8aba4cfba9626 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cmd/livepeer_cli/livepeer_cli.go b/cmd/livepeer_cli/livepeer_cli.go | |
| index 20059178..7d2f8fdd 100644 | |
| --- a/cmd/livepeer_cli/livepeer_cli.go | |
| +++ b/cmd/livepeer_cli/livepeer_cli.go | |
| @@ -109,6 +109,7 @@ func (w *wizard) initializeOptions() []wizardOpt { | |
| fmt.Print("For Rinkeby Eth, go to the Rinkeby faucet (https://faucet.rinkeby.io/).") | |
| w.read() | |
| }, testnet: true}, | |
| + {desc: "Register ENS subdomain", invoke: w.registerENSSubdomain}, | |
| } | |
| return options | |
| } | |
| diff --git a/eth/client.go b/eth/client.go | |
| index 05abcba4..8f0399a0 100644 | |
| --- a/eth/client.go | |
| +++ b/eth/client.go | |
| @@ -113,6 +113,9 @@ type LivepeerEthClient interface { | |
| VerificationCodeHash() (string, error) | |
| Paused() (bool, error) | |
| + //ENS | |
| + RegisterSubdomain(subDomain string) | |
| + | |
| // Events | |
| WatchForJob(string) (*lpTypes.Job, error) | |
| ProcessHistoricalUnbond(*big.Int, func(*contracts.BondingManagerUnbond) error) error | |
| @@ -885,6 +888,7 @@ func (c *client) ContractAddresses() map[string]ethcommon.Address { | |
| addrMap["BondingManager"] = c.bondingManagerAddr | |
| addrMap["Minter"] = c.minterAddr | |
| addrMap["Verifier"] = c.verifierAddr | |
| + //addrMap["Subdomainer"] = c.subdomainer | |
| return addrMap | |
| } | |
| @@ -972,6 +976,10 @@ func (c *client) ReplaceTransaction(tx *types.Transaction, method string, gasPri | |
| return newSignedTx, err | |
| } | |
| +func (c *client) RegisterSubdomain(subDomain string) error { | |
| + | |
| +} | |
| + | |
| // Watch for a new job matching the given streamId. | |
| // Since this job will be fresh, not all fields will be populated! | |
| // After receiving the job, validate the fields that are expected. | |
| diff --git a/server/webserver.go b/server/webserver.go | |
| index 60232f34..a0612855 100644 | |
| --- a/server/webserver.go | |
| +++ b/server/webserver.go | |
| @@ -145,6 +145,13 @@ func (s *LivepeerServer) StartWebserver() { | |
| } | |
| }) | |
| + //TODO : Implement tx | |
| + http.HandleFunc("/registerENSsubDomain", func(w http.ResponseWriter, r *http.Request) { | |
| + subDomain := r.FormValue("subDomain") | |
| + fmt.Printf("Subdomain to create is : %v", subDomain) | |
| + glog.Infof("Subdomain to create is : %v", subDomain) | |
| + }) | |
| + | |
| //Activate the transcoder on-chain. | |
| http.HandleFunc("/activateTranscoder", func(w http.ResponseWriter, r *http.Request) { | |
| t, err := s.LivepeerNode.Eth.GetTranscoder(s.LivepeerNode.Eth.Account().Address) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cmd/livepeer_cli/livepeer_cli.go b/cmd/livepeer_cli/livepeer_cli.go | |
| index 20059178..7d2f8fdd 100644 | |
| --- a/cmd/livepeer_cli/livepeer_cli.go | |
| +++ b/cmd/livepeer_cli/livepeer_cli.go | |
| @@ -109,6 +109,7 @@ func (w *wizard) initializeOptions() []wizardOpt { | |
| fmt.Print("For Rinkeby Eth, go to the Rinkeby faucet (https://faucet.rinkeby.io/).") | |
| w.read() | |
| }, testnet: true}, | |
| + {desc: "Register ENS subdomain", invoke: w.registerENSSubdomain}, | |
| } | |
| return options | |
| } | |
| diff --git a/eth/client.go b/eth/client.go | |
| index 05abcba4..8f0399a0 100644 | |
| --- a/eth/client.go | |
| +++ b/eth/client.go | |
| @@ -113,6 +113,9 @@ type LivepeerEthClient interface { | |
| VerificationCodeHash() (string, error) | |
| Paused() (bool, error) | |
| + //ENS | |
| + RegisterSubdomain(subDomain string) | |
| + | |
| // Events | |
| WatchForJob(string) (*lpTypes.Job, error) | |
| ProcessHistoricalUnbond(*big.Int, func(*contracts.BondingManagerUnbond) error) error | |
| @@ -885,6 +888,7 @@ func (c *client) ContractAddresses() map[string]ethcommon.Address { | |
| addrMap["BondingManager"] = c.bondingManagerAddr | |
| addrMap["Minter"] = c.minterAddr | |
| addrMap["Verifier"] = c.verifierAddr | |
| + //addrMap["Subdomainer"] = c.subdomainer | |
| return addrMap | |
| } | |
| @@ -972,6 +976,10 @@ func (c *client) ReplaceTransaction(tx *types.Transaction, method string, gasPri | |
| return newSignedTx, err | |
| } | |
| +func (c *client) RegisterSubdomain(subDomain string) error { | |
| + | |
| +} | |
| + | |
| // Watch for a new job matching the given streamId. | |
| // Since this job will be fresh, not all fields will be populated! | |
| // After receiving the job, validate the fields that are expected. | |
| diff --git a/server/webserver.go b/server/webserver.go | |
| index 60232f34..a0612855 100644 | |
| --- a/server/webserver.go | |
| +++ b/server/webserver.go | |
| @@ -145,6 +145,13 @@ func (s *LivepeerServer) StartWebserver() { | |
| } | |
| }) | |
| + //TODO : Implement tx | |
| + http.HandleFunc("/registerENSsubDomain", func(w http.ResponseWriter, r *http.Request) { | |
| + subDomain := r.FormValue("subDomain") | |
| + fmt.Printf("Subdomain to create is : %v", subDomain) | |
| + glog.Infof("Subdomain to create is : %v", subDomain) | |
| + }) | |
| + | |
| //Activate the transcoder on-chain. | |
| http.HandleFunc("/activateTranscoder", func(w http.ResponseWriter, r *http.Request) { | |
| t, err := s.LivepeerNode.Eth.GetTranscoder(s.LivepeerNode.Eth.Account().Address) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment