cryptnox-sdk-esp32 1.0.0
ESP32 SDK for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
config.template.h File Reference
#include <stdint.h>
Include dependency graph for config.template.h:

Go to the source code of this file.

Macros

#define WIFI_SSID   "<YOUR_SSID>"
#define WIFI_PASSWORD   "<YOUR_PASSWORD>"
#define RPC_HOST   "ethereum-sepolia-rpc.publicnode.com"
#define RPC_PORT   443
#define RPC_URL   "https://" RPC_HOST
#define CARD_PIN   "<CARD_PIN>" /* 4-9 digit PIN, e.g. "000000000" */
#define CARD_PIN_LEN   (9U) /* number of digits in CARD_PIN */
#define ADDR_FROM   "<SENDER_ADDRESS>"
#define ADDR_TO   "<RECIPIENT_ADDRESS>"
#define ADDR_USDC   "<USDC_CONTRACT_ADDRESS>"
#define CHAIN_ID_SEPOLIA   11155111
#define AMOUNT_USDC   1000000UL /* 1.0 USDC */
#define MAX_PRIORITY_FEE   2000000000ULL /* 2 Gwei */
#define MAX_FEE   4000000000ULL /* 4 Gwei */
#define GAS_LIMIT_ERC20   60000ULL

Macro Definition Documentation

◆ ADDR_FROM

#define ADDR_FROM   "<SENDER_ADDRESS>"
Examples
UsdcSigning/main/main.cpp.

Definition at line 62 of file config.template.h.

Referenced by app_main().

◆ ADDR_TO

#define ADDR_TO   "<RECIPIENT_ADDRESS>"
Examples
UsdcSigning/main/main.cpp.

Definition at line 65 of file config.template.h.

Referenced by signing_loop().

◆ ADDR_USDC

#define ADDR_USDC   "<USDC_CONTRACT_ADDRESS>"
Examples
UsdcSigning/main/main.cpp.

Definition at line 68 of file config.template.h.

Referenced by signing_loop().

◆ AMOUNT_USDC

#define AMOUNT_USDC   1000000UL /* 1.0 USDC */
Examples
UsdcSigning/main/main.cpp.

Definition at line 76 of file config.template.h.

Referenced by signing_loop().

◆ CARD_PIN

#define CARD_PIN   "<CARD_PIN>" /* 4-9 digit PIN, e.g. "000000000" */

⚠️ NEVER COMMIT config.h — it contains credentials. Add config.h to .gitignore.

Examples
UsdcSigning/main/main.cpp.

Definition at line 55 of file config.template.h.

Referenced by signing_loop().

◆ CARD_PIN_LEN

#define CARD_PIN_LEN   (9U) /* number of digits in CARD_PIN */
Examples
UsdcSigning/main/main.cpp.

Definition at line 56 of file config.template.h.

Referenced by signing_loop().

◆ CHAIN_ID_SEPOLIA

#define CHAIN_ID_SEPOLIA   11155111
Examples
UsdcSigning/main/main.cpp.

Definition at line 73 of file config.template.h.

Referenced by signing_loop().

◆ GAS_LIMIT_ERC20

#define GAS_LIMIT_ERC20   60000ULL
Examples
UsdcSigning/main/main.cpp.

Definition at line 81 of file config.template.h.

Referenced by signing_loop().

◆ MAX_FEE

#define MAX_FEE   4000000000ULL /* 4 Gwei */
Examples
UsdcSigning/main/main.cpp.

Definition at line 80 of file config.template.h.

Referenced by signing_loop().

◆ MAX_PRIORITY_FEE

#define MAX_PRIORITY_FEE   2000000000ULL /* 2 Gwei */
Examples
UsdcSigning/main/main.cpp.

Definition at line 79 of file config.template.h.

Referenced by signing_loop().

◆ RPC_HOST

#define RPC_HOST   "ethereum-sepolia-rpc.publicnode.com"

Choose ONE provider below and comment out the other.

Option A — PublicNode (free, no account required) Uncomment the three lines under "Option A".

Option B — Infura (requires a free account at app.infura.io)

  1. Create an API key in the Infura dashboard.
  2. In the key's Settings tab, reveal (or generate) the API Secret.
  3. Uncomment the four lines under "Option B" and fill in the values. Note: the API Secret must have NO leading or trailing spaces.

Definition at line 34 of file config.template.h.

◆ RPC_PORT

#define RPC_PORT   443

Definition at line 35 of file config.template.h.

◆ RPC_URL

#define RPC_URL   "https://" RPC_HOST
Examples
UsdcSigning/main/main.cpp.

Definition at line 36 of file config.template.h.

Referenced by app_main().

◆ WIFI_PASSWORD

#define WIFI_PASSWORD   "<YOUR_PASSWORD>"

Definition at line 15 of file config.template.h.

◆ WIFI_SSID

#define WIFI_SSID   "<YOUR_SSID>"

Definition at line 14 of file config.template.h.