I am trying to deploy contract on Testnet using nodeJs sdk and found this error
Error: getaddrinfo ENOTFOUND sdk-testnet.aepps.com
Following code is used to initiate sdk instance
const init = async () => {
const acc = MemoryAccount({ secretKey, publicKey });
const compilerUrl = "https://compiler.aepps.com";
const nodeInstance = await Node({ url: "https://sdk-testnet.aepps.com" });
const network = "test-net";
sdkInstance = await Ae({
compilerUrl,
nodes: [{ name: network, instance: nodeInstance }],
accounts: [acc],
});
};
Code to deploy contract -
const sampleContractSrc = fs.readFileSync(
path.resolve(__dirname, "./Contracts/Sample.aes"),
"utf-8"
);
let compiledContract = await sdkInstance.contractCompile(
sampleContractSrc
);
let callDataDeploy = await sdkInstance.contractEncodeCall(
sampleContractSrc,
"init",
[
"ak_11111111111111111111111111111111273Yts",
"ak_11111111111111111111111111111111273Yts",
]
);
let deployed = await sdkInstance.contractDeploy(
compiledContract.bytecode,
sampleContractSrc,
callDataDeploy
);