我被困在某一时刻。函数调用无法从 .env 文件中读取数据。
这是主文件:
public static void main(String[] args) throws HederaReceiptStatusException, TimeoutException, HederaPreCheckStatusException {
//Grab your Hedera testnet account ID and private key
AccountId myAccountId = AccountId.fromString(Dotenv.load().get("MY_ACCOUNT_ID"));
PrivateKey myPrivateKey = PrivateKey.fromString(Dotenv.load().get("MY_PRIVATE_KEY"));
......
这是.env
文件:
MY_ACCOUNT_ID=TESTNET ACCOUNT ID(0.0.1755600)
MY_PRIVATE_KEY=TESNET PRIVATE KEY(302e020100300506032b657004220420c802435424acd5c73733473532551277503ffd4dcccd1042fc657907828708a5)