tilt: algorand changes for 3.16.2 (#3114)

* Changes for 3.16.2 Tilt / Devnet.

* Updated constants in test file

* modified python script to 3.16.2

* More AppID Changes.

* Found more AppIds to replace.

* testApp fixed to 1008.
This commit is contained in:
Hernán Di Pietro 2023-06-28 12:37:41 -03:00 committed by GitHub
parent 716d78a53d
commit fd37be7199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 31 additions and 26 deletions

View File

@ -274,7 +274,7 @@ def build_node_yaml():
if algorand:
container["command"] += [
"--algorandAppID",
"4",
"1004",
"--algorandIndexerRPC",
"http://algorand:8980",
"--algorandIndexerToken",

View File

@ -27,7 +27,7 @@ to switch to sandbox, change devnet/node.yaml
put into dev/node.yaml
- --algorandAppID
- "4"
- "1004"
Install the algorand requirements

View File

@ -1412,9 +1412,9 @@ class PortalCore:
self.INDEXER_ADDRESS = "https://mainnet-idx.algonode.cloud"
self.coreid = 842125965
self.tokenid = 842126029
if self.args.coreid != 4:
if self.args.coreid != 1004:
self.coreid = self.args.coreid
if self.args.tokenid != 6:
if self.args.tokenid != 1006:
self.tokenid = self.args.tokenid
def setup_args(self) -> None:
@ -1442,8 +1442,8 @@ class PortalCore:
parser.add_argument('--token_approve', type=str, help='token approve teal', default="teal/token_approve.teal")
parser.add_argument('--token_clear', type=str, help='token clear teal', default="teal/token_clear.teal")
parser.add_argument('--coreid', type=int, help='core contract', default=4)
parser.add_argument('--tokenid', type=int, help='token bridge contract', default=6)
parser.add_argument('--coreid', type=int, help='core contract', default=1004)
parser.add_argument('--tokenid', type=int, help='token bridge contract', default=1006)
parser.add_argument('--devnet', action='store_true', help='setup devnet')
parser.add_argument('--boot', action='store_true', help='bootstrap')
parser.add_argument('--upgradePayload', action='store_true', help='gen the upgrade payload for the guardians to sign')

View File

@ -57,6 +57,6 @@ export const WORMHOLE_CONFIG_TESTNET: WormholeConfig = {
tokenBridgeAppId: BigInt("86525641")
}
export const WORMHOLE_CONFIG_DEVNET: WormholeConfig = {
coreBridgeAppId: BigInt("4"),
tokenBridgeAppId: BigInt("6")
coreBridgeAppId: BigInt("1004"),
tokenBridgeAppId: BigInt("1006")
}

View File

@ -10,7 +10,7 @@ fi
sed -i -e 's@export ALGOD_URL=""@export ALGOD_URL="https://github.com/algorand/go-algorand"@' \
-e 's/export ALGOD_CHANNEL="stable"/export ALGOD_CHANNEL=""/' \
-e 's/export ALGOD_BRANCH=""/export ALGOD_BRANCH="v3.9.2-stable"/' \
-e 's/export ALGOD_BRANCH=""/export ALGOD_BRANCH="v3.16.2-stable"/' \
-e 's/export INDEXER_ENABLE_ALL_PARAMETERS="false"/export INDEXER_ENABLE_ALL_PARAMETERS="true"/' _sandbox/config.dev
cd _sandbox

View File

@ -39,7 +39,7 @@ COPY . /tmp
RUN /tmp/images/algod/install.sh \
-d "${BIN_DIR}" \
-u "https://github.com/algorand/go-algorand" \
-b "v3.12.2-stable" \
-b "v3.16.2-stable" \
-s ""
# Configure network

View File

@ -519,8 +519,8 @@ class AlgoTest(PortalCore):
seq = int(time.time())
self.coreid = 4
self.tokenid = 6
self.coreid = 1004
self.tokenid = 1006
player = self.getTemporaryAccount(client)

View File

@ -447,10 +447,10 @@ class AlgoTest(PortalCore):
player2 = self.getTemporaryAccount(client)
player3 = self.getTemporaryAccount(client)
self.coreid = 4
self.coreid = 1004
print("coreid = " + str(self.coreid))
self.tokenid = 6
self.tokenid = 1006
print("token bridge " + str(self.tokenid) + " address " + get_application_address(self.tokenid))
self.testid = self.createTestApp(client, player2)

View File

@ -9,6 +9,7 @@ import {
uint8ArrayToHex,
toChainName,
getOriginalAssetAlgorand,
CONTRACTS
} from "@certusone/wormhole-sdk";
export async function getNativeAlgoAddress(
@ -45,7 +46,7 @@ async function firstTransaction() {
port = 443;
token = "";
} else {
appid = 6;
appid = CONTRACTS["DEVNET"].algorand.token_bridge;
algodToken =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
algodServer = "http://localhost";

View File

@ -1,5 +1,9 @@
const algosdk = require("@certusone/wormhole-sdk/node_modules/algosdk");
import {
CONTRACTS
} from "@certusone/wormhole-sdk";
import { calcLogicSigAccount } from "@certusone/wormhole-sdk/lib/cjs/algorand";
export async function getNativeAlgoAddress(
@ -36,7 +40,7 @@ async function firstTransaction() {
port = 443;
token = "";
} else {
appid = 6;
appid = CONTRACTS["DEVNET"].algorand.token_bridge;
algodToken =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
algodServer = "http://localhost";

View File

@ -127,7 +127,7 @@ spec:
# - --terra2Contract
# - terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au
# - --algorandAppID
# - "4"
# - "1004"
# - --algorandIndexerRPC
# - http://algorand:8980
# - --algorandIndexerToken

View File

@ -147,7 +147,7 @@
},
"8": {
"contracts": {
"tokenBridgeEmitterAddress": "8edf5b0e108c3a1a0a4b704cc89591f2ad8d50df24e991567e640ed720a94be2"
"tokenBridgeEmitterAddress": "8ec299cb7f3efec28f542397e07f07118d74c875f85409ed8e6b93c17b60e992"
}
},
"15": {

View File

@ -14,7 +14,7 @@ var knownDevnetTokenbridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDEthereum: "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16",
vaa.ChainIDTerra: "000000000000000000000000784999135aaa8a3ca5914468852fdddbddd8789d",
vaa.ChainIDBSC: "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16",
vaa.ChainIDAlgorand: "8edf5b0e108c3a1a0a4b704cc89591f2ad8d50df24e991567e640ed720a94be2",
vaa.ChainIDAlgorand: "8ec299cb7f3efec28f542397e07f07118d74c875f85409ed8e6b93c17b60e992",
vaa.ChainIDWormchain: "0000000000000000000000001711cd63b2c545ee6545415d3cc0bda6425c43c4",
vaa.ChainIDSui: "be8d2e6809d4873bcf1d8be6af2b92500091ad6aa5dc76bc717af86a58d300ca",
}

View File

@ -19,8 +19,8 @@ import {
} from "./testHelpers";
import { PopulateData, TmplSig } from "../TmplSig";
const CORE_ID = BigInt(4);
const TOKEN_BRIDGE_ID = BigInt(6);
const CORE_ID = BigInt(1004);
const TOKEN_BRIDGE_ID = BigInt(1006);
jest.setTimeout(60000);

View File

@ -58,8 +58,8 @@ import {
WORMHOLE_RPC_HOSTS,
} from "./utils/consts";
const CORE_ID = BigInt(4);
const TOKEN_BRIDGE_ID = BigInt(6);
const CORE_ID = BigInt(1004);
const TOKEN_BRIDGE_ID = BigInt(1006);
jest.setTimeout(60000);
@ -976,7 +976,7 @@ describe("Algorand tests", () => {
const algoWallet: Account = tempAccts[0];
const Fee: number = 0;
var testapp: number = 8;
var testapp: number = 1008;
var dest = utils
.hexZeroPad(BigNumber.from(testapp).toHexString(), 32)
.substring(2);

View File

@ -477,8 +477,8 @@ const DEVNET = {
nft_bridge: undefined,
},
algorand: {
core: "4",
token_bridge: "6",
core: "1004",
token_bridge: "1006",
nft_bridge: undefined,
},
aurora: {