Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:45

    xaviarias on remote-call-transactions

    Fix failing test Fix test missing a send transac… Add final modifier and 6 more (compare)

  • 18:45

    xaviarias on remote-call-transactions

    Fix failing test Fix test missing a send transac… Add final modifier and 6 more (compare)

  • 10:43

    AlexandrouR on remote-call-transactions

    Small code clean up. (compare)

  • 10:43

    AlexandrouR on remote-call-transactions

    Small code clean up. (compare)

  • 05:58
  • Mar 26 16:47
  • Mar 26 16:47
    AlexGianak starred web3j/web3j
  • Mar 26 14:47
    iikirilov assigned #1135
  • Mar 26 14:47
    iikirilov assigned #1135
  • Mar 26 14:46
    iikirilov unlabeled #1135
  • Mar 26 14:46
    iikirilov labeled #1135
  • Mar 26 14:46
    iikirilov unlabeled #1135
  • Mar 26 14:46
    iikirilov labeled #1135
  • Mar 26 14:45
    iikirilov unlabeled #1176
  • Mar 26 14:45
    iikirilov unlabeled #1176
  • Mar 26 14:45
    iikirilov labeled #1176
  • Mar 26 14:45
    iikirilov labeled #1176
  • Mar 26 14:45
    iikirilov assigned #1176
  • Mar 26 14:45
    iikirilov assigned #1176
  • Mar 26 14:45
    iikirilov commented #1176
ccolorado
@ccolorado
yeah will do that thanks
Justin Kilpatrick
@jkilpatr
I'm using 4.2-android and getting invalid rlp errors. Is there a protocol upgrade issue with this old version?
Ivaylo Kirilov
@iikirilov
that is quite possible @jkilpatr but it is more likely you are doing something wrong - if you share some code / error messages it might be helpful
Justin Kilpatrick
@jkilpatr
that would be my first thought too, except I haven't really changed this code. Guess I'm looking at something strange happening in the background.
As long as it's still expected to work that's all I need to know. Thanks.
Ivaylo Kirilov
@iikirilov
the rlp spec has not changed :))
so that should not be the issue
shuntak
@shun-tak
I posted a new issue on GitHub web3j/web3j#1167
I’m trying to send tx from Corda to Ethereum for their interoperability.
kunalbarchha
@kunalbarchha

we have native wrappers for erc20 and erc721 have you tried those? @kunalbarchha

@iikirilov Yeah, I am working with Web3J and not JS. Yes, I tried the native wrappers built using web3j-maven-plugin. There isn't any issue with web3j. Actually I am newbie for Java, so wanted to get started with any documentation for freshers.

JackBekket
@JackBekket

Hi, everyone!

I'm trying to invoke function from smart-contract and get return values throught event, using web3j in android

The question is - how to get values from event?

My code:

CompletableFuture<TransactionReceipt> receipt = superfactory.createSimpleWallet(_owner, _required, _dailyLimit, JID, telephone).sendAsync();
            receipt.thenAccept(transactionReceipt -> {
                // get tx receipt only if successful
                String txHash = transactionReceipt.getTransactionHash(); // can play with that


                List eventResponseHuman = kns.getRegistredHumanEvents(transactionReceipt);




                Log.d("event_values_human", "event_response: " + eventResponseHuman);


                List eventValues = kns.getRegistredEvents(transactionReceipt);
                Log.d("event_values", "event_values: " + eventValues);



                Log.d("receipt", "receipt"+transactionReceipt);
                Log.d("txhash", "txhash:" +txHash);

            }).exceptionally(transactionReceipt -> {

                return null;

            });



            List<KNS.RegistredHumanEventResponse> response = kns.getRegistredHumanEvents(receipt.get());

question is - what should I do to response list, to get values from event?

I'm getting response list by transaction receipt I have got from createSimpleWallet , so I know, I get exactly proper event with data I need.

I'm a bit new to whole Java thing, and don't quite understand, what should I do with respone List (at the end of snippet), to get decoded data I want

Please help
Rousos Alexandros
@AlexandrouR
i think you are looking for EventValues eventValues = contract.processSomeEvent(transactionReceipt);
JackBekket
@JackBekket

