Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 04 11:55
    conor10 commented #1060
  • Oct 04 11:55
    conor10 commented #1060
  • Oct 04 11:55

    AlexandrouR on gh-pages

    Deployed 6986f73d with MkDocs v… (compare)

  • Oct 04 11:55

    AlexandrouR on gh-pages

    Deployed 6986f73d with MkDocs v… (compare)

  • Oct 04 11:55
    AlexandrouR closed #1060
  • Oct 04 11:55
    AlexandrouR closed #1060
  • Oct 04 10:40
    filmblackeye starred web3j/web3j
  • Oct 04 04:08
    stale[bot] closed #902
  • Oct 04 04:08
    stale[bot] closed #902
  • Oct 03 15:34

    antonydenyer on master

    update web3j dependant (compare)

  • Oct 03 15:34

    antonydenyer on master

    update web3j dependant (compare)

  • Oct 03 02:58
    avaness edited #1063
  • Oct 03 02:58
    avaness edited #1063
  • Oct 03 02:57
    avaness commented #1055
  • Oct 03 02:57
    avaness commented #1055
  • Oct 03 02:52
    avaness commented #1055
  • Oct 03 02:52
    avaness commented #1055
  • Oct 03 02:48
    avaness commented #1055
  • Oct 03 02:48
    avaness commented #1055
  • Oct 03 02:48
    avaness commented #1055
Steve Duong
@toidv
Did transfer require allowance approval?
hp
@helderjnpinto
hi, how i can decode an BytesValue type using web3j ? some decode methods are not public visibility https://gist.github.com/helderjnpinto/09344033be9fc39cbc726bf09dff0b7f
above is my examples, anyone can help with this ?
James Brown
@JamesSmartCell
Greetings! Could someone recommend which branch on web3j project I should push to to get my project added on the project homepage?
Ivaylo Kirilov
@iikirilov
@JamesSmartCell make a PR against master
Ivaylo Kirilov
@iikirilov
@gap600.com_gitlab this channel is for the web3j library, NOT web3.js
@toidv what is the null paramter - it looks wrong
MrFanLee
@MrFanLee
how to create a whisper message?
i use shhpost like these:
ShhPost conPost = new ShhPost("0xb9cc8dbf9e2008f37f5b0a9c467020d658ba908c",
        "0xdc2841c89cdbe8b278cefd8fd6a71ed94eef629c",
        Arrays.asList("0x776869737065722d636861742d636c69656e74", "0x4d5a695276454c39425154466b61693532"),
        "0xabcd",
        new BigInteger("64"),
        new BigInteger("64"));
admin.shhPost(conPost).send().messageSent();

but it shows a exception:
Exception in thread "main" java.lang.NullPointerException
at org.web3j.protocol.core.methods.response.ShhPost.messageSent(ShhPost.java:11)

and geth shows:
invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type hexutil.Bytes
invalid argument 0: json: cannot unmarshal string into Go struct field NewMessage.ttl of type uint32

@iikirilov
Sufyian
@s-m-sufyian

Guys , I am facing some issues with java code generation from ethereum smart contract using web3J maven plugin , the generated java code is not able to compile because of unresolveable dependencies .

pom.xml looks like this

`

<dependency>
<groupId>org.web3j</groupId>
<artifactId>web3j-spring-boot-starter</artifactId>
<version>1.6.0</version>
</dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>1.5.8</version>
            <executions>
                <execution>
                    <id>generate-docs</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>process-asciidoc</goal>
                    </goals>
                    <configuration>
                        <backend>html</backend>
                        <doctype>book</doctype>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.restdocs</groupId>
                    <artifactId>spring-restdocs-asciidoctor</artifactId>
                    <version>${spring-restdocs.version}</version>
                </dependency>
            </dependencies>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.web3j</groupId>
            <artifactId>web3j-maven-plugin</artifactId>
            <executions>
            <execution>
            <id>generate-sources-web3j</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>generate-sources</goal>
            </goals>
            <configuration>
                <packageName>com.opensc.service.plunk.model</packageName>
                <sourceDestination>${project.basedir}/target/generated-sources/contracts</sourceDestination>
                <nativeJavaType>true</nativeJavaType>
                <outputFormat>java,bin</outputFormat>
                <soliditySourceFiles>
                    <directory>${project.basedir}/src/main/resources</directory>
                    <includes>
                        <include>**/*.sol</include>
                    </includes>
                </soliditySourceFiles>
                <outputDirectory>
                    <java>src/java/generated</java>
                    <bin>src/bin/generated</bin>
                    <abi>src/abi/generated</abi>
                </outputDirectory>
            </configuration>
            </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>add-source</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>add-source</goal>
                    </goals>
                    <configuration>
                        <sources>
                            <source>${project.basedir}/target/generated-sources/contracts</source>
                        </sources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins> 

`

