npm install ethfs-uploader
Chain Name | Chain Short Name and Chain Id |
---|---|
Ethereum Mainnet | eth / 1 |
Goerli Testnet | gor / 5 |
Sepolia Testnet | sep / 11155111 |
Optimism | oeth / 10 |
Optimism Testnet | ogor / 420 |
Arbitrum One | arb1 / 42161 |
Arbitrum Nova | arb-nova / 42170 |
Arbitrum Testnet | arb-goerli / 421613 |
Web3Q Galileo Testnet | w3q-g / 3334 |
BNB Smart Chain | bnb / 56 |
BNB Smart Chain Testnet | bnbt / 97 |
Avalanche C-Chain | avax / 43114 |
Avalanche Fuji Testnet | fuji / 43113 |
Fantom Opera | ftm / 250 |
Fantom Testnet | tftm / 4002 |
Polygon Mainnet | matic / 137 |
Polygon Mumbai | maticmum / 80001 |
Polygon zkEVM Testnet | zkevmtest / 1402 |
QuarkChain Mainnet Shard 0 | qkc-s0 / 100001 |
QuarkChain Devnet Shard 0 | qkc-d-s0 / 110001 |
Harmony Mainnet Shard 0 | hmy-s0 / 1666600000 |
Harmony Testnet Shard 0 | hmy-b-s0 / 1666700000 |
Evmos | evmos / 9001 |
Evmos Testnet | evmos-testnet / 9000 |
ethereum
eth:<name|address>
...
galileo
w3q-g:<name|address>
ethereum
eth:ens.eth
...
galileo
w3q-g:0x1825...2388
Ethereum is the default network if it's not specified, otherwise, you should use "--chainId" to set it. RPC should also be specified if the network is an unlisted network.
npx ethfs-uploader --create --privateKey <private-key>
npx ethfs-uploader --create --privateKey <private-key> --chainId <chain-id>
npx ethfs-uploader --create --privateKey <private-key> --chainId <chain-id> --RPC <rpc>
// output: contract address
npx ethfs-uploader --create --privateKey 0x32...
npx ethfs-uploader --create --privateKey 0x32... --chainId 5
npx ethfs-uploader --create --privateKey 0x32... --chainId 1 --RPC https://rpc.ankr.com/eth
If you want to use name instead of FlatDirectory address, the name should be pointed to the FlatDirectory address in advance. Click here for details.
FlatDirectory address
npx ethfs-uploader <directory|file> <address> --privateKey <private-key>
npx ethfs-uploader <directory|file> <address> --privateKey <private-key> --chainId <chain-id>
npx ethfs-uploader <directory|file> <address> --privateKey <private-key> --RPC <rpc-url>
ens
npx ethfs-uploader <directory|file> <name> --privateKey <private-key> --RPC <rpc-url>
w3ns
npx ethfs-uploader <directory|file> <name> --privateKey <private-key>
FlatDirectory address
npx ethfs-uploader index.html gor:0x1825...2388 --privateKey 0x32...
npx ethfs-uploader index.html 0x1825...2388 --privateKey 0x32... --chainId 5
npx ethfs-uploader index.html xxx:0x1825...2388 --privateKey 0x32... --RPC https://rpc.xxx
ens
npx ethfs-uploader dist eth:ens.eth --privateKey 0x32... --PRC https://rpc.ankr.com/eth
w3ns
npx ethfs-uploader dist w3q-g:home.w3q --privateKey 0x32...
FlatDirectory address
npx ethfs-uploader --default --address <address> --file <file-name> --privateKey <private-key>
npx ethfs-uploader --default --address <address> --file <file-name> --privateKey <private-key> --chainId <chain-id>
npx ethfs-uploader --default --address <address> --file <file-name> --privateKey <private-key> --RPC <rpc-url>
ens
npx ethfs-uploader --default --address <name> --file <file-name> --privateKey <private-key> --RPC <rpc-url>
w3ns
npx ethfs-uploader --default --address <name> --file <file-name> --privateKey <private-key>
FlatDirectory address
npx ethfs-uploader --default --address gor:0x1825...2388 --file index.html --privateKey 0x32...
npx ethfs-uploader --default --address 0x1825...2388 --file index.html --privateKey 0x32... --chainId 5
npx ethfs-uploader --default --address xxx:0x1825...2388 --file index.html --privateKey 0x32... --RPC https://rpc.xxx
ens
npx ethfs-uploader --default --address eth:ens.eth --file index.html --privateKey 0x32... --RPC https://rpc.ankr.com/eth
w3ns
npx ethfs-uploader --default --address w3q-g:home.w3q --file index.html --privateKey 0x32...
FlatDirectory address
npx ethfs-uploader --remove --address <address> --file <file-name> --privateKey <private-key>
npx ethfs-uploader --remove --address <address> --file <file-name> --privateKey <private-key> --chainId <chain-id>
npx ethfs-uploader --remove --address <address> --file <file-name> --privateKey <private-key> --RPC <rpc-url>
ens
npx ethfs-uploader --remove --address <name> --file <file-name> --privateKey <private-key> --RPC <rpc-url>
w3ns
npx ethfs-uploader --remove --address <name> --file <file-name> --privateKey <private-key>
FlatDirectory address
npx ethfs-uploader --remove --address gor:0x1825...2388 --file index.html --privateKey 0x32...
npx ethfs-uploader --remove --address 0x1825...2388 --file index.html --privateKey 0x32... --chainId 5
npx ethfs-uploader --remove --address xxx:0x1825...2388 --file index.html --privateKey 0x32... --RPC https://rpc.xxx
ens
npx ethfs-uploader --remove --address eth:ens.eth --file src/home.vue --privateKey 0x32... --RPC https://rpc.ankr.com/eth
w3ns
npx ethfs-uploader --remove --address w3q-g:home.w3q --file src/home.vue --privateKey 0x32...