안녕하세요 eth에서 배포했던 컨트랙트를 klaytn으로 마이그레이션을 하려는 개발자입니다.
klaytn docs에 나와있는데로 truffle 설정 후 kas에서 발급받은 baobab url로 truffle deploy --network kasBaobab을 실행하면 아래와 같은 에러가 발생합니다.
Error: When requesting the chain id from the node, itreturned the malformed result undefined.
혹시 원인을 알 수 있을까요?
truffle 설정은 아래와 같이 docs에 나와있는 내용을 그대로 사용했습니다.
kasBaobab: {
provider: () => {
const option = {
headers: [
{
name: "Authorization",
value:
"Basic " +
Buffer.from(accessKeyId + ":" + secretAccessKey).toString(
"base64"
),
},
{ name: "x-chain-id", value: "1001" },
],
keepAlive: false,
};
return new HDWalletProvider(
mnemonic,
new Caver.providers.HttpProvider(
"https://node-api.klaytnapi.com/v1/klaytn",
option
)
);
},
network_id: "1001", //Klaytn baobab testnet's network id
gas: "8500000",
gasPrice: "25000000000",
},