Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.3
3.6.0
5 changes: 3 additions & 2 deletions cli/src/commands/deployment-new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Flow:
* 1. Pre-flight: by default, clean tree + release tag at HEAD (strict).
* 2. Pick a network (mainnet | testnet | devnet | localnet | custom).
* 2. Pick a network (mainnet | testnet | devnet | localnet | shelbynet | custom).
* 3. Generate (or import) the admin keypair.
* 4. Fund the admin (manual prompt for testnet/mainnet, faucet for dev/local).
* 5. Optional Geomi inputs (shared-node API key, gas-station API key).
Expand Down Expand Up @@ -49,11 +49,12 @@ import {
} from '../deploy-contracts.js';
import { CLI } from '../cli-name.js';

const NETWORKS: { name: 'mainnet' | 'testnet' | 'devnet' | 'localnet' | 'shelby-private-beta' | 'custom'; rpcUrl?: string; faucet?: string }[] = [
const NETWORKS: { name: 'mainnet' | 'testnet' | 'devnet' | 'localnet' | 'shelbynet' | 'shelby-private-beta' | 'custom'; rpcUrl?: string; faucet?: string }[] = [
{ name: 'mainnet', rpcUrl: 'https://api.mainnet.aptoslabs.com/v1' },
{ name: 'testnet', rpcUrl: 'https://api.testnet.aptoslabs.com/v1' },
{ name: 'devnet', rpcUrl: 'https://api.devnet.aptoslabs.com/v1', faucet: 'https://faucet.devnet.aptoslabs.com' },
{ name: 'localnet', rpcUrl: 'http://localhost:8080/v1', faucet: 'http://localhost:8081' },
{ name: 'shelbynet', rpcUrl: 'https://api.shelbynet.shelby.xyz/v1' },
{ name: 'shelby-private-beta' },
{ name: 'custom' },
];
Expand Down
1 change: 1 addition & 0 deletions cli/src/commands/loadtest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const DEFAULT_RPC: Record<string, string> = {
mainnet: 'https://api.mainnet.aptoslabs.com/v1',
devnet: 'https://api.devnet.aptoslabs.com/v1',
localnet: 'http://localhost:8080/v1',
shelbynet: 'https://api.shelbynet.shelby.xyz/v1',
};

const MODULE_NAME = 'acl';
Expand Down
5 changes: 4 additions & 1 deletion cli/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export interface ChainRpcOverrides {
aptosTestnetApikey?: string;
aptosLocalnetApi?: string;
aptosLocalnetApikey?: string;
aptosShelbynetApi?: string;
aptosShelbynetApikey?: string;
aptosShelbyPrivateBetaApi?: string;
aptosShelbyPrivateBetaApikey?: string;
solanaMainnetBetaRpc?: string;
Expand Down Expand Up @@ -81,7 +83,7 @@ export interface TrackedDeployment {
sharedNodeApiKey?: string;
gasStationApiKey?: string;
alias?: string;
/** One of `mainnet | testnet | devnet | localnet | shelby-private-beta | custom`. Tags the deployment for display. */
/** One of `mainnet | testnet | devnet | localnet | shelbynet | shelby-private-beta | custom`. Tags the deployment for display. */
network?: string;
/** Git tag (e.g. `v1.0.0`) at which the contracts were deployed; `deployment new` enforces strict tag+clean. */
deployedAtTag?: string;
Expand Down Expand Up @@ -159,6 +161,7 @@ export interface Config {

export function deriveRpcLabel(rpcUrl: string): string {
const url = rpcUrl.toLowerCase();
if (url.includes('shelbynet')) return 'shelbynet';
if (url.includes('shelby-private-beta')) return 'shelby-private-beta';
if (url.includes('mainnet')) return 'mainnet';
if (url.includes('testnet')) return 'testnet';
Expand Down
4 changes: 4 additions & 0 deletions cli/src/deployment-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const CHAIN_RPC_FLAGS: Record<string, keyof ChainRpcOverrides> = {
'aptos-testnet-apikey': 'aptosTestnetApikey',
'aptos-localnet-api': 'aptosLocalnetApi',
'aptos-localnet-apikey': 'aptosLocalnetApikey',
'aptos-shelbynet-api': 'aptosShelbynetApi',
'aptos-shelbynet-apikey': 'aptosShelbynetApikey',
'aptos-shelby-private-beta-api': 'aptosShelbyPrivateBetaApi',
'aptos-shelby-private-beta-apikey': 'aptosShelbyPrivateBetaApikey',
'solana-mainnet-beta-rpc': 'solanaMainnetBetaRpc',
Expand All @@ -76,13 +78,15 @@ const CHAIN_RPC_SECRET: Partial<Record<keyof ChainRpcOverrides, boolean>> = {
aptosMainnetApikey: true,
aptosTestnetApikey: true,
aptosLocalnetApikey: true,
aptosShelbynetApikey: true,
aptosShelbyPrivateBetaApikey: true,
};

const CHAIN_RPC_SECRET_ENVS: Partial<Record<keyof ChainRpcOverrides, string>> = {
aptosMainnetApikey: GCP_SECRET_ENV.aptosMainnetApiKey,
aptosTestnetApikey: GCP_SECRET_ENV.aptosTestnetApiKey,
aptosLocalnetApikey: GCP_SECRET_ENV.aptosLocalnetApiKey,
aptosShelbynetApikey: GCP_SECRET_ENV.aptosShelbynetApiKey,
aptosShelbyPrivateBetaApikey: GCP_SECRET_ENV.aptosShelbyPrivateBetaApiKey,
};

Expand Down
2 changes: 1 addition & 1 deletion cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const loadtestCmd = program.command('loadtest').description('Constant-rate load
loadtestCmd
.command('setup')
.description('Generate a test account, wait for faucet funding, deploy the loadtest-acl Move contract. Idempotent per --network.')
.option('--network <name>', 'Network name (testnet | mainnet | devnet | localnet | shelby-private-beta)', 'testnet')
.option('--network <name>', 'Network name (testnet | mainnet | devnet | localnet | shelbynet | shelby-private-beta)', 'testnet')
.option('--rpc-url <url>', 'Override the default RPC URL for this network')
.action(async (opts: { network?: string; rpcUrl?: string }) => {
try {
Expand Down
2 changes: 2 additions & 0 deletions cli/src/node-schemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ const CHAIN_RPC_PLACEHOLDERS: Record<keyof ChainRpcOverrides, string> = {
aptosTestnetApikey: 'AG-yourkey...',
aptosLocalnetApi: 'http://127.0.0.1:8080/v1',
aptosLocalnetApikey: 'AG-yourkey...',
aptosShelbynetApi: 'https://api.shelbynet.shelby.xyz/v1',
aptosShelbynetApikey: 'AG-yourkey...',
aptosShelbyPrivateBetaApi: 'https://<your-shelby-private-beta-fullnode>/v1',
aptosShelbyPrivateBetaApikey: 'AG-yourkey...',
solanaMainnetBetaRpc: 'https://api.mainnet-beta.solana.com',
Expand Down
20 changes: 15 additions & 5 deletions cli/src/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const CHAIN_DEFAULTS = {
aptosMainnet: 'https://api.mainnet.aptoslabs.com/v1',
aptosTestnet: 'https://api.testnet.aptoslabs.com/v1',
aptosLocalnet: 'http://127.0.0.1:8080/v1',
aptosShelbynet: 'https://api.shelbynet.shelby.xyz/v1',
aptosShelbyPrivateBeta: '',
solanaMainnetBeta: 'https://api.mainnet-beta.solana.com',
solanaTestnet: 'https://api.testnet.solana.com',
Expand All @@ -65,6 +66,8 @@ const CHAIN_RPC_KEYS = [
'aptosTestnetApikey',
'aptosLocalnetApi',
'aptosLocalnetApikey',
'aptosShelbynetApi',
'aptosShelbynetApikey',
'aptosShelbyPrivateBetaApi',
'aptosShelbyPrivateBetaApikey',
'solanaMainnetBetaRpc',
Expand Down Expand Up @@ -143,7 +146,7 @@ export function rpcUrlsNeedVpcEgress(chainRpc?: ChainRpcOverrides): boolean {
if (!chainRpc) return false;
const urls = [
chainRpc.aptosMainnetApi, chainRpc.aptosTestnetApi, chainRpc.aptosLocalnetApi,
chainRpc.aptosShelbyPrivateBetaApi,
chainRpc.aptosShelbynetApi, chainRpc.aptosShelbyPrivateBetaApi,
chainRpc.solanaMainnetBetaRpc, chainRpc.solanaTestnetRpc, chainRpc.solanaDevnetRpc,
].filter((u): u is string => typeof u === 'string' && u.length > 0);
return urls.some(isPrivateRpcUrl);
Expand Down Expand Up @@ -185,6 +188,7 @@ export const GCP_SECRET_ENV = {
aptosMainnetApiKey: 'ACE_APTOS_MAINNET_APIKEY',
aptosTestnetApiKey: 'ACE_APTOS_TESTNET_APIKEY',
aptosLocalnetApiKey: 'ACE_APTOS_LOCALNET_APIKEY',
aptosShelbynetApiKey: 'ACE_APTOS_SHELBYNET_APIKEY',
aptosShelbyPrivateBetaApiKey: 'ACE_APTOS_SHELBY_PRIVATE_BETA_APIKEY',
} as const;

Expand Down Expand Up @@ -235,6 +239,7 @@ function runtimeConfigJson(
...(chainRpc?.aptosMainnetApikey ? { aptosMainnetApiKey: chainRpc.aptosMainnetApikey } : {}),
...(chainRpc?.aptosTestnetApikey ? { aptosTestnetApiKey: chainRpc.aptosTestnetApikey } : {}),
...(chainRpc?.aptosLocalnetApikey ? { aptosLocalnetApiKey: chainRpc.aptosLocalnetApikey } : {}),
...(chainRpc?.aptosShelbynetApikey ? { aptosShelbynetApiKey: chainRpc.aptosShelbynetApikey } : {}),
...(chainRpc?.aptosShelbyPrivateBetaApikey ? { aptosShelbyPrivateBetaApiKey: chainRpc.aptosShelbyPrivateBetaApikey } : {}),
};
return JSON.stringify(cfg);
Expand Down Expand Up @@ -561,6 +566,8 @@ function chainRpcArgs(r?: ChainRpcOverrides, opts: { includeSecrets?: boolean }
...(includeSecrets ? f('--aptos-testnet-apikey=', r.aptosTestnetApikey) : []),
...f('--aptos-localnet-api=', r.aptosLocalnetApi),
...(includeSecrets ? f('--aptos-localnet-apikey=', r.aptosLocalnetApikey) : []),
...f('--aptos-shelbynet-api=', r.aptosShelbynetApi),
...(includeSecrets ? f('--aptos-shelbynet-apikey=', r.aptosShelbynetApikey) : []),
...f('--aptos-shelby-private-beta-api=', r.aptosShelbyPrivateBetaApi),
...(includeSecrets ? f('--aptos-shelby-private-beta-apikey=', r.aptosShelbyPrivateBetaApikey) : []),
...f('--solana-mainnet-beta-rpc=', r.solanaMainnetBetaRpc),
Expand Down Expand Up @@ -595,6 +602,8 @@ export async function promptChainRpcOverrides(
aptosTestnetApikey: await askKey('Aptos testnet API key', current?.aptosTestnetApikey),
aptosLocalnetApi: await askUrl('Aptos localnet API URL', CHAIN_DEFAULTS.aptosLocalnet, current?.aptosLocalnetApi),
aptosLocalnetApikey: await askKey('Aptos localnet API key', current?.aptosLocalnetApikey),
aptosShelbynetApi: await askUrl('Aptos shelbynet API URL', CHAIN_DEFAULTS.aptosShelbynet, current?.aptosShelbynetApi),
aptosShelbynetApikey: await askKey('Aptos shelbynet API key', current?.aptosShelbynetApikey),
aptosShelbyPrivateBetaApi: await askUrl('Aptos shelby-private-beta API URL', CHAIN_DEFAULTS.aptosShelbyPrivateBeta, current?.aptosShelbyPrivateBetaApi),
aptosShelbyPrivateBetaApikey: await askKey('Aptos shelby-private-beta API key', current?.aptosShelbyPrivateBetaApikey),
solanaMainnetBetaRpc: await askUrl('Solana mainnet-beta RPC URL', CHAIN_DEFAULTS.solanaMainnetBeta, current?.solanaMainnetBetaRpc),
Expand Down Expand Up @@ -911,9 +920,9 @@ export async function runOnboarding(options: NodeNewOptions = {}): Promise<{ nod
const deployRunOpts = { stdout: options.json ? 'stderr' : 'inherit' } as const;
const network = detectAptosNetwork(net.rpcUrl);

if (nonInteractive && !gasStationKey && (network === 'testnet' || network === 'mainnet' || network === 'shelby-private-beta')) {
if (nonInteractive && !gasStationKey && (network === 'testnet' || network === 'mainnet' || network === 'shelbynet' || network === 'shelby-private-beta')) {
throw new Error(
'Non-interactive node new requires a gas station key for testnet/mainnet/shelby-private-beta because it generates a fresh account. ' +
'Non-interactive node new requires a gas station key for testnet/mainnet/shelbynet/shelby-private-beta because it generates a fresh account. ' +
'Pass --gas-station-key or use a deployment profile with gasStationApiKey.',
);
}
Expand Down Expand Up @@ -1054,8 +1063,9 @@ export async function runOnboarding(options: NodeNewOptions = {}): Promise<{ nod

const OCTAS_PER_APT = 100_000_000n;

function detectAptosNetwork(rpcUrl: string): 'localnet' | 'devnet' | 'testnet' | 'mainnet' | 'shelby-private-beta' | 'other' {
function detectAptosNetwork(rpcUrl: string): 'localnet' | 'devnet' | 'testnet' | 'mainnet' | 'shelbynet' | 'shelby-private-beta' | 'other' {
if (/localhost|127\.0\.0\.1/.test(rpcUrl)) return 'localnet';
if (/shelbynet/.test(rpcUrl)) return 'shelbynet';
if (/shelby-private-beta/.test(rpcUrl)) return 'shelby-private-beta';
if (/devnet\.aptoslabs\.com/.test(rpcUrl)) return 'devnet';
if (/testnet\.aptoslabs\.com/.test(rpcUrl)) return 'testnet';
Expand Down Expand Up @@ -1123,7 +1133,7 @@ export async function ensureAccountFunded(
return;
}

if (network !== 'testnet' && network !== 'mainnet' && network !== 'shelby-private-beta') return;
if (network !== 'testnet' && network !== 'mainnet' && network !== 'shelbynet' && network !== 'shelby-private-beta') return;

console.log();
if (network === 'testnet' && faucet) {
Expand Down
9 changes: 9 additions & 0 deletions ts-sdk/src/known-deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,13 @@ export const knownDeployments = {
ibeKeypairId: AccountAddress.fromString('0xbb83c1eb79580d9e23639fa28373047f64d2c8bd3526590d2d886cf91fb5a307'),
vrfKeypairId: AccountAddress.fromString('0x3ca79722e34031f87ef5be65890d2c12d742390a641d9b1f0333155eda67dd9d'),
}),
'shelby-beta-usce1': knownDeployment({
chainId: 125,
aceDeployment: new AceDeployment({
apiEndpoint: 'https://api.shelby-beta.teraswitch.aptosdev.com/v1',
contractAddr: AccountAddress.fromString('0x086f9a291d3d28140413505f6224d10e07cb6d6d08ab5933f62ff1b685830408'),
}),
ibeKeypairId: AccountAddress.fromString('0x50ca2eb86412416256522777770b9846ced2b0185db1d301f233d5f47215f4c3'),
vrfKeypairId: AccountAddress.fromString('0xf47b51b8c648a3dd53a1c0ec5d38e2b861f0b6d4c3181f0b84b0d535e274a98d'),
}),
} as const;
7 changes: 4 additions & 3 deletions worker-components/network-node/src/http_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
//! or a BCS `ThresholdVrfShare` for tVRF.
//!
//! Every request emits one JSON-formatted log line tagged with
//! `kind=ACE_REQUEST_HANDLING_SUMMARY`.
//! `message=ACE_REQUEST_HANDLING_SUMMARY` and
//! `event_name=ACE_REQUEST_HANDLING_SUMMARY`.

mod flows;
mod outcome;
mod request;
mod serve;
mod shares;
mod status;
mod state;
mod status;

#[cfg(test)]
mod tests;
Expand All @@ -28,8 +29,8 @@ mod tests_support;
pub use self::serve::{
run_secrets_admin_server, run_secrets_server, run_user_admin_server, run_user_server,
};
pub use self::state::{AppState, SecretsServerState};
pub use self::status::{
chain_rpc_dependency_targets, DependencyTarget, NodeStatus, PublicNodeConfig,
PublicServerConfig,
};
pub use self::state::{AppState, SecretsServerState};
35 changes: 33 additions & 2 deletions worker-components/network-node/src/http_server/outcome/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ use axum::http::StatusCode;
use serde_json::json;
use uuid::Uuid;

use super::{fields::add_optional_fields, Flow, Outcome, RequestContext};
use super::{fields::add_optional_fields, Flow, Outcome, Reason, RequestContext};
use crate::now_utc_iso;

const REQUEST_HANDLING_SUMMARY_EVENT: &str = "ACE_REQUEST_HANDLING_SUMMARY";

pub(crate) fn new_handling_session_id() -> String {
Uuid::new_v4().to_string()
}
Expand All @@ -31,6 +33,9 @@ pub(crate) fn finish_response(
Outcome::Rejected { reason, detail } => {
log["result"] = json!(reason.result_label());
log["reason"] = json!(reason.label());
if matches!(reason, Reason::Internal) {
log["level"] = json!("error");
}
if let Some(d) = detail {
log["detail"] = json!(d);
}
Expand All @@ -43,11 +48,37 @@ pub(crate) fn finish_response(
fn base_log(id: String, start: Instant, ctx: &RequestContext) -> serde_json::Value {
let mut log = json!({
"ts": now_utc_iso(),
"kind": "ACE_REQUEST_HANDLING_SUMMARY",
"level": "info",
"message": REQUEST_HANDLING_SUMMARY_EVENT,
"event_name": REQUEST_HANDLING_SUMMARY_EVENT,
"handling_session_id": id,
"flow": ctx.flow.unwrap_or(Flow::Unknown).label(),
"elapsed_ms": start.elapsed().as_millis() as u64,
});
add_optional_fields(&mut log, ctx);
log
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn summary_log_uses_humio_friendly_fields() {
let ctx = RequestContext {
flow: Some(Flow::Custom),
keypair_short: Some("50ca2eb8".to_string()),
..Default::default()
};

let log = base_log("test-session".to_string(), Instant::now(), &ctx);

assert_eq!(log["message"], REQUEST_HANDLING_SUMMARY_EVENT);
assert_eq!(log["event_name"], REQUEST_HANDLING_SUMMARY_EVENT);
assert_eq!(log["level"], "info");
assert_eq!(log["handling_session_id"], "test-session");
assert_eq!(log["flow"], "custom");
assert_eq!(log["keypair"], "50ca2eb8");
assert!(log.get("kind").is_none());
}
}
1 change: 1 addition & 0 deletions worker-components/network-node/src/http_server/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ mod tests {
aptos_mainnet: rpc("mainnet"),
aptos_testnet: rpc("testnet"),
aptos_localnet: rpc("localnet"),
aptos_shelbynet: rpc("shelbynet"),
aptos_shelby_private_beta: Some(rpc("shelby")),
solana_mainnet_beta: "https://solana-mainnet.example".to_string(),
solana_testnet: "https://solana-testnet.example".to_string(),
Expand Down
1 change: 1 addition & 0 deletions worker-components/network-node/src/http_server/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ pub fn chain_rpc_dependency_targets(chain_rpc: &ChainRpcConfig) -> Vec<Dependenc
DependencyTarget::aptos("aptos_mainnet_api", chain_rpc.aptos_mainnet.clone(), Some(1)),
DependencyTarget::aptos("aptos_testnet_api", chain_rpc.aptos_testnet.clone(), Some(2)),
DependencyTarget::aptos("aptos_localnet_api", chain_rpc.aptos_localnet.clone(), Some(4)),
DependencyTarget::aptos("aptos_shelbynet_api", chain_rpc.aptos_shelbynet.clone(), Some(114)),
];
if let Some(rpc) = &chain_rpc.aptos_shelby_private_beta {
deps.push(DependencyTarget::aptos(
Expand Down
12 changes: 12 additions & 0 deletions worker-components/network-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub struct ChainRpcConfig {
pub aptos_mainnet: AptosRpc, // chain_id=1
pub aptos_testnet: AptosRpc, // chain_id=2
pub aptos_localnet: AptosRpc, // chain_id=4
pub aptos_shelbynet: AptosRpc, // chain_id=114
pub aptos_shelby_private_beta: Option<AptosRpc>, // chain_id=125
pub solana_mainnet_beta: String,
pub solana_testnet: String,
Expand All @@ -85,6 +86,7 @@ impl ChainRpcConfig {
1 => Ok(&self.aptos_mainnet),
2 => Ok(&self.aptos_testnet),
4 => Ok(&self.aptos_localnet),
114 => Ok(&self.aptos_shelbynet),
125 => self.aptos_shelby_private_beta.as_ref().ok_or_else(|| {
anyhow!(
"no Aptos RPC configured for chain_id 125 (shelby-private-beta); \
Expand Down Expand Up @@ -747,6 +749,7 @@ mod tests {
aptos_mainnet: rpc("mainnet"),
aptos_testnet: rpc("testnet"),
aptos_localnet: rpc("localnet"),
aptos_shelbynet: rpc("shelbynet"),
aptos_shelby_private_beta: Some(rpc("shelby")),
solana_mainnet_beta: "https://solana-mainnet.example".to_string(),
solana_testnet: "https://solana-testnet.example".to_string(),
Expand All @@ -765,6 +768,15 @@ mod tests {
assert!(cfg.aptos_rpc_for_chain_id(139).is_err());
}

#[test]
fn shelbynet_uses_chain_id_114() {
let cfg = chain_rpc_config();
assert_eq!(
cfg.aptos_rpc_for_chain_id(114).unwrap().base_url,
"https://shelbynet.example/v1"
);
}

#[test]
fn admin_status_port_uses_reserved_offset() {
assert_eq!(admin_status_port(8080), Some(9080));
Expand Down
14 changes: 14 additions & 0 deletions worker-components/network-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ struct RunArgs {
aptos_localnet_api: String,
#[arg(long)]
aptos_localnet_apikey: Option<String>,
#[arg(long, default_value = "https://api.shelbynet.shelby.xyz/v1")]
aptos_shelbynet_api: String,
#[arg(long)]
aptos_shelbynet_apikey: Option<String>,
#[arg(long)]
aptos_shelby_private_beta_api: Option<String>,
#[arg(long)]
Expand All @@ -121,6 +125,7 @@ struct EnvConfig {
aptos_mainnet_api_key: Option<String>,
aptos_testnet_api_key: Option<String>,
aptos_localnet_api_key: Option<String>,
aptos_shelbynet_api_key: Option<String>,
aptos_shelby_private_beta_api_key: Option<String>,
}

Expand Down Expand Up @@ -185,6 +190,11 @@ impl RunArgs {
"ACE_APTOS_LOCALNET_APIKEY",
cfg.aptos_localnet_api_key.clone(),
);
self.aptos_shelbynet_apikey = option_or_env_or_config(
self.aptos_shelbynet_apikey,
"ACE_APTOS_SHELBYNET_APIKEY",
cfg.aptos_shelbynet_api_key.clone(),
);
self.aptos_shelby_private_beta_apikey = option_or_env_or_config(
self.aptos_shelby_private_beta_apikey,
"ACE_APTOS_SHELBY_PRIVATE_BETA_APIKEY",
Expand Down Expand Up @@ -226,6 +236,10 @@ fn build_chain_rpc(args: &RunArgs) -> network_node::ChainRpcConfig {
args.aptos_localnet_api.clone(),
args.aptos_localnet_apikey.clone(),
),
aptos_shelbynet: AptosRpc::new_with_key(
args.aptos_shelbynet_api.clone(),
args.aptos_shelbynet_apikey.clone(),
),
aptos_shelby_private_beta: args.aptos_shelby_private_beta_api.as_ref().map(|api| {
AptosRpc::new_with_key(api.clone(), args.aptos_shelby_private_beta_apikey.clone())
}),
Expand Down
Loading