Skip to content

Commit a28654a

Browse files
chore: revert export c example
1 parent 7ffea49 commit a28654a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/c-chain/export.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ import { evmapi } from '../chain_apis';
77
import { getEnvVars } from '../utils/getEnvVars';
88

99
const main = async () => {
10-
const { AVAX_PUBLIC_URL, C_CHAIN_ADDRESS, PRIVATE_KEY, P_CHAIN_ADDRESS } =
10+
const { AVAX_PUBLIC_URL, C_CHAIN_ADDRESS, PRIVATE_KEY, X_CHAIN_ADDRESS } =
1111
getEnvVars();
1212

1313
const provider = new JsonRpcProvider(AVAX_PUBLIC_URL + '/ext/bc/C/rpc');
1414

1515
const context = await getContextFromURI(AVAX_PUBLIC_URL);
1616
const txCount = await provider.getTransactionCount(C_CHAIN_ADDRESS);
1717
const baseFee = await evmapi.getBaseFee();
18-
const pAddressBytes = bech32ToBytes(P_CHAIN_ADDRESS);
18+
const xAddressBytes = bech32ToBytes(X_CHAIN_ADDRESS);
1919

2020
const tx = newExportTxFromBaseFee(
2121
context,
2222
baseFee / BigInt(1e9),
2323
BigInt(0.1 * 1e9),
24-
context.pBlockchainID,
24+
context.xBlockchainID,
2525
hexToBuffer(C_CHAIN_ADDRESS),
26-
[pAddressBytes],
26+
[xAddressBytes],
2727
BigInt(txCount),
2828
);
2929

0 commit comments

Comments
 (0)