GithubHelp home page GithubHelp logo

coccoinomane / web3cli Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 4.0 1.55 MB

The Swiss-army knife of the blockchain ๐Ÿ’ช

License: MIT License

Dockerfile 0.04% Python 90.38% Jinja 0.04% Solidity 9.54%
avalanche-avax avalanche-c-chain blockchain bnb-chain cryptocurrency ethereum evm-chains wallet

web3cli's Issues

w3 contract add

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

"w3 token balance" not working

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.