Skip to content

Commit

Permalink
Merge branch 'main' into joel/wormchain-v0.47.12
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmith-2019 committed Feb 14, 2025
2 parents 05a8319 + 9f152c8 commit 568101f
Show file tree
Hide file tree
Showing 21 changed files with 2,124 additions and 1,561 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

## Governor

/node/pkg/governor/ @claudijd @SEJeff @djb15 @johnsaigle
/node/pkg/governor/ @SEJeff @djb15 @johnsaigle @mdulin2 @pleasew8t

## Gateway Relayer

Expand Down Expand Up @@ -91,7 +91,7 @@
## Hacks / Tools

/node/hack/ @bruce-riley @panoel @evan-gray
/node/hack/governor @claudijd @SEJeff @djb15 @johnsaigle
/node/hack/governor @SEJeff @djb15 @johnsaigle @mdulin2 @pleasew8t

## Documentation

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wormchain-icts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
matrix:
# names of `make` commands to run tests
test:
- "ictest-cancel-upgrade"
- "ictest-upgrade"
- "ictest-wormchain"
- "ictest-validator-hotswap"
- "ictest-upgrade"
- "ictest-cancel-upgrade"
- "ictest-slashing-params-update-vaa"
- "ictest-cw-wormhole"
fail-fast: false

Expand Down
4 changes: 2 additions & 2 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,9 @@ func runNode(cmd *cobra.Command, args []string) {
*blastContract = checkEvmArgs(logger, *blastRPC, *blastContract, "blast", true)
*xlayerContract = checkEvmArgs(logger, *xlayerRPC, *xlayerContract, "xlayer", true)
*lineaContract = checkEvmArgs(logger, *lineaRPC, *lineaContract, "linea", true)
*berachainContract = checkEvmArgs(logger, *berachainRPC, *berachainContract, "berachain", false)
*berachainContract = checkEvmArgs(logger, *berachainRPC, *berachainContract, "berachain", true)
*snaxchainContract = checkEvmArgs(logger, *snaxchainRPC, *snaxchainContract, "snaxchain", true)
*unichainContract = checkEvmArgs(logger, *unichainRPC, *unichainContract, "unichain", false)
*unichainContract = checkEvmArgs(logger, *unichainRPC, *unichainContract, "unichain", true)
*worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", true)
*inkContract = checkEvmArgs(logger, *inkRPC, *inkContract, "ink", false)
*hyperEvmContract = checkEvmArgs(logger, *hyperEvmRPC, *hyperEvmContract, "hyperEvm", false)
Expand Down
18 changes: 10 additions & 8 deletions node/hack/governor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const expectedUSDDepeggs = [
"13-000000000000000000000000754288077d0ff82af7a5317c7cb8c444d421d103-oUSDC", // Orbit bridge Klatyn USDC, depegged since December 2023
"13-000000000000000000000000cee8faf64bb97a73bb51e115aa89c17ffa8dd167-oUSDT", // Orbit bridge Klatyn USDT, depegged since December 2023
"16-000000000000000000000000ffffffff52c56a9257bb97f4b2b6f7b2d624ecda-xcaUSD", // Acala USD being converted to aSEED, dead token
"1-689ac099ef657e5d3b7efaf1e36ab8b897e2746232d8a9261b3e49b35c1dead4-xUSD", // Synthetic USD is inactive and deactivated
]

const axios = require("axios");
Expand Down Expand Up @@ -203,7 +204,7 @@ axios

// If the character list is violated, then skip the coin. The error is logged in the function if something happens to have some sort of check on it.
if(!(safetyCheck(chain, wormholeAddr, data.Symbol, data.CoinGeckoId, data.TokenDecimals, data.TokenPrice, data.Address, notional))){
failedInputValidationTokens.push(chain + "-" + wormholeAddr + "-" + data.symbol)
failedInputValidationTokens.push(chain + "-" + wormholeAddr + "-" + data.symbol + " (https://www.coingecko.com/en/coins/" + data.CoinGeckoId + ")")
continue;
}
}
Expand All @@ -215,14 +216,14 @@ axios
var uniqueIdentifier = chain + "-" + wormholeAddr + "-" + data.Symbol;
// Skip tokens that are not expected to be pegged to $1
if (!expectedUSDDepeggs.includes(uniqueIdentifier)) {
depeggedUSDStablecoins.push(uniqueIdentifier + " = " + data.TokenPrice);
depeggedUSDStablecoins.push(uniqueIdentifier + " = " + data.TokenPrice + " (https://www.coingecko.com/en/coins/" + data.CoinGeckoId + ")");
}
}
}

