truffle deploy --network baobab를 이용해 deploy를 하려고 하면 다음과 같은 에러가 발생합니다.
$ truffle deploy --network baobab
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
/Users/tempus157/Desktop/TestContract/contracts/node_modules/truffle/build/webpack:/packages/provider/index.js:56
throw new Error(errorMessage);
^
Error: There was a timeout while attempting to connect to the network.
Check to see that your provider is valid.
If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
at Timeout._onTimeout (/Users/tempus157/Desktop/TestContract/contracts/node_modules/truffle/build/webpack:/packages/provider/index.js:56:1)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)
truffle-config.js는 다음과 같습니다.
require("dotenv").config();
require("ts-node").register({ files: true });
const Provider = require("truffle-hdwallet-provider-klaytn");
const env = {
privateKey: process.env.PRIVATE_KEY,
baobabEn: process.env.BAOBAB_EN,
};
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*",
gas: 80_000_000,
},
baobab: {
provider: () => new Provider(env.privateKey, env.baobabEn),
network_id: "1001",
gas: "8500000",
gasPrice: null,
},
},
compilers: {
solc: {
version: "0.5.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "constantinople",
},
},
},
};
end.baobabEn은 http://(DigitalOcean ipv4):8551입니다. DigitalOcean 엔드포인트 노드의 kend.conf는 다음과 같습니다.
# Configuration file for the kend
# cypress, baobab is only available if you don't specify NETWORK_ID.
NETWORK="baobab"
# if you specify NETWORK_ID, a private network is created.
NETWORK_ID=
PORT=32323
SERVER_TYPE="fasthttp"
SYNCMODE="full"
VERBOSITY=3
MAXCONNECTIONS=10
# txpool options setting
TXPOOL_EXEC_SLOTS_ALL=4096
TXPOOL_NONEXEC_SLOTS_ALL=4096
TXPOOL_EXEC_SLOTS_ACCOUNT=4096
TXPOOL_NONEXEC_SLOTS_ACCOUNT=4096
TXPOOL_LIFE_TIME="30m"
# rpc options setting
RPC_ENABLE=1 # if this is set, the following options will be used
RPC_API="klay" # available apis: admin,debug,klay,miner,net,personal,rpc,txpool,web3
RPC_PORT=8551
RPC_ADDR="0.0.0.0"
RPC_CORSDOMAIN="*"
RPC_VHOSTS="*"
# ws options setting
WS_ENABLE=1 # if this is set, the following options will be used
WS_API="klay" # available apis: admin,debug,klay,miner,net,personal,rpc,txpool,web3
WS_ADDR="0.0.0.0"
WS_PORT=8552
WS_ORIGINS="*"
# service chain options setting
SC_MAIN_BRIDGE=0 # if this is set, the following options will be used.
SC_MAIN_BRIDGE_PORT=50505
SC_MAIN_BRIDGE_INDEXING=0 # this option will be deprecated.
# Setting 1 is to enable options, otherwise disabled.
AUTO_RESTART=0
METRICS=1
PROMETHEUS=1
DB_NO_PARALLEL_WRITE=0
MULTICHANNEL=1
SUBPORT=$((PORT + 1)) # used for multi channel option
# discover options
NO_DISCOVER=0 # setting 1 to disable discovery
BOOTNODES=""
# Raw options e.g) "--txpool.nolocals"
ADDITIONAL=""
DATA_DIR=~/kend/data
LOG_DIR=$DATA_DIR/logs
truffle-config.js에서 timeout을 999999로 놓고 해봐도 같은 현상이 일어납니다. 무엇이 잘못되었습니까?