Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 19 14:34

    juanfranblanco on master

    Create2 contract address calcul… (compare)

  • Nov 15 13:02

    juanfranblanco on master

    More .net 5 Hd wallet .net 5 Hd wallet testing .net 5.0 (compare)

  • Nov 12 13:34

    juanfranblanco on master

    #655 adding cancellation token … (compare)

  • Nov 11 22:07

    juanfranblanco on master

    Rsk custom field now uses hex .Net5 initial migration, Abi de… Hd blazor test start migration … (compare)

  • Nov 10 09:27

    juanfranblanco on master

    Adding a seed to secure random … (compare)

  • Nov 10 09:26

    juanfranblanco on master

    #654 ManagedAccountTransactionM… Merge branch 'master' of https:… (compare)

  • Nov 03 18:46

    juanfranblanco on master

    Update bug_report.md (compare)

  • Nov 02 18:29

    juanfranblanco on master

    Update README.md (compare)

  • Oct 31 11:17

    juanfranblanco on master

    Signer adding overload DIDs initial commit Merge branch 'master' of https:… (compare)

  • Oct 29 11:19

    juanfranblanco on master

    Update README.md (compare)

  • Oct 29 10:48

    juanfranblanco on master

    Update README.md (compare)

  • Oct 29 10:46

    juanfranblanco on master

    Update README.md (compare)

  • Sep 07 12:38

    juanfranblanco on master

    #646 fix hdwallet added blazor … (compare)

  • Aug 28 15:28

    juanfranblanco on master

    Signing performance (start) + … Merge branch 'master' of https:… (compare)

  • Aug 19 20:23

    juanfranblanco on master

    boolean flag to get compressed … Merge pull request #642 from me… (compare)

  • Aug 07 16:28

    juanfranblanco on master

    Handling empty reponses eom, re… (compare)

  • Aug 07 15:54

    juanfranblanco on master

    Websocket client, allow to rece… Merge branch 'master' of https:… (compare)

  • Aug 03 10:57

    juanfranblanco on master

    Revert "JsonRpc/Logger: fix pos… Merge pull request #638 from Ne… (compare)

  • Aug 03 10:57

    juanfranblanco on revert-637-fixPossibleNRE

    Revert "JsonRpc/Logger: fix pos… (compare)

  • Aug 03 10:12

    juanfranblanco on master

    JsonRpc/Logger: fix possible Nu… Merge pull request #637 from kn… (compare)

Samguy036
@Samguy036
@juanfranblanco Hello Juan, when I'm compiling to Android APK by Unity, Google Play requests IL2CPP backend with ARM64. However, when I test it on phone, all the Ethereum codes are just not working, strangely I don't see any error message. By the way I already disabled "Strip engine code" option, so do you probably know what happened?
If I change to Mono backend, everything is fine.
Juan Blanco
@juanfranblanco
@notBehemoth_twitter can you send me a token example? i have not seen the function for that in the smart contracts..
Samguy036
@Samguy036

If I change to Mono backend, everything is fine.

Actually, I got the error message "NotSupportedException: System.Reflection.Emit.DynamicMethod"

Juan Blanco
@juanfranblanco
@Samguy036 ah.. are you not using the aot version? which includes the json.net aot?
the same for webgl
Samguy036
@Samguy036
image.png
Juan Blanco
@juanfranblanco
are you using these?
Samguy036
@Samguy036
I'm using this
image.png
Not sure if it's AOT
Can you distinguish?
Juan Blanco
@juanfranblanco
just replace with the others i sent you
the aot is linked to that specific version of json.net
Behemoth
@notBehemoth_twitter
@juanfranblanco Sure. This one (0xB244AC0F3ee2E9caE5dfdde5DaB8d49FA467E1A9) recently 'paused/didn't allow trading' for 20 minutes after they added liquidity to Uniswap. And so did this one (0x691ACE5e56507C008d836c8c58ed93546bDc81fF).
Uniswap shows this message as soon as you try to hit the SWAP button when trading is paused - 'The transaction cannot succeed due to error: UniswapV2: TRANSFER_FAILED. This is probably an issue with one of the tokens you are swapping.'
Juan Blanco
@juanfranblanco
what you can do is make a query beforehand (same parameters) and check for the error output this will be handled by Nethereum if an error occurs
Behemoth
@notBehemoth_twitter

@juanfranblanco Can you help me create the syntax for the query? This is the swap code that I use currently -

