Categories
Cryptocurrency Ethereum Mastering Development

How to save/read mappings within struct?

I am trying to create a mapping inside struct and then create a mapping of the struct. Take a look at below example: // ———————————————————————— // Each Level related details are stored using `Level` struct // ———————————————————————— struct Level{ address payable luckyDraw; uint256 dividend; address payable topHolder; uint256 topInvestment; uint256 reversedAllowed; mapping(address => uint256) userReversed; […]

Categories
Cryptocurrency Ethereum Mastering Development

Cannot find module ‘@truffle/hdwallet-provider’

I am trying to deploy a smart contract that works nicely in Ganache to a test net (Kovan). However, all the tutorials out there use a package called hdwallet provider. When I follow the documentation and try to install it locally (then I tried globally) I keep getting this error: Error: Cannot find module ‘@truffle/hdwallet-provider’ […]

Categories
Cryptocurrency Ethereum Mastering Development

Problem with Syntax in Solidity with sale contract

Good evening. Well, I have really been battling with this and have followed instructions to the “T” but somehow i’m not getting the Syntax right on Solidity. I’m using Remix in my Web.3 Browser. I need a little help please if possible as to where I need to insert my wallet address, token info, value […]

Categories
Cryptocurrency Ethereum Mastering Development

How long does it take it typically take for call value of changed variable to update?

I’m trying to mine a proof of work contract. Each time a solution is found, the return value for units.functions.getChallengeNumber().call() should change. I ran two instances of this script (with different PUBLIC_KEYs) to see what would happen if multiple people were trying to solve a problem for the same contract. From what I see on […]

Categories
Bitcoin Cryptocurrency Mastering Development

How to sign a transcation with multiple inputs?

Im trying to sign a transcation with multiple inputs, these inputs are all child addresses derived from the extended key. So can i sign all the inputs using the extended private key, or do i have to sign each input using the correlating private key of each address? Yeah im not really familiar with how […]

Categories
Cryptocurrency Ethereum Mastering Development

Etherscan and Token value

can you PLEASE tell me how to get my coin balances off of etherscan and on to say an exchange or on to metamask? I can not figure out how to do this it’s driving me crazy! the balances are there but I can not access them!! so frustrating. can you help me? it would […]

Categories
Cryptocurrency Ethereum Mastering Development

Target Rate Feedback Mechanism (TRFM) Not Easy to Understand

From this article, I read: When Dai below the target price the following happens: The Target Rate increases. This causes the Target Price to increase at a higher rate. This causes Dai generation via CDP to become more expensive. The increased target rate causes an increase in Dai demand. The combination of reduced supply and […]

Categories
Bitcoin Cryptocurrency Mastering Development

How can you generate a bitcoin Public Key from an existing Private Key using openssl?

I know that you can generate a new key pair with a command like. openssl ecparam -genkey -name secp256k1 And the resulting output will contain a new private key with the encoded public key. Is it possible for openssl to generate the public key straight from an existing private key only? Just to be clear […]

Categories
Cryptocurrency Ethereum Mastering Development

Town Crier Relay

I’m reading the paper Town Crier: An Authenticated Data Feed for Smart Contracts and i’m failing to understand this bit The Relay is an ordinary user-space application. It does not benefit from integrity protection by SGX and thus, unlike the Enclave, can be subverted by an adversarial OS on the TC server to cause delays […]

Categories
Cryptocurrency Ethereum Mastering Development

How do financial derivatives offer stable value? From Ethereum Whitepaper

I’m having a hard time understanding what this paragraph in the section labeled “Financial derivatives and Stable-Value Currencies” means: Financial derivatives provide an alternative. Here, instead of a single issuer providing the funds to back up an asset, a decentralized market of speculators, betting that the price of a cryptographic reference asset (eg. ETH) will […]