Skip to content

Commit

Permalink
address PR comment on add-teleporter
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Aug 20, 2024
1 parent 51870ba commit c4c111b
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions interchain/icm/icm.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ import (
)

const (
releaseURL = "https://github.com/ava-labs/teleporter/releases/download/%s/"
messengerContractAddressURLFmt = releaseURL + "/TeleporterMessenger_Contract_Address_%s.txt"
messengerDeployerAddressURLFmt = releaseURL + "/TeleporterMessenger_Deployer_Address_%s.txt"
messengerDeployerTxURLFmt = releaseURL + "/TeleporterMessenger_Deployment_Transaction_%s.txt"
registryBytecodeURLFmt = releaseURL + "/TeleporterRegistry_Bytecode_%s.txt"
messengerContractAddressURLFmt = "TeleporterMessenger_Contract_Address_%s.txt"
messengerDeployerAddressURLFmt = "TeleporterMessenger_Deployer_Address_%s.txt"
messengerDeployerTxURLFmt = "TeleporterMessenger_Deployment_Transaction_%s.txt"
registryBytecodeURLFmt = "TeleporterRegistry_Bytecode_%s.txt"
)

var (
Expand All @@ -33,10 +32,30 @@ func GetLatestVersion() (string, error) {
}

func getURLs(version string) (string, string, string, string) {
messengerContractAddressURL := fmt.Sprintf(messengerContractAddressURLFmt, version, version)
messengerDeployerAddressURL := fmt.Sprintf(messengerDeployerAddressURLFmt, version, version)
messengerDeployerTxURL := fmt.Sprintf(messengerDeployerTxURLFmt, version, version)
registryBytecodeURL := fmt.Sprintf(registryBytecodeURLFmt, version, version)
messengerContractAddressURL := utils.GetGithubReleaseAssetURL(
constants.AvaLabsOrg,
constants.ICMRepoName,
version,
fmt.Sprintf(messengerContractAddressURLFmt, version),
)
messengerDeployerAddressURL := utils.GetGithubReleaseAssetURL(
constants.AvaLabsOrg,
constants.ICMRepoName,
version,
fmt.Sprintf(messengerDeployerAddressURLFmt, version),
)
messengerDeployerTxURL := utils.GetGithubReleaseAssetURL(
constants.AvaLabsOrg,
constants.ICMRepoName,
version,
fmt.Sprintf(messengerDeployerTxURLFmt, version),
)
registryBytecodeURL := utils.GetGithubReleaseAssetURL(
constants.AvaLabsOrg,
constants.ICMRepoName,
version,
fmt.Sprintf(registryBytecodeURLFmt, version),
)
return messengerContractAddressURL, messengerDeployerAddressURL, messengerDeployerTxURL, registryBytecodeURL
}

Expand Down

0 comments on commit c4c111b

Please sign in to comment.