Skip to content

Commit

Permalink
removed legacy gauntlet
Browse files Browse the repository at this point in the history
  • Loading branch information
chray-zhang committed Dec 3, 2024
1 parent 98784d1 commit 4eacd4b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 273 deletions.
165 changes: 0 additions & 165 deletions integration-tests/common/gauntlet_common.go

This file was deleted.

108 changes: 0 additions & 108 deletions ops/gauntlet/gauntlet_starknet.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,30 +94,6 @@ func (sg *StarknetGauntlet) InstallDependencies() error {
return nil
}

func (sg *StarknetGauntlet) DeployAccountContract(salt int64, pubKey string) (string, error) {
_, err := sg.G.ExecCommand([]string{"account:deploy", fmt.Sprintf("--salt=%d", salt), fmt.Sprintf("--publicKey=%s", pubKey)}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) DeployLinkTokenContract() (string, error) {
_, err := sg.G.ExecCommand([]string{"token:deploy", "--link"}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) MintLinkToken(token, to, amount string) (string, error) {
_, err := sg.G.ExecCommand([]string{"token:mint", fmt.Sprintf("--recipient=%s", to), fmt.Sprintf("--amount=%s", amount), token}, *sg.options)
if err != nil {
Expand All @@ -129,87 +105,3 @@ func (sg *StarknetGauntlet) MintLinkToken(token, to, amount string) (string, err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) TransferToken(token, to, amount string) (string, error) {
_, err := sg.G.ExecCommand([]string{"token:transfer", fmt.Sprintf("--recipient=%s", to), fmt.Sprintf("--amount=%s", amount), token}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) DeployOCR2ControllerContract(minSubmissionValue int64, maxSubmissionValue int64, decimals int, name string, linkTokenAddress string) (string, error) {
_, err := sg.G.ExecCommand([]string{"ocr2:deploy", fmt.Sprintf("--minSubmissionValue=%d", minSubmissionValue), fmt.Sprintf("--maxSubmissionValue=%d", maxSubmissionValue), fmt.Sprintf("--decimals=%d", decimals), fmt.Sprintf("--name=%s", name), fmt.Sprintf("--link=%s", linkTokenAddress)}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) DeployAccessControllerContract() (string, error) {
_, err := sg.G.ExecCommand([]string{"access_controller:deploy"}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) DeployOCR2ProxyContract(aggregator string) (string, error) {
_, err := sg.G.ExecCommand([]string{"proxy:deploy", fmt.Sprintf("--address=%s", aggregator)}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) SetOCRBilling(observationPaymentGjuels int64, transmissionPaymentGjuels int64, ocrAddress string) (string, error) {
_, err := sg.G.ExecCommand([]string{"ocr2:set_billing", fmt.Sprintf("--observationPaymentGjuels=%d", observationPaymentGjuels), fmt.Sprintf("--transmissionPaymentGjuels=%d", transmissionPaymentGjuels), ocrAddress}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) SetConfigDetails(cfg string, ocrAddress string) (string, error) {
_, err := sg.G.ExecCommand([]string{"ocr2:set_config", "--input=" + cfg, ocrAddress}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

func (sg *StarknetGauntlet) AddAccess(aggregator, address string) (string, error) {
_, err := sg.G.ExecCommand([]string{"ocr2:add_access", fmt.Sprintf("--address=%s", address), aggregator}, *sg.options)
if err != nil {
return "", err
}
sg.gr, err = sg.FetchGauntletJSONOutput()
if err != nil {
return "", err
}
return sg.gr.Responses[0].Contract, nil
}

0 comments on commit 4eacd4b

Please sign in to comment.