Socket
Socket
Sign inDemoInstall

ethfs-uploader

Package Overview
Dependencies
55
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ethfs-uploader

A tool to upload files easily to a filesystem smart contract following ERC-5018.


Version published
Weekly downloads
1
Maintainers
1
Install size
22.8 MB
Created
Weekly downloads
 

Readme

Source

EthFS Uploader

Installation

npm install ethfs-uploader

Supported networks

Chain NameChain Short Name and Chain Id
Ethereum Mainneteth / 1
Goerli Testnetgor / 5
Sepolia Testnetsep / 11155111
Optimismoeth / 10
Optimism Testnetogor / 420
Arbitrum Onearb1 / 42161
Arbitrum Novaarb-nova / 42170
Arbitrum Testnetarb-goerli / 421613
Web3Q Galileo Testnetw3q-g / 3334
BNB Smart Chainbnb / 56
BNB Smart Chain Testnetbnbt / 97
Avalanche C-Chainavax / 43114
Avalanche Fuji Testnetfuji / 43113
Fantom Operaftm / 250
Fantom Testnettftm / 4002
Polygon Mainnetmatic / 137
Polygon Mumbaimaticmum / 80001
Polygon zkEVM Testnetzkevmtest / 1402
QuarkChain Mainnet Shard 0qkc-s0 / 100001
QuarkChain Devnet Shard 0qkc-d-s0 / 110001
Harmony Mainnet Shard 0hmy-s0 / 1666600000
Harmony Testnet Shard 0hmy-b-s0 / 1666700000
Evmosevmos / 9001
Evmos Testnetevmos-testnet / 9000

Usage

Support EIP-3770 Address

ethereum
    eth:<name|address>

... 

galileo
    w3q-g:<name|address>       
Example
ethereum
    eth:ens.eth

...

galileo
    w3q-g:0x1825...2388

Create FlatDirectory Command

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 
Example
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

Deploy Command

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>
Example
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...

Set FlatDirectory Default Entrance

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>
Example
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...

Remove File

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>
Example
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...

Repo

Github Repo

Keywords

FAQs

Last updated on 19 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc