Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:29
    umutmaz commented #449
  • 16:29
    umutmaz commented #449
  • 14:11
    kinson603 closed #1373
  • 14:11
    kinson603 closed #1373
  • 14:11
    kinson603 commented #1373
  • 14:11
    kinson603 commented #1373
  • 08:48
  • 01:08
    omids04 starred web3j/web3j
  • Mar 05 17:06
    yzgod starred web3j/web3j
  • Mar 05 09:35
    SweeXordious commented #935
  • Mar 05 09:35
    SweeXordious commented #935
  • Mar 05 09:24
    conor10 reopened #935
  • Mar 05 09:24
    conor10 reopened #935
  • Mar 05 08:49
    dofs197 commented #703
  • Mar 05 08:49
    dofs197 commented #703
  • Mar 05 07:58
    zmyqucai8 starred web3j/web3j
  • Mar 04 17:03
    belbix edited #1380
  • Mar 04 17:03
    belbix edited #1380
  • Mar 04 16:56
    belbix review_requested #1380
  • Mar 04 16:56
    belbix review_requested #1380
Akila K Gunawardhana
@akilahgm
But it didn't work correctly.
E 20:13:14 105 [dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.la
ng.NoSuchMethodError: okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;] with root cause
java.lang.NoSuchMethodError: okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;
Can someone please help me to resolve this error?
why get this issue please help me
ı can try uniswap swap process...
everytime this issue get
Fail with error 'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT'
Akila K Gunawardhana
@akilahgm
web3j-issue.PNG
Can someone help me to resolve this?
Mario
@mmaryo
@akilahgm add okhttp3 dependencies explicitly
yosa
@yosa12978
Can i create an erc20 token with Web3j?
Mario
@mmaryo
@yosa12978 it's a token so you have to code a smart contract that implements the interface : https://ethereum.org/en/developers/tutorials/understand-the-erc-20-token-smart-contract/
John Paul Cas
@johnpaulcas
Hi guys, anyone tried to test it to local blockchain?
yosa
@yosa12978
Hello every one again. How can i warp a smart contract?
Rishabh Agrawal
@RISHABHAGRAWALZRA
If i pass wrong private key to credential.create("wrong private key") then what it will return
Mario
@mmaryo

If i pass wrong private key to credential.create("wrong private key") then what it will return

try it ;)

Hello every one again. How can i warp a smart contract?

epirus generate solidity generate --abiFile="${FILE_NAME}".abi --binFile="${FILE_NAME}".bin --outputDir=src/main/java --package=com.package

Hi guys, anyone tried to test it to local blockchain?

test what ? deploy smart contract ?

John Paul Cas
@johnpaulcas
Hi there, anyone tried to create wrapper of sol using truffle

Hello every one again. How can i warp a smart contract?

epirus generate solidity generate --abiFile="${FILE_NAME}".abi --binFile="${FILE_NAME}".bin --outputDir=src/main/java --package=com.package

it saying Unknown options: '--abiFile=Cash.abi', '--binFile=Cash.bin', '--outDir=../../java', '--package=com.cash.android'

my full command epirus generate --abiFile=Cash.abi --binFile=Cash.bin --outDir=../../java --package=com.cash.android
John Paul Cas
@johnpaulcas
it works now, thank you!
John Paul Cas
@johnpaulcas
Hi guys, I have issue connecting on web3j using ganache, do you have anyways to connect to localhost using web3j on your android emulator?
I got this issue PID: 8540 java.lang.Error: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8545
pupupu102
@pupupu102
I have a transaction hash which deployed a smart contract. So How can I get smart contract address from the transaction hash, please?
Vince BCD
@BCDiploma_gitlab
Hello guys
I’m looking for a way to get status & information of a dropped transaction. (not dropped & replace)
Actually, getTransactionData returns … nothing :slight_smile:
Any idea ?
Thx
1 reply
Raphael Panic
@rpanic
Hey,
Just starting using Web3J. I am trying to generate a Wrapper for one of my contracts.
web3j solidity generate -b test.bin -a test.abi -o . -p org.web3j.sample
But no matter how I modify the command, I always get Unknown options: '-b', 'test.bin', '-a', 'test.abi', '-o', '.', '-p', 'org.web3j.sample'
Does anyone know what could be the issue of that
kunalbarchha
@kunalbarchha

can someone guide me how to decode the toAddress and quantity of an ERC20 Token. I am able to get toAddress but amount I am receiving is without decimal input.

Below is the decode method I am using. :

public void decodeInput(String data) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    String inputData = data;
    String method = inputData.substring(0,10);
    log.info("Method >>>>>> " +method);
    String to = inputData.substring(10,74);
    String value = inputData.substring(74);
    Method refMethod = TypeDecoder.class.getDeclaredMethod("decode",String.class,int.class,Class.class);
    refMethod.setAccessible(true);
    Address address = (Address)refMethod.invoke(null,to,0,Address.class);
    log.info("Address>>>>>> " +address.toString());
    Uint256 amount = (Uint256) refMethod.invoke(null,value,0,Uint256.class);
    log.info("amount >>>>>> " +amount);
}
Vince BCD
@BCDiploma_gitlab

can someone guide me how to decode the toAddress and quantity of an ERC20 Token. I am able to get toAddress but amount I am receiving is without decimal input.

Below is the decode method I am using. :

public void decodeInput(String data) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    String inputData = data;
    String method = inputData.substring(0,10);
    log.info("Method >>>>>> " +method);
    String to = inputData.substring(10,74);
    String value = inputData.substring(74);
    Method refMethod = TypeDecoder.class.getDeclaredMethod("decode",String.class,int.class,Class.class);
    refMethod.setAccessible(true);
    Address address = (Address)refMethod.invoke(null,to,0,Address.class);
    log.info("Address>>>>>> " +address.toString());
    Uint256 amount = (Uint256) refMethod.invoke(null,value,0,Uint256.class);
    log.info("amount >>>>>> " +amount);
}

There's no decimal in solidity: you've to divide the returned number with the number of decimal of your token

Vince BCD
@BCDiploma_gitlab
Is there people from the web3j team anymore here?
kunalbarchha
@kunalbarchha

can someone guide me how to decode the toAddress and quantity of an ERC20 Token. I am able to get toAddress but amount I am receiving is without decimal input.

Below is the decode method I am using. :

public void decodeInput(String data) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    String inputData = data;
    String method = inputData.substring(0,10);
    log.info("Method >>>>>> " +method);
    String to = inputData.substring(10,74);
    String value = inputData.substring(74);
    Method refMethod = TypeDecoder.class.getDeclaredMethod("decode",String.class,int.class,Class.class);
    refMethod.setAccessible(true);
    Address address = (Address)refMethod.invoke(null,to,0,Address.class);
    log.info("Address>>>>>> " +address.toString());
    Uint256 amount = (Uint256) refMethod.invoke(null,value,0,Uint256.class);
    log.info("amount >>>>>> " +amount);
}

There's no decimal in solidity: you've to divide the returned number with the number of decimal of your token

Did that. but it rounds up completely. Let's say amount is 100.50 I get data from logs as 100500000. So dividing it by 1000000 should give me 100.50. But it returns only 100. I have tried different rounding method as well.

Is there people from the web3j team anymore here?

I doubt. Never got a solution here. Nethereum is more active and strangely, most of my Web3J questions are solved in Nethereum :-)

Aitor
@aaitor
hi there, quick question about the java code generation, is this not working anymore in the CLI?
aitor@tijuana:~/Projects/Nevermined/contracts (master)$ web3j generate solidity
              _      _____ _ 
             | |    |____ (_)
__      _____| |__      / /_ 
\ \ /\ / / _ \ '_ \     \ \ |
 \ V  V /  __/ |_) |.___/ / |
  \_/\_/ \___|_.__/ \____/| |
                         _/ |
                        |__/ 
by Web3Labs

solidity [OPTIONS] [COMMAND]

Description:

Generate wrappers from Solidity

Options:
  -h, --help      Show this help message and exit.
  -v, --version   Print version information and exit.
Commands:
  generate  Generate Java smart contract wrappers from Solidity

Web3j CLI is licensed under the Apache License 2.0
aitor@tijuana:~/Projects/Nevermined/contracts (master)$ web3j --version
              _      _____ _ 
             | |    |____ (_)
__      _____| |__      / /_ 
\ \ /\ / / _ \ '_ \     \ \ |
 \ V  V /  __/ |_) |.___/ / |
  \_/\_/ \___|_.__/ \____/| |
                         _/ |
                        |__/ 
by Web3Labs
Version: 1.4.1
Build timestamp: 2021-01-28 13:16:30.840 UTC
Aitor
@aaitor
bottom link in the documentation page about this topic is broken too: http://docs.web3j.io/latest/command_line_tools/#solidity-smart-contract-wrapper-generator
sterlingwellscaffeine
@sterlingwellscaffeine
Hello all! I have been working on getting a basic web3j project off the ground but I run into the following issue with gradle:
A problem was found with the configuration of task ':npmInstall' (type 'NpmInstallTask').
No value has been specified for property 'packageJsonFile'.
Has anyone experienced this issue and can help direct me towards resources to solve it?
dmitry537
@dmitry537

Hey! Tell me what exactly web3j.ethGasPrice returns.

Can I calculate the gas price I need so that the transaction would be included in the first block? The fifth? On the tenth?

dmitry537
@dmitry537
Does gasstation-express-oracle exist in java?
Krakin't - KRK - Erc20 Token
@krakin_t_twitter
Hi, I would like to learn how to communicate with the smart contact using web3j and infura. I have posted a stack-exchange question (bounty of 100 points) with details and would truly appreciate if anyone could give me a hand. This is a major block in a development of the app and I do not want to switch to JavaScript microservices simply because there is a better and a detailed documentation. Thank you kindly in advance...
https://ethereum.stackexchange.com/questions/93255/looking-for-a-simple-and-plain-example-of-a-java-smart-contract-interaction-usin
Mario
@mmaryo
This message was deleted
Mario
@mmaryo
How to know the best gas limit to use? For example for createEtherTransaction
mmotiy
@mmotiy
image.png
Hi,An error occurred here when I used web3j to generate files
Mario
@mmaryo
Hello, are you open to update dependencies ?
I think for RxJava and Java-Websocket that add security and performance fixes
web3j version: 2.2.2, last version 2.2.21
https://github.com/ReactiveX/RxJava/releases
web3j version: 1.3.8, last version: 1.5.1
https://github.com/TooTallNate/Java-WebSocket/releases
And Gradle, web3j version is 5.6.3 (oct 2019), the last is 6.8.3
Jeroen Ost
@jeroenost
web3j gradle plugin, npmInstall seems to always try to take @openzeppelin/contracts:latest - It seems there's no support for freezing a version, correct?
Thorsten Hirsch
@thorstenhirsch
hey guys. is it possible to print the bytecode of a transaction that I'm building with web3j's generated contract code? I'm building a RemoteCall<MyContract> object that I can send(), but how do I get its bytecode?