When I try to compile , I get the below mentioned issue :
ERROR] /Users/muhammad.sufyian/Documents/plunk/src/main/java/org/web3j/model/CryptoPunksMarket.java:[3,20] package io.reactivex does not exist [ERROR] /Users/muhammad.sufyian/Documents/plunk/src/main/java/org/web3j/model/CryptoPunksMarket.java:[31,24] package org.web3j.tx.gas does not exist [ERROR] /Users/muhammad.sufyian/Documents/plunk/src/main/java/org/web3j/model/CryptoPunksMarket.java:[136,95] cannot find symbol [ERROR] symbol: class ContractGasProvider
I am using solc Version: 0.4.26+commit.4563c3fc.Darwin.appleclang
Need some direction to resolve it
Rousos Alexandros
@AlexandrouR
@SyedMuhammadSufyian create an issue and ill try to replicate
Sufyian
@s-m-sufyian
@AlexandrouR I will do that , thanks . Also do you have idea , using spring boot web3J starter , I am not able to find "org.web3j.tx.gas" package and therfore not able to use DefaultGasProvider or related class inside this package into my project . Any leads on this ?
Sufyian
@s-m-sufyian
/notify-all , guys have you tried getting events , using web3j + infura ?
Everytime I try it , I get an exception that eth_newFilter is not available or doesnot exist . Any direction will be helpful , thanks
MrFanLee
@MrFanLee

@As i kown, Whisper v5 is reaching its end of life and will be deleted from geth on March the 1st. Please use v6. So does web3J use the V6? In this version, shhpost RPC works like this: shh_post
Creates a whisper message and injects it into the network for distribution.

Parameters
Object. Post options object with the following properties:
symKeyID - String: ID of symmetric key for message encryption.
pubKey - String: public key for message encryption.
sig - String (optional): ID of the signing key.
ttl - Number: Time-to-live in seconds.
topic - String 4 Bytes (mandatory when key is symmetric): Message topic.
payload - String: Payload to be encrypted.
padding - String (optional): Optional padding (byte array of arbitrary length).
powTime - Number: Maximal time in seconds to be spent on proof of work.
powTarget - Number: Minimal PoW target required for this message.
targetPeer - String (optional): Optional peer ID (for peer-to-peer message only).
Either symKeyID or pubKey must be present. Can not be both.

Returns
Boolean: true on success and an error on failure.
It seems different from the version which web3J used.

/notify-all As i kown, Whisper v5 is reaching its end of life and will be deleted from geth on March the 1st. Please use v6. So does web3J use the V6? In this version, shhpost RPC works like this: shh_post
Creates a whisper message and injects it into the network for distribution.

Parameters
Object. Post options object with the following properties:
symKeyID - String: ID of symmetric key for message encryption.
pubKey - String: public key for message encryption.
sig - String (optional): ID of the signing key.
ttl - Number: Time-to-live in seconds.
topic - String 4 Bytes (mandatory when key is symmetric): Message topic.
payload - String: Payload to be encrypted.
padding - String (optional): Optional padding (byte array of arbitrary length).
powTime - Number: Maximal time in seconds to be spent on proof of work.
powTarget - Number: Minimal PoW target required for this message.
targetPeer - String (optional): Optional peer ID (for peer-to-peer message only).
Either symKeyID or pubKey must be present. Can not be both.

Returns
Boolean: true on success and an error on failure.
It seems different from the version which web3J used.