// This is a new token
if (existingTokenPrices[chain] == undefined || existingTokenPrices[chain][wormholeAddr] == undefined) {
addedTokens.push(chain + "-" + wormholeAddr + "-" + data.Symbol);
addedTokens.push(chain + "-" + wormholeAddr + "-" + data.Symbol + " (https://www.coingecko.com/en/coins/" + data.CoinGeckoId + ")");
}
// This is an existing token
else {
Expand All @@ -234,7 +235,8 @@ axios
token: chain + "-" + wormholeAddr + "-" + data.Symbol,
previousPrice: previousPrice,
newPrice: data.TokenPrice,
percentageChange: "-" + (100 - (data.TokenPrice / previousPrice) * 100).toFixed(1).toString()
percentageChange: "-" + (100 - (data.TokenPrice / previousPrice) * 100).toFixed(1).toString(),
url: "https://www.coingecko.com/en/coins/" + data.CoinGeckoId
});
}

Expand Down Expand Up @@ -274,7 +276,7 @@ axios

// We add in the "=" character to ensure an undefined symbol
// does not mess up the removed tokens logic
newTokenKeys[chain + "-" + wormholeAddr] = "=" + data.Symbol;
newTokenKeys[chain + "-" + wormholeAddr] = ["=" + data.Symbol, data.CoinGeckoId];
newTokensCount += 1;
}
}
Expand All @@ -287,12 +289,12 @@ axios
var tokenParts = token.split("-");
var newTokenSymbol = newTokenKeys[tokenParts[0] + "-" + tokenParts[1]];
if (!newTokenSymbol) {
removedTokens.push(token);
removedTokens.push(token + " (https://www.coingecko.com/en/coins/" + newTokenSymbol[1] + ")");
}
// The token symbol has changed
// We take a substring of the symbol to cut the "=" character we added above
else if (tokenParts[0] + "-" + tokenParts[1] + "-" + newTokenSymbol.substring(1) != token) {
changedSymbols.push(token + "->" + newTokenSymbol.substring(1));
else if (tokenParts[0] + "-" + tokenParts[1] + "-" + newTokenSymbol[0].substring(1) != token) {
changedSymbols.push(token + "->" + newTokenSymbol[0].substring(1) + " (https://www.coingecko.com/en/coins/" + newTokenSymbol[1] + ")");
}
}

Expand Down
4 changes: 4 additions & 0 deletions node/hack/repair_eth/repair_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ var etherscanAPIMap = map[vaa.ChainID]string{
vaa.ChainIDMantle: "", // TODO: Does Mantle have an etherscan equivalent API endpoint?
vaa.ChainIDBlast: "https://api.blastscan.io",
vaa.ChainIDXLayer: "", // TODO: Does X Layer have an etherscan API endpoint?
vaa.ChainIDBerachain: "https://api.berascan.com/",
vaa.ChainIDUnichain: "", // TODO: Add Unichain once the public explorer is available.
vaa.ChainIDWorldchain: "https://api.worldscan.org",
}

Expand All @@ -73,6 +75,8 @@ var coreContractMap = map[vaa.ChainID]string{
vaa.ChainIDMantle: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDBlast: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDXLayer: strings.ToLower("0x194B123c5E96B9b2E49763619985790Dc241CAC0"),
vaa.ChainIDBerachain: strings.ToLower("0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"),
vaa.ChainIDUnichain: strings.ToLower("0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"),
vaa.ChainIDWorldchain: strings.ToLower("0xcbcEe4e081464A15d8Ad5f58BB493954421eB506"),
}

Expand Down
Loading

0 comments on commit 568101f

Please sign in to comment.