Skip to content

Commit

Permalink
use proper config payload for buidler
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcador committed Oct 14, 2020
1 parent 640bc38 commit e915d64
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions commands/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package commands
import (
"fmt"
"github.com/pkg/errors"
"github.com/tenderly/tenderly-cli/buidler"
"github.com/tenderly/tenderly-cli/openzeppelin"
"github.com/tenderly/tenderly-cli/providers"
"os"
"strings"
Expand All @@ -16,7 +14,6 @@ import (
"github.com/tenderly/tenderly-cli/config"
"github.com/tenderly/tenderly-cli/rest"
"github.com/tenderly/tenderly-cli/rest/payloads"
"github.com/tenderly/tenderly-cli/truffle"
"github.com/tenderly/tenderly-cli/userError"
)

Expand Down Expand Up @@ -119,20 +116,7 @@ func verifyContracts(rest *rest.Rest) error {

s.Start()

var configPayload *payloads.Config
if providerConfig.ConfigType == truffle.NewTruffleConfigFile && providerConfig.Compilers != nil {
configPayload = payloads.ParseNewTruffleConfig(providerConfig.Compilers)
} else if providerConfig.ConfigType == truffle.OldTruffleConfigFile {
if providerConfig.Solc != nil {
configPayload = payloads.ParseOldTruffleConfig(providerConfig.Solc)
} else if providerConfig.Compilers != nil {
configPayload = payloads.ParseNewTruffleConfig(providerConfig.Compilers)
}
} else if providerConfig.ConfigType == openzeppelin.OpenzeppelinConfigFile && providerConfig.Solc != nil {
configPayload = payloads.ParseOpenZeppelinConfig(providerConfig.Compilers)
} else if providerConfig.ConfigType == buidler.BuidlerConfigFile {
configPayload = payloads.ParseOpenZeppelinConfig(providerConfig.Compilers)
}
configPayload := GetConfigPayload(providerConfig)

response, err := rest.Contract.VerifyContracts(payloads.UploadContractsRequest{
Contracts: contracts,
Expand Down

0 comments on commit e915d64

Please sign in to comment.