Sufyian
@s-m-sufyian
/notify-all
Looks like that eth_newFilter method is not supported with infura + web3J , is there any workaround ?
I am getting the following exception ,
org.web3j.protocol.core.filters.FilterException: Invalid request: The method eth_newFilter does not exist/is not available at org.web3j.protocol.core.filters.Filter.throwException(Filter.java:172) at org.web3j.protocol.core.filters.Filter.run(Filter.java:53) at org.web3j.protocol.rx.JsonRpc2_0Rx.run(JsonRpc2_0Rx.java:73) at org.web3j.protocol.rx.JsonRpc2_0Rx.lambda$ethLogFlowable$2(JsonRpc2_0Rx.java:65) at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:71) at io.reactivex.Flowable.subscribe(Flowable.java:14918) at io.reactivex.Flowable.subscribe(Flowable.java:14855) at io.reactivex.Flowable.subscribe(Flowable.java:14774) at com.opensc.service.plunk.services.PunkService.getPunks(PunkService.java:68) at com.opensc.service.plunk.PlunkApplication.main(PlunkApplication.java:17)
Ivaylo Kirilov
@iikirilov
@MrFanLee no idea about creating whisper messages
@SyedMuhammadSufyian infura does not support filters - so you cannot use the flowable rx2 api with Infura
@SyedMuhammadSufyian you need to manually go through each block and get each transaction. For each transaction (that you care about i.e. filter by to address) get each receipt. For each receipt get the logs and deserialize it.
it is a non-trivial process. I would recomment you spin up your own node and use the flowable api :)
Sufyian
@s-m-sufyian
@iikirilov , thanks .
Does this mean getblocks using ethGetBlockByNumber . start the iteration with DefaultBlockParamterName.INITITAL to DefaultBlockParameterName.LATEST , and for each Block that I get , iterate through all transaction ? :|
Is there any alternative way other then spinning up my own node ?
Ivaylo Kirilov
@iikirilov
exactly ^
no alternative that I know of
@SyedMuhammadSufyian
Sayli Patil
@ptsayli

Does web3J have the support of eth_signTypedData
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#specification

or any other Java/Kotlin library recommendation

Ivaylo Kirilov
@iikirilov
yes it does
Sayli Patil
@ptsayli
can you please share link or reference documentation @iikirilov
Ivaylo Kirilov
@iikirilov
@ptsayli web3j/web3j#911
there is no documention on this - PR is welcome :)
Sayli Patil
@ptsayli
thanks @iikirilov
NairaCoin
@naira_coin_twitter
Hello!
Can anyone direct me to any blockchain built in Java?
Rousos Alexandros
@AlexandrouR
@naira_coin_twitter https://aion.network/
Felipe Faraggi
@faraggi
@naira_coin_twitter There are Ethereum clients built with Java, like Besu https://besu.hyperledger.org
Ivaylo Kirilov
@iikirilov
and also EthereumJ
Felipe Faraggi
@faraggi

@naira_coin_twitter in fact, here you go:

https://ethereum.org/java/

fresh out of the oven.

Ivaylo Kirilov
@iikirilov
@faraggi that is super awesome!
Felipe Faraggi
@faraggi
Thanks Ivaylo! glad you appreciate it. It you have any suggestions, its obviously accepting PRs, or just send them over to me.
ashish-param
@ashish-param
Hello everyone. This is Ashish. I am a little new to the blockchain world. I have some experience web3js and just 2 days back, I started using web3j. I had a doubt. For javascript, we have a library ethereumjs-tx, that can be used to get the sender's address from a raw transaction: https://ethereum.stackexchange.com/questions/36051/given-only-a-raw-transaction-how-can-i-determine-the-from-address-that-signed-i
I was wondering if there is something equivalent to it in java. Given a raw transaction, I want to figure out the sender's address and to whom is the transaction dedicated to, etc. etc.
Ivaylo Kirilov
@iikirilov
@AlexandrouR ^
Rousos Alexandros
@AlexandrouR
@ashish-param you can use the transaction decoder to decode the hex to a signed raw transaction
ashish-param
@ashish-param
@AlexandrouR yes, I got it. Thank you anyways. :)
deepjpy
@deepjpy
0xe93582e944cb8a32d0f337c12427ed3c006587b2
Gaurav
@buddies2705
getting The method eth_newFilter does not exist/is not available
anyone?