All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

How DAI stablecoin is able to be decentralised or how the CDP(Collateralized Debt Position ) process works?

I am reading about stablecoins in order to understand which one would be best suitable for my need( let users of my app be payed or rewarded by a crypto and at the same time lowering the effect of ...
0
votes
0answers
8 views

Retrieving ERC-223 token address on tokenFallback() function

I made a sample smart contract that can update the value of different existing ERC-223 tokens received in the contract as below. Assuming that the IERC223 was taken from here. address[] ...
2
votes
1answer
37 views

How can a smart contract store mutable data outside blockchain?

As storing persistent data on blockchain is costly due to the storage operation being gas-expensive, what are the solutions to store mutable data outside the realm of blockchain from within a smart ...
0
votes
2answers
29 views

Is there a way to create double-spending transactions and submit them to different nodes?

I'm trying to create two transactions with the same nonce and send those transactions to two different nodes. Such as: const Web3 = require('web3'); const web3_1 = new Web3(rpcURL1); // node 1 const ...
1
vote
2answers
42 views

How to post to the blockchain without a third party API like infura

I have been using web3 nodejs and infura.io to build apps that interact w/ the Ethereum Blockchain and it is all great but I don't like the idea of a failure point my my apps because they rely on a ...
2
votes
1answer
34 views

Sending an ethereum transaction with ethers.js and metamask

I've tried two different ways, and have looked through ethers.js documentation, and I just haven't been able to figure it out. Does anyone have any suggestions? This is in a browser. trans(web3,...
1
vote
1answer
21 views

Correct way to build an automatic refunding system for auctions

I want to build an auctions contract and I'm very aware of the push-pull pattern for auctions or sending Ether but beyond that I wanted to explore if there was a way where I could send back the money, ...
2
votes
1answer
15 views

What makes a transaction not mined and stay in txpool?

What Makes a transaction in txPool not mined ?
0
votes
0answers
15 views

What is the maximum gas price that we can set in a transaction?

what is the maximum gas price can we set it in a transaction ? I am always using '3000000' to avoid 'run out of gas exception' (poa network) But when I got 'replacement transaction underpriced' I ...
2
votes
1answer
14 views

How does emit work?

In the following example from the Solidity documentation, what does emit do? highestBidder = msg.sender; highestBid = msg.value; emit HighestBidIncreased(msg.sender, msg.value);
0
votes
1answer
17 views

TypeError: Named argument does not match function declaration

I'm getting the following error while compiling this code: pragma solidity ^0.4.17; contract Campaign { struct Request { string description; uint value; address ...
0
votes
1answer
12 views

Memory Efficiency of Constant Variables

Say I have a contract with several functions that apply various particular constants. circumference = 628318 * radius / 1e5; dividend = balance * 123 / 1e4; It would be easier for readers to ...
2
votes
1answer
19 views

provably fair heads up p2p poker - feasible integration with eth smart contract?

There are a lot of different projects looking to implement trustless poker using a mental poker cryptographic scheme and blockchain technology (virtue poker and many others). But most of these ...
0
votes
2answers
13 views

How to edit transaction data of an ethereum transaction? Or in other words, create a manual transaction, for contracts with no front end?

This strikes me as a very stupid question, but I have googled and cannot find an easy answer. I have identified a contract that I want to interact with- I know the function selector and the variables ...
0
votes
1answer
30 views

How to write smart contract to check deployed owner is intitiating the contract or not, everytime?

I want to write a smart contract where it would check it is owner of the deployed contract is trying to instantiate the contract or not. And by doing to i want to allow only the owner to call smart ...
0
votes
1answer
23 views

Can I write a smart contract to access a database and verify details of a student?

I have to write a smart contract to create a degree certificate of a student in the University. To generate the certificate, I have to clear all the dues in my University's library, Sport's department,...
0
votes
1answer
43 views

Getting “gas required exceeds allowance (93846700840810) or always failing transaction” on private network. How to access geth client via nodejs?

I have recently started using Ethereum. I am trying to test my contract using multiple machines. Only solution I found was to setup a private network using Geth and add peers. Following is the genesis ...
0
votes
0answers
7 views

How can I find reliable Ropsten nodes for adding to my nodes whitelist?

After the recent hard-fork on Ropsten we follow the tip on peter_szilagyi tweet to add a peer whitelist. In case we want to add more nodes to our whitelist as in Connect to static nodes. where can I ...
0
votes
0answers
4 views

Nethreum CreateFilterInput Block Number boundary issue

I obtained the latest block number by using: var Latest = web3.Eth.Blocks.GetBlockNumber.SendRequestAsync().Result; Assume Latest = 400000 I create a filter even from block number 390000 to (the ...
0
votes
0answers
4 views

If I'll remove the peer whitelist that I've added after Ropsten hard-fork split while longest chain exists, how the node react?

After Istanbul Ropsten hard fork split, I followed whitelist tip - https://twitter.com/peter_szilagyi/status/1178634327518781441. How a node will react in case I'll remove the whitelist while the ...
1
vote
0answers
25 views

Solidity calldata for an array of structs

I'm trying to create the calldata offchain for an on-chain low-level call to a method that accepts an array of structs as an argument. I'm not sure how to encode the calldata for this. Here's a ...
0
votes
1answer
25 views

Contract deploy error with Cannot create property 'from' on string

I am getting this error, when I deploy contract by using web3. TypeError: Cannot create property 'from' on string '...
0
votes
1answer
51 views

Web3js - Internal Transaction Data (Event Logs): Token Transfers, Contract Creations, & Internal ETH Transfers

I'm currently recording transaction data via Web3js, while directly connected to a local Geth full archive node via IPC, and I was wondering if there was a more elegant way to record internal ...
0
votes
1answer
32 views

Erc20 address generation

Can someone tell me how it is possible to implement the generation of unique erc20 addresses for registered users?
0
votes
1answer
17 views

What does it mean to flush to an ethereum address

If ether is sent to a contract then flushed to an address what does this mean? Does it mean the contract sends the money to a recipient?
0
votes
1answer
25 views

Deploy smart contract to Ether scan network

I am trying to make a sample smart contract and migrate to ether scan explorer but not able to deploy. I am using truffle, infura and metamask to test my application. i am able to compile it ...
0
votes
1answer
27 views

How to initialise a mapping variable of a struct?

I want to add elements in moneyLineData of a Bet instance. pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; contract Betting { struct Bet{ uint betId; string question; ...
1
vote
1answer
40 views

Web3js & Web3.py ERC20 Name, Symbol, & Decimals call(): Results in Web3.exceptions & OverflowError for Some But Not All Existing Contracts

I'm building simple Javascript & Python 3 scripts using the Web3 module to output ERC20 token names, symbols, and decimals from any given contract address. The standard ERC20_ABI json file was ...
0
votes
1answer
18 views

Msg.data returns wrong format through fallBack function

When I call the same function twice, first through a direct call an event logs the exact parameters, second through a delegateCall from another contract, it returns the same parameters but the format ...
2
votes
0answers
28 views

Ethereum Smart Contracts/dApp’s open source license?

Can a smart contract in which it’s source was released be GPLv3/GNU licensed? I.e. if a company were to release the source code to a smart contract, can that smart contracts source code be GPLv3/GNU ...
0
votes
0answers
8 views

Synchronization with Parity

I am running synchronization with Parity, when I disconnect the server from my client-side ssh interface, will the synchronization process be interrupted?
0
votes
1answer
41 views

Payable external function call not updating state variables

I'm trying to get buyToken() to update the balance of the caller. I'm using Truffle and Ganache, running tests, but the testBuyToken() function keeps failing, apparently the BALANCES variable isn't ...
0
votes
1answer
41 views

Building a deterministic wallet without random seed phrase instead multiple static inputs

If I want to be able to create a private key given inputs x,y,z and these inputs are constant, if I add enough entropy as a salt would it be secure to create a key this way (in terms of brute force ...
0
votes
1answer
24 views

Unlock Ethereum account via infura

I am trying to connect my wallet (Metamask) via Infura, but I receiving an error. My code: [HttpPost] public async Task<IActionResult> LoginAsync([ModelBinder(typeof(AccountBinder))] ...
1
vote
1answer
32 views

Add Number to Item in all Struct Members

I have a struct where I want to increment an item across all struct members. For example, say there is a struct 'Contract', and new customers get their own bytes32 ID, which points to their own struct:...
0
votes
1answer
12 views

smart contract issue [duplicate]

hi I accidentally sent it eth to a eth smart contract from my exodus wallet instead of sending it to my metal mask and sending it from there is there any way to retrieve and withdraw this money back ...
0
votes
1answer
25 views

How often Geth/Parity access the archive chain files? Can I store remote?

I'm running a full archive node to receive and send funds (ETH & other tokens also). The size of the blockchain is very large, so I'm thinking about storing it remotely and mount as an sshfs ...
0
votes
1answer
31 views

How to execute contract methods without metamask confirmations?

I would like to know if there is a way to execute my contract methods without requiring the confirmation of metamask. I found something web3.eth.sendSignedTransaction but can't seem to figure out ...
0
votes
1answer
36 views

Consortium vs. Permissioned Blockchains

I hear these two terms interchangeably Consortium Blockchain and Permissioned Blockchain. Are they the same? If not, can you please show the difference between them. P.S. Since there exists no ...
0
votes
0answers
7 views

CI/CD principles for creating an ethereum network on Cloud

I am setting up an ethereum network on the public cloud. Are there any specific CI/CD principles specific to Ethereum which could be implemented while setting up Ethereum Network on Cloud? Also, are ...
1
vote
0answers
12 views

What is the purpose of `internalType` now generated by the Solidity compiler in ABIs?

Newer Solidity 0.5.x compilers generate ABIs whose function and event parameters contain an internalType field as well as the usual type. In the examples I've seen, type and internalType usually have ...
0
votes
0answers
20 views

fallback function using Relay contract with delegate call in web3js not working

I have checked all over the stack but I am still unable to call the delegate function properly in Relay contract which supposed to call its fallback function. I am using solidity version ^0.5.0 I ...
0
votes
1answer
19 views

can a gas comission be paid by the owner? [duplicate]

I want to create a token but, I want people to send the tokens without them paying for the gas, is there any command to do this
0
votes
0answers
22 views

Service for selling ERC20 Token directly for fiat?

So currently our ERC20 token is trading on several DEX's. There is quite some volume but some potentially interested people have given us feedback on the process being a little bit too much for them. (...
0
votes
1answer
14 views

ETH: How many transactions are added to the mining pool per time period

Every ETH transaction which is created is first added to a pool of pending transactions, from which then the miners pick them. I wonder whether there is any source (research paper / ETH stats website /...
0
votes
1answer
30 views

invalid solidity type

solidity 0.5.0 web3@ 0.20.7 In my contract.There's a function (view) returns a struct type. When I used web3.js to call this function, I got "Error: invalid solidity type!: tuple". I know that this ...
1
vote
3answers
128 views

gasLimit 5000 on private Ethereum geth node

Problem: I've upgraded my geth node to the latest version (1.9.0-unstable). The block gasLimit of the node is fixed at 5000: eth.getBlock("latest").gasLimit 5000 When I try to send a transaction, I ...
0
votes
1answer
31 views

How to build security into Dapps?

I am building a loan dapp. The functionality is not easy to build but relatively straightforward. My question is though does anyone have any suggestions of how to build in user logins and security? ...
0
votes
1answer
27 views

payable function not working

function() payable external { eth_balance[msg.sender] += msg.value; } This is not working. The execution is reverted and uses about 21,000 gas. No matter if I set the gas crazy high like 800,...
0
votes
1answer
16 views

Is it possible to store an array of bytes (so something like bytes[])?

Edit The original question below seems to work as expected. The issue happens with the call return data is empty. When the response is nothing, the code below fails. The following works, but is ...

15 30 50 per page