Categories
Mastering Development

Does go support multi-types?

type MyNumber interface { float32, float64, uint, int // this is not supported } func PrintNumber(n MyNumber) { switch n.(type) { case float32, float64, uint, int: fmt.Printf(“%v\n”, n) default: panic(“PrintNumber only supports types float32, float64, uint, int”) } } In go, you can define a blank interface, which basically allows any type var v interface{} […]

Categories
Cryptocurrency Ethereum Mastering Development

Transaction won’t be mined / Failed signing of transaction

I’m trying to send a transaction that writes somesthing on ethereum(kovan) but it seems my transaction is not mined and probably not even send to the network? All my view requests to ethereum work, so my guess is that there is a problem with the signing of my transaction? After firing my script I receive […]

Categories
Cryptocurrency Development Ethereum

TypeError: Member “editor” not found or not visible after argument-dependent lookup in struct PrivateSmartContract.BuildingRental storage ref

I want to store user’s wallet address array as editor’s address so i created struct with array like following pragma solidity >=0.4.0 <0.7.0; pragma experimental ABIEncoderV2; contract PrivateSmartContract { string[] public buildingList; address public bildingOwner; address public biv; struct BuildingRental { string bagId; string rentHash; editor[] editors; uint updatedAt; bool status; } struct editor { […]

Categories
Cryptocurrency Development Ethereum

address recovery from signature

Sorry for the long question, I tried to keep it as standalone as possible. For my master thesis I’m analyzing historical data coming from price oracles contract events. In particular, the MakerDAO medianizer contract receives regular price updates from 13 different feeds that sign the data before being sent to the oracle by a relay […]

Categories
Cryptocurrency Development Ethereum

Variables in storage not getting updated according to transaction

As part of my project, I am using a code from github and modified it according to my requirement. This is a Auction contract. I am using remix IDE for interaction. I tried deploying in the rinkeby test network but no use. How to use code Register with a account address and number of tokens. […]

Categories
Development

Detecting Activity with mouse, keyboard and voice on windows

We have a module on Python (through win32) to detect user mouse and keyboard activity by GetLastInputInfo and GetTickCount. How can we register Voice activity in GetLastInputInfo? Or maybe can we add a synthesized input to update GetLastInputInfo every time the mic detects voice input? but can we do that without interrupting the user? Sample […]

Categories
Cryptocurrency Development Ethereum

Variables in storage not getting updated according to transaction

As part of my project, I am using a code from github and modified it according to my requirement. This is a Auction contract. I am using remix IDE for interaction. I tried deploying in the rinkeby test network but no use. How to use code Register with a account address and number of tokens. […]

Categories
Cryptocurrency Development Ethereum

how to pay for goods with tokens ERC20

my english is very bad.i am sorry. I found an example of an auction where you can pay with ethers. I would like to pay with ERC20 tokens. Please tell me how to do this in the placeBID () and FinalizeAuction () functions. I display it all through web3js on the browser. I also created […]

Categories
Cryptocurrency Development Ethereum

External Function call but need to get back gas or limit gas

so I am running into an issue (with a potential solution in mind, but need help). Situation: interface A {function xyz(uint,uint,uint,uint,uint)…. returns (uint, uint)}; contract B{ function pqr() { A.xyz(uint,uint,uint,uint,uint); doSomethingMore; doSomethingMore; } } Issue: xyz does a .transfer which eats up all the gas. Thus failing the whole function execution. Potential solution: Use Assembly […]

Categories
Cryptocurrency Development Ethereum

Read and write products using solidity

I am new to Solidity, trying to store a product in purchaser wallet and retrieve the information from owner wallet. I have some ideas but didn’t know which one will be the best. 1)To store a individual product in random address 2)Store products in owners address 3)Store product in array of products in owners address […]