Categories
Cryptocurrency Development Ethereum

Transaction unsucessful on localhost but sucessful via remix [on hold]

Contract pragma solidity ^0.5.0; import ‘./Patient.sol’; contract Doctor{ uint public doctorCount = 0; uint public treatCount = 0; bytes32 public p_id=0; uint public key=0; address addressP; uint[]p; mapping(uint => Info) public info; mapping(uint => PatientList) public patientlist; bytes32[] waitlist; // mapping(uint=> WaitList) waitlist; // struct WaitList{ // bytes32[] wait; // } struct PatientList{ uint pid; […]

Categories
Bitcoin Cryptocurrency Development

How to install Berkeley DB 4.8 on Linux?

The Unix build notes do not show how to install version 4.8 apart from saying BerkeleyDB is required for the wallet. Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install BerkeleyDB 5.1 or later. This will break binary wallet compatibility with the distributed executables, which are based on BerkeleyDB 4.8.If […]

Categories
Bitcoin Cryptocurrency Development

UnhandledPromiseRejectionWarning: RpcError: Requested wallet does not exist or is not loaded

I run bitcoind default wallet path.but ı request getballance from nodejs api return; UnhandledPromiseRejectionWarning: RpcError: Requested wallet does not exist or is not loaded I use createwallet rpc method, I created testwallet after I use loadwallet “testwallet” rpc method after that I use listwallets rpc method return json; [ “”, “testwallet” ] but when I […]

Categories
Cryptocurrency Development Ethereum

Unhandled Promise Rejection Warning

Why do I keep on getting this error when I try to send ether from one of my accounts to the other? Note that when I send it between other accounts the same code works, I have checked the balance and it shows that there is actually sufficient balance. So, what’s going on here? When […]

Categories
Bitcoin Cryptocurrency Development

Updating Bitcoin Core Wallet

I am currently running a Bitcoin Core wallet 0.18.1. What do I need to do to update it to 0.19.0.1 version? Would be very grateful for instructions as I am relatively new to this.

Categories
Bitcoin Cryptocurrency Development

How should I handle cases like this where the documentation for Bitcoin Core states one thing, and the actual program does something else?

Bitcoin Core’s RPC API call “getnewaddress” is documented here: https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/getnewaddress/ It claims: Result: “address” (string) The new bitcoin address In other words, it is supposed to return an associative array containing only the element ‘address’ which is a string representing the new Bitcoin receive address. However, it actually returns just an “untitled” string without an […]

Categories
Cryptocurrency Development Ethereum

Error: Unhandled promise rejection

I keep on getting this error whenever I run my code below: var Tx = require(‘ethereumjs-tx’).Transaction var Web3 = require(‘web3’) web3 = new Web3(‘https://ropsten.infura.io/v3/9526911a3c4843388be35f52ce95de02’) const account1 = ‘0x0539B9c9C886e93778542B553C64cb5EAfB902b1’ const account2 = ‘0xca7F442c44b079dd07324C9c7eDfe348b92f46c9’ const privatekey1 = Buffer.from(‘c986afe09588ea4d871e6b8a25821bbd0804611bc1a332c18238ca1aed18981b’ , ‘hex’) const privatekey2 = Buffer.from(‘1311767cc9f7ac6e711b12dec8949057d4148ca004b97bbfee1cf7fd2411e2d8’ , ‘hex’) var transCount = web3.eth.getTransactionCount(account1) transCount.then(count => { const txObject = { […]

Categories
Cryptocurrency Development Ethereum React

Display matrix in React

I am trying to return a matrix in React that I get from a contract function. This is the function that resonate the matrix: int[][] public publicData; function handleAddData(int[] memory data) public { publicData.push(data); } function getData() public returns(int[][] memory data) { return publicData; } I’m using solidity version 0.5. In React, I try to […]

Categories
Cryptocurrency Development Ethereum

Compliance and Violation patterns

I have downloaded the slides from the site: [Compliance and Security patterns It says No writes after calls. I can understand this concept. It’s a remedy for reentrancy problem. But it shows compliance and security patterns in some technical language related to Datalog or to some language related to software representation. Can some body please […]

Categories
Bitcoin Cryptocurrency Development

How to get block header hex?

I am trying to research hash functions and I want to be able to use bitcoin’s mining outputs as hashes. I am curious about where the actual hex value of the data that generates that hash with a lot of zeroes is. So, this is what I want: the 80 byte input that gives a […]