Hot answers tagged

13

You can try Nethereum, it's available on Github. It is currently in alpha stage, and provides an RPC client API similar to Web3. Including: JSON RPC methods Contract deployment Function call / transaction sending (encoding / decoding parameters) Event filtering creation (encoding of parameters / decoding of topics) Linux / OSX support as it is developed ...


7

To expand the other response, to provide offline transaction signing in Nethereum you can do the following: First, you will need your private key, and sender address. You can retrieve the sender address from your private key using Nethereum.Core.Signing.Crypto.EthECKey.GetPublicAddress(privateKey); if you only have the private key. var privateKey = "...


6

Nethereum now supports offline transaction signing, so there is no longer a need to use EdgeJs or similar to run node scripts inside the .NET environment.


4

Try the Nethereum.Portable which has a wider compatibility. It includes Web3,RPC, ABI, Hex and supporting libraries. In the future all the libraries will target netstandard 1.2 when is widely available. There is an example now using Nethereum Portable, Xamarin.Forms and MVVM Cross for a portable example using UWP (Windows 10, Phone, Xbox, Raspberry PI), ...


4

I happened to stumble upon the same problem and after weeks of trial and error this worked for me: var web3 = new Nethereum.Geth.Web3Geth("http://127.0.0.1:8454"); var mine = await web3.Miner.Start.SendRequestAsync(6); NB:// please use the local address and port that applies to you, mine in this case is 127.0.0.1:8454


3

A great course is offered by Coursera which was developed by Princeton University. Titled, Bitcoin and Cryptocurrency Technologies (and it's free). Even though it is a little outdated and not specific to Hyperledger, you'll build a great platform for understanding key concepts. Any introduction wouldn't be complete without mentioning the various ...


3

Microsoft came up with plugin for smart contract development using Solidity in Visual Studio. https://visualstudiogallery.msdn.microsoft.com/96221853-33c4-4531-bdd5-d2ea5acc4799/ You can develop Ethereum smart contracts using Solidity and deploy to Testing network of Ethereum Blockchain, where you will get around 1000 dumy ETH to test your application.


2

In addition to setting the request parameter in the payload, you'll need to make the POST request to the correct URI as well. So where you wrote: using(var r = new HttpRequestMessage(HttpMethod.Post, "https://api.sandbox.gemini.com")) { ... } you'll need something like: var request = "/v1/balances"; // or whatever endpoint you're trying to use var ...


2

I found these two on GitHub: cs-ethereum and Ethereum.NET. I haven't tried them out and they look like they've been inactive for quite a while.


2

Nethermind is a full .NET Core implementation You can download Nethermind from here https://github.com/NethermindEth/nethermind/releases It works with mainnet, rinkeby, goerli, ropsten and private chains. Give us a shout on gitter if need any guidance https://gitter.im/nethermindeth/nethermind


2

I didn't use Nethereum by myself, but why won't you use such code (taken from here): var transactionMessage = new TransferFunction { FromAddress = senderAddress, To = newAddress, TokenAmount = 1000 }; var transferHandler = web3.Eth.GetContractTransactionHandler<TransferFunction>(); var transferReceipt = await transferHandler....


2

I can see the price that you are using is rather low already (it needs to be converted from Gwei to Wei), but you will also benefit of estimating the gas of the transaction, and use other features of Nethereum. First of all, we can just have a TransferFunction. This is mainly an object that describes the Transfer function from the ERC20 contract and the ...


2

Just tested with parity ethereum client 2.5.10: maximum possible value was 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff being 64 hexadecimal signs -> 256 bit long. Anything exceeding it leads to a node panic


1

Infura only supports a subset of the Ethereum JSON-RPC endpoints that web3 knows about. You can see the list in Infura's documentation. The RPC that web3.personal.UnlockAccount is trying to use is called [personal_unlockAccount][2]. The personal module is all about maintaining a local wallet, including signing transactions and messages and creating new ...


1

If you simply create a new account with web3 when the blockchain is running the account's balance will be zero as it's an empty account. If you instead preseed account(s) with a balance upon creating the blockchain you can specify them a desired balance, at least in Ganache. Here are some instructions for Ganache-CLI, probably something similar works for ...


1

These three lines are correct var web3 = new Web3("https://mainnet.infura.io"); var contract = web3.Eth.GetContract(abi, contractAddress); var function = contract.GetFunction("getCollectibleDetails"); I understand what you were trying to do here but there is a better way to get this /** var parameters = new object[] { new { Data = 157517, ...


1

if you're running Geth, you'll need to point to the geth.ipc file instead of the endpoint url pointing to Infura.io for key generation because they won't store your private key for you. Basically, run Geth locally and add the geth.ipc file path to Config.EndPointURL, and you should be able to generate a key with it.


1

This is an interesting question! Let's look at each question in particular: Max number of blocks Theoretically there should be no upper limit since the chain of blocks must be able to continually grow over time. However, since the block number is stored as a finite integer, there is a limit to how high this number can be. See the full discussion in this ...


1

This error means you already have a geth instance running, which could be the nethereum node instance sharing the same pid. Try to kill it using ps or htop before running geth again


1

You basically answered your own question. https://nethereum.readthedocs.io/en/latest/introduction/web3/ You have offline transaction signing function but the docs have not been updated. The method call looks different now because it was moved to static context or something like that: Web3.OfflineTransactionSigner.SignTransaction..... For more info ...


1

** BEWARE OPINION AHEAD ** I don't know netEthereum that much but as far as i've seen, the most actively maintained and popular library for web3 is web3js (pyEthereum is somewhat popular also) due to the asynchronous nature of javascript as well as the number of js developers. So the likelihood of bugs is far less in web3js that's why it's far more ...


1

The new version of Nethereum separated the shared RPC APIs, from the Client specific APIs and functionality provided by Geth and Parity. To interact with the Geth client Miner, you need now to add the nuget package Nethereum.Geth, and use the Web3Geth class instead, not the Web3 class: var web3 = new Web3Geth(myAccount); web3.Miner.Start.SendRequestAsync(6)...


1

Ok I found it: "web3.Net.Version" Looking at https://github.com/ethereum/wiki/wiki/JSON-RPC is better then looking at the web3.js docs (at least in some cases) for Nethereum


Only top voted, non community-wiki answers of a minimum length are eligible