var wethSwapHandler = web3.Eth.GetContractTransactionHandler<SwapExactTokensForTokensFunction>();
                var wethSwapDTO = new SwapExactTokensForTokensFunction
                {
                    AmountIn = Web3.Convert.ToWei(wethToTrade),
                    AmountOutMin = amountOutMinInWei,
                    Path = path,
                    To = myWallet,
                    Deadline = ((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds() + 1200,
                    GasPrice = Web3.Convert.ToWei(gasPriceToUse, UnitConversion.EthUnit.Gwei),
                    Gas = 400000
                };

                var transactionWethSwapReceipt = await wethSwapHandler.SendRequestAndWaitForReceiptAsync(uniswapContractAddress, wethSwapDTO);

                if (transactionWethSwapReceipt.Status.Value == 1)
                {
                    var wethSwapEventOutput = transactionWethSwapReceipt.DecodeAllEvents<TransferEventDTO>();

                    if (wethSwapEventOutput.Any() && wethSwapEventOutput.Last()?.Event?.Value != null)

I think I need to use 'QueryDeserializingToObjectAsync' method but I dont know what output DTO to use for this. Also, how to check for the error output? Thanks for all the help :)

Juan Blanco
@juanfranblanco
hi yes you are correct you have to use the "Query"
it returns an array of amounts so that will be a List<BigInteger>
if it errors (reverts) then it will attempt to deserialise the error and throw an exception
Yaom!ng
@FrameVolt
Does anyway can make a transaction send from specific devices?
Or, does anyway can make a transaction send from specific Android app?
Juan Blanco
@juanfranblanco
what you do mean? if you can create a mobile app and send it from that device? for sure
Yaom!ng
@FrameVolt
yes, does this possible?
Juan Blanco
@juanfranblanco
sure enjin coin wallet (as far as I know) is made with Nethereum
there is a wallet example too if you want
in the repos
Yaom!ng
@FrameVolt
thank you😁
Aaron
@ru19wu06
Hey guys , Is there any tools that transfer .sol to bytecode on Nethereum?
Juan Blanco
@juanfranblanco
to compile and then work with Nethereum the simplest thing to use is the vscode solidity extension
check this guide
and this one
you can simply right click in a smart contract and code generate the c# api definition
those docs need updating
image.png
rpn80
@rpn80
Hello! I have a project with a deeper directory structure where solidity sub-project is at "proj/solidity". I want to use that sub-project solc npm installed module at "proj/solidity/node_modules/solcjs" with solidity.enableLocalNodeCompiler configuration but i guess that the vscode extension just looks at "proj/node_modules/solcjs". I'm I wrong?
Behemoth
@notBehemoth_twitter

@juanfranblanco Thanks. I used the 'Query' with the same params as the actual transaction and can see that it returns the amounts of the tokens similar to the 'GetAmountsOutFunction'. So can I just use this query instead of GetAmountsOutFunction as the query does what the GetAmountsOutFunction does and then some? Is GetAmountsOutFunction more performant than the query? Or should I use both? ( use GetAmountsOutFunction until I get amounts and then use the query once before submitting actual transaction)

I was thinking of putting the query call in a try catch block and running the query in an infinite loop until I get an amountOut value for the target token that can then be used in the actual transaction. But as you say, the query will THROW an error if the query call cannot succeed for any reason (other than gas issues as query calls do not use gas params). I should then be able to CATCH this error and discard it while trying the query call again and again in the infinite loop until the query succeeds (token is tradable) and then I will proceed to the actual transaction. What do you think?

Hashre
@Hashre

hello. I am stuck on a problem of trying to get the ERC20 balance of a token from an address for a given blockNumber.

https://ethereum.stackexchange.com/questions/89387/get-erc20-balance-of-token-holder-as-of-block-number-with-c-nethereum-and-infur

if I am going about this the wrong way, any advice?

Juan Blanco
@juanfranblanco
@rpn80 yes you are correct on your thinking
@notBehemoth_twitter yes that makes sense (catch / throw) regarding the output is the same, but when returning multiple parameters, etc the function output is necessary.
Juan Blanco
@juanfranblanco
@Hashre this will be due when trying to query a very old block and the public node is not an archiving one. (Maintaining all the previous States)
Behemoth
@notBehemoth_twitter

@notBehemoth_twitter yes that makes sense (catch / throw) regarding the output is the same, but when returning multiple parameters, etc the function output is necessary.

@juanfranblanco I am sorry I did not understand that well. The 'GetAmountsOutFunction' only returns a List<BigInteger> so it should be fine to replace it with the query which does the same. Right? Sorry if I'm too much of a noob.

Samguy036
@Samguy036
@juanfranblanco Hello. Last time, my project has problem with IL2CPP backend, then you suggest me to use AOT platform, and now I have a new problem. The error message saying "Loading assembly failed: "Assets/Plugins/Nethereum4Unity/System.Net.Http.dll". Do you probably know how to solve it?
Forgot to say, it's a unity project.
Samguy036
@Samguy036
Oh, I deleted the dll file, and update link.xml, that error is gone. But I got another one... " at Nethereum.JsonRpc.Client.RpcMessages.RpcResponseExtensions.GetStreamingResult[T] (Nethereum.JsonRpc.Client.RpcMessages.RpcStreamingResponseMessage response, System.Boolean returnDefaultIfNull, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <00000000000000000000000000000000>:0 "
Juan Blanco
@juanfranblanco
@notBehemoth_twitter yes correct (sorry i had to go)