coccoinomane / web3cli Goto Github PK
View Code? Open in Web Editor NEWThe Swiss-army knife of the blockchain ๐ช
License: MIT License
The Swiss-army knife of the blockchain ๐ช
License: MIT License
Hello there,
First, great project! I appreciate it!
I'm trying to run this command to add my contract, but the ABI part is what is throwing me off.
Here is the command I am running:
w3 contract add Intermezzo 0x34Dc8f1F1A616664112edeb6d4b4a7cC6E916A96 --abi [{"inputs":[{"internalType":"address","name":"_usdcAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"COLLATERAL_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"TARGET_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"collateralBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"totalCollateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[],"name":"usdc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function","constant":true},{"inputs":[{"internalType":"uint256","name":"collateralAmount","type":"uint256"}],"name":"purchaseCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stabilizePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawExcessCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"}] --chain opera
However, the command just "hangs". At the end there is a [PROCESS COMPLETED] message but it does not return me back to my command prompt in the terminal.
Does it need time to import the ABI functions or something?
Please advise. I am trying to access the contract's functions so I can interact with it.
Thanks again!
Pavon
Hi,
Thanks for great project.
"w3 token balance" not working or my understand might have some issue.
USDC token address
eth: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
matic: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
gnosis: 0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83
w3 token balance USDC 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F -c eth
Web3CliError > Contract 'USDC' on chain 'eth' does not exist
w3 token balance 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F -c eth
Web3CliError > Contract '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' on chain 'eth' does not exist
w3 token balance 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F -c matic
Web3CliError > Contract '0x2791bca1f2de4661ed88a30c99a7a9449aa84174' on chain 'matic' does not exist
w3 token balance USDC 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F -c matic
Web3CliError > Contract 'USDC' on chain 'matic' does not exist
w3 token balance USDC 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F -c polygon
Web3CliError > Chain 'polygon' does not exist
w3 token balance 0x4ECaBa5870353805a9F068101A40E0f32ed605C6 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F
Web3CliError > Contract '0x4ECaBa5870353805a9F068101A40E0f32ed605C6' on chain 'gnosis' does not exist
w3 token balance 0x4ECaBa5870353805a9F068101A40E0f32ed605C6
usage: web3cli token balance [-h] [-c CHAIN] [--rpc RPC] token address
web3cli token balance: error: the following arguments are required: address
w3 token balance USDC
usage: web3cli token balance [-h] [-c CHAIN] [--rpc RPC] token address
web3cli token balance: error: the following arguments are required: address
w3 token balance USDC 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F
Web3CliError > Contract 'USDC' on chain 'gnosis' does not exist
w3 token balance 0xddafbb505ad214d7b80b1f830fccc89b60fb7a83 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F
Web3CliError > Contract '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83' on chain 'gnosis' does not exist
w3 token balance 0xDD9185DB084f5C4fFf3b4f70E7bA62123b812226 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F
Web3CliError > Contract '0xDD9185DB084f5C4fFf3b4f70E7bA62123b812226' on chain 'gnosis' does not exist
w3 token balance 0xddafbb505ad214d7b80b1f830fccc89b60fb7a83 0x6f5c9993c98C7a0171BD3EF0E6EeEB9d64DCB39F
Web3CliError > Contract '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83' on chain 'gnosis' does not exist
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.