@AlexandrouR this one doesnt work... I don have contract.processSomeEvent(transactionReceipt) at all :(

all I have is contract.getSomeEvent(transactionReceipt)

web3j core 4.5.14

So..doc's are not helpful for me :(

Probably you have some newer docs version

jaredweinfurtner
@jaredweinfurtner
Is there any support for shh (whisper) v6 in a development branch that I am missing? The current RPC implementation does not support it https://github.com/ethereum/go-ethereum/wiki/Whisper-v6-RPC-API. If you're running the latest geth release, the code is not compatible
Ivaylo Kirilov
@iikirilov
@jaredweinfurtner no we have not implemented whisper
how do you mean the code is not compatible?
@JackBekket I recommend you use the flowable API - have a look at this sample https://github.com/iikirilov/web3j-workshop - specifically from line 104 in Application.java
chess-equality
@chess-equality
Why are people asking features which are not implemented yet? Why can't you just RTFM?
shuntak
@shun-tak
FYI, A new interoperability project, Cordage uses web3j. It really supports this project. Thanks a lot!
https://github.com/LayerXcom/cordage
kunalbarchha
@kunalbarchha

Hi all,

I am stucked with one issue while transferring ERC1155 using the contract's wrapper class. I keep getting null pointer exception at send. Below is the code. Check comment where I get null pointer.

public String safeTransferFrom() throws Exception {

    String fromAddress="fromAddress";
    String toAddress="toAddress";
    BigInteger value=BigInteger.valueOf(1);
    Web3j web3j=Web3j.build(new HttpService("https://mainnet.infura.io/v3/<API KEY>"));
    String contractAddress = "0xfaaFDc07907ff5120a76b34b731b278c38d6043C";
    String tokenId="0x3800000000000d1b000000000000000000000000000000000000000000000000";
    byte[] data=new byte[0];

    BigInteger token1;
    token1=new BigInteger(tokenId.substring(2),16);

    Credentials credentials = Credentials.create("privateKey");

    ERC1155 token = ERC1155.load(contractAddress, web3j, credentials, null);

    //getting Null pointer at SEND.
    TransactionReceipt setApproval=token.setApprovalForAll(fromAddress, true).send();
    String approvalHash=setApproval.getTransactionHash();
    log.info("Approval Status Hash >>>>> " +approvalHash);

    //getting Null pointer at SEND.
    TransactionReceipt sendToken=token.safeTransferFrom(fromAddress, toAddress, token1,value,data).send();
    String txHash=sendToken.getTransactionHash();

    if (txHash==null){
        String error="Not sent";
        log.info(error);
        return error;
    }
    else {
        log.info("tx Hash >>>>>>> " + txHash);
        TransactionReceiptProcessor receiptProcessor = new PollingTransactionReceiptProcessor(
                web3j,
                TransactionManager.DEFAULT_POLLING_FREQUENCY,
                TransactionManager.DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH);
        TransactionReceipt txReceipt = receiptProcessor.waitForTransactionReceipt(txHash);
        log.info("Transaction Receipt >>>>> " +txReceipt);
        return txHash;
    }
}
Ivaylo Kirilov
@iikirilov
@kunalbarchha I am guessing that the from and to addresses need to be valid ethereum addresses - i.e. 20 bytes of hex
kunalbarchha
@kunalbarchha
@iikirilov Yes, they are valid Eth address. I have removed them here. Both have balances and working fine with ERC20 and ETH transfer APIs
Ivaylo Kirilov
@iikirilov
interesting - will try to replicate in the next few days
kunalbarchha
@kunalbarchha
@iikirilov Thanks. I have also approached Enjin team for the issue. They too are investigating, because it's their smart contract that I am trying to integrate.
Akilesh30
@Akilesh30
can anyone please help me where should i start fromfor integrating web3j in android studio
Connor McEwen
@cmcewen
hi! i'm trying to do some local development and build the cli (https://github.com/web3j/web3j-cli), but i'm getting a few test errors then i run ./gradlew build. is there any specific version or anything i should be using?
Ivaylo Kirilov
@iikirilov
@cmcewen what OS and what version of java are you using - we should try to reproduce this.
in the meantime ./gradlew build -x test should help :)
@Akilesh30 you can start with the web3j docs
Connor McEwen
@cmcewen
➜ web3j-cli git:(master) java -version java version "1.8.0_162" Java(TM) SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
Connor McEwen
@cmcewen
Ivaylo Kirilov
@iikirilov
@cmcewen thanks will take a look at this :)
did you try building with test excluded?
Connor McEwen
@cmcewen
yeah that works fine
Ivaylo Kirilov
@iikirilov
@cmcewen this should be fixed now - could you please verify
Ivaylo Kirilov
@iikirilov
super :))
xw-origo
@xw-origo
I have a question, I would like to generate a web3j jar from local build. so I cloned the web3j project, and switched the branch to release/4.5.17. After running ./gradlew jar, it does generate web3j-4.6.0-SNAPSHOT.jar jar file, but it's almost empty with no actually class inside. Does anyone know what is the issue? My java version is "1.8.0_241", and I am on mac os 10.15.3
Ivaylo Kirilov
@iikirilov
@xw-origo can you see the jar in the core module? that is the one you want
Hitesh Goel
@mannutech
@jsdavis28 I would need assistance on emulating abi.encodepacked using web3j or Java.
Seemingly the solution isn't working for me.
Evan Saulpaugh
@esaulpaugh
kunalbarchha
@kunalbarchha

Hey guys,
I have a question. How do centralized exchanges like Binance handle millions of ETH wallet ? I mean someone is buying and selling ETH everytime. Unlike BTC, ETH doesn't have account system. Every wallet is basically an account.

To put that inperspective, I have 1 ETH and I put a sell order. User B buys my 1 ETH. So basically I do not have any ETH left. As centralized exchanges mainly manages the balance on DB level, I'll still see 1 ETH balance. As actualy blockchain transaction didn't take place yet. How do exchanges manage that ? Any help will be appreciated.

Ivaylo Kirilov
@iikirilov
@kunalbarchha your eth and everybody else's is held in a multisig wallet that belongs to the exchange. So behind the scenes all the eth is in one wallet (in reality exchanges have a few wallets in case one gets compromised). Everything else you see in the UI is an illusion - you do not actually do any blockchain transaction when you make a trade. The exchange usually settles trades in bulk a few times per day at set intervals to save on gas costs.
You may be able to still see your 1ETH balance but the exchage holds the private keys to this account so you cannot actually do any other transactions.
disclaimer : I do not work for an exchange, I have never built an exchange. This is only my best guess of how it works.