Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@warren-bank/dapp-console
Advanced tools
Readme
Command-line REPL javascript console. web3.js
provides access to an Ethereum blockchain. Compiled contracts are represented as objects. Each deployed contract (with available dapp-deploy
metadata) is associated with its on-chain address.
npm install -g @warren-bank/dapp-console
aside:
$PATH
contains any conflicting symbolic links: which dapp-console
dapphub/dapp
toolchain doesn't include a console
library; But that may change in the future.lxterminal -e testrpc
mkdir ~/my_dapp
cd ~/my_dapp
dapp init
dapp deploy
dapp console
# > typeof web3
# 'object'
# > web3.eth.accounts
# [ '0xd9aac9e3ad5c0a8e31e9f6c97eb65de594b2d1ce',
# '0xc0f332c8d93b642100d97d25200711b0e1e0a7a4',
# '0xf3409d30955200079cc2f45eeb2a15e404ffde7f',
# '0x7941b525c26fe13046010a09c3770d7ac9f5b4e7',
# '0x3c99d0bf3c9f531df22153983d1eaa6ea937fc5a',
# '0xdecdf444097fc18e4bfb8f9ccf9902c9b42fa9e3',
# '0xf467e060531229521f92e128469870e111d19ab3',
# '0x0dbdf14919e1a0ce6996e1908c86c63e74353d0a',
# '0x351b1ca0bc8b8ff41a3eaf0e9b321d4f74e5bed4',
# '0xc82b8fec5aa10a93b8dcc00d75b1bfe9ebc668c6' ]
# > typeof DSTest
# 'object'
# > typeof Test
# 'object'
# > Test.address
# '0x12345'
# > Test.IS_TEST()
# true
# > Test.test_basic_sanity.call()
# []
$ dapp-console --help
Command-line REPL javascript console.
'Web3.js' provides access to an Ethereum blockchain.
Compiled contracts are represented as objects.
Each deployed contract (with available 'dapp-deploy' metadata)
is associated with its on-chain address.
Usage: dapp-console [options]
Options:
-h, --host Ethereum JSON-RPC server hostname [string] [default: "localhost"]
-p, --port Ethereum JSON-RPC server port number [number] [default: 8545]
--tls, --https, --ssl Require TLS handshake (https:) to connect to Ethereum JSON-RPC server [boolean] [default: false]
-d, --contracts_directory Path to directory containing all contract artifacts: (.abi, .deployed)
note: The default path assumes that the current directory is the root of a compiled "dapp" project. [string] [default: "./out"]
-i, --input_file Path to javascript file to execute, then quit. [string]
-e, --execute Inline javascript to execute, then quit [string]
--help Show help [boolean]
Examples:
dapp-console connect to: "http://localhost:8545"
dapp-console -h "mainnet.infura.io" -p 443 --ssl connect to: "https://mainnet.infura.io:443"
dapp-console -d "/path/to/compiled/contracts" load contracts into REPL console
dapp-console -i "/path/to/script.js" execute a script file
dapp-console -e 'console.log("unlocked accounts:", "\n", web3.eth.accounts)' execute an inline script
copyright: Warren Bank <github.com/warren-bank>
license: GPLv2
dapp-deploy
dapphub/dapp
toolchaindapp
is installed, this tool can be invoked by the command: dapp console [options]
dapp-console [options]
-e
is used to execute an inline script,-i
is used to execute a script from an input file:
Promise
: wait until it resolvestoAscii(hex)
\u0000
from web3.toAscii(hex)
web3.toAscii(hex)
,
if the string contains fewer than 32 characters,
then the length of the string remains 32 bits and the unused characters are filled with: "\u0000"console.log()
statements),
and the output is directed to a log file,
only the first ("bytes32" converted) string appears in the file.web3.toAscii(hex)
so strings are safe to write to the file system.--input_file
__cwd
__realpath
__dirname
__filename
FAQs
Command-line REPL javascript console. 'Web3.js' provides access to an Ethereum blockchain. Compiled contracts are represented as objects. Each deployed contract (with available 'dapp-deploy' metadata) is associated with its on-chain address.
The npm package @warren-bank/dapp-console receives a total of 3 weekly downloads. As such, @warren-bank/dapp-console popularity was classified as not popular.
We found that @warren-bank/dapp-console demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.