AlexandrouR on gh-pages
Deployed 6986f73d with MkDocs v… (compare)
AlexandrouR on gh-pages
Deployed 6986f73d with MkDocs v… (compare)
antonydenyer on master
update web3j dependant (compare)
antonydenyer on master
update web3j dependant (compare)
null paramter - it looks wrong
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
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 .
`
<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> `
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
@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.
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)
to address) get each receipt. For each receipt get the logs and deserialize it.
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