All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
720 views

Dealing with events in ethers.js

I'm trying to get a better understanding of arbitrary bytes parameters, so I wrote a one-function smart contract that accepts a bytes argument, decodes it, and returns the response. I am having ...
0
votes
1answer
1k views

Truffle console error “Error: Returned error: VM Exception while processing transaction: revert”

I compiled and migrated my solidity codes of erc20 token to development networks on truffle, and use it on truffle console. truffle(development)> let instance = await XToken.deployed() truffle(...
0
votes
1answer
10 views

Truffle re-deploy unchanged contracts on every migrate

On every truffle migrate truffle deploy contracts even if they are not changed. although it doesn't re-compile Truffle v5.0.5
0
votes
1answer
85 views

i want to get data from the transaction hash i tried many codes at last i am getting boxes in the output

1) First, I got the input console.log(web3.eth.getTransaction('0x725fc75264726f409793164e336e7d5ed35df8d2be469a0cc1a3a8cc4756b9b9').then((i) => console.log(i) )); 2) I manually pasted the input ...
1
vote
3answers
2k views

Can I create 100 unique addresses for the same wallet?

Can I create say 100 unique Ethereum addresses for the same wallet/smart contract? I can then assign the different addresses to 100 different affiliates.
0
votes
4answers
68 views

Restricting payment from one account only

I am a beginner in ethereum DApp development and I am testing my Contracts in Remix IDE. My question is that can I restrict only one account to pay for all the transactions happening on my application ...
0
votes
1answer
588 views

Web3j decode function from TransactionReceipt

I'm connecting to a testnet using a Geth node running version 1.8.8-stable, and also I'm using the web3j lib version 3.4.0. I deployed a Smart Contract and also used the web3j wrapper tools to ...
0
votes
0answers
14 views

Prevent opening metamask on ethereum.enable/creating new web3 instance [closed]

How can I prevent initializing Metamsk on window.ethereum.enable() or on creating a new instance of Web3?
0
votes
1answer
150 views

ContractInstance.method is undefined

When I use contractInstance.getDrawStats or any other method it returns error method is not a function because of contractInstance doesn't contain any contract methods. However, they are definitely in ...
0
votes
2answers
42 views

Are there a standard for generating a unique thing to send to the smart contract?

Are there anything that is unique maybe combine with time, user address or something else, and send it to the smart contract, and the contract can know that it is indeed the unique thing that user ...
1
vote
0answers
12 views

Time-dependent tests with Buidler?

For Ganache, there are several solutions. What about Buidler? They implemented their own local blockchain, buidlerevm, which is different to Ganache.
0
votes
1answer
10 views

Why is the receive () external payable not acting as a fallback?

I have this simple code in remix.ethereum pragma solidity ^0.6.1; contract SimpleWallet { address owner; constructor() public { owner = msg.sender; } modifier ...
2
votes
2answers
51 views

How to decode a transaction to verify its signature in Javascript?

I noticed that it's possible to sign a transaction with a wrong private key. I took the following example found at https://github.com/ethereumjs/ethereumjs-tx const EthereumTx = require('ethereumjs-...
0
votes
2answers
74 views

How to make token for exchange such as bittrex? I'm interested only in technical side of this question

Should I set a starting price for the token? Is there a source code for the token for trading on the exchange?
0
votes
1answer
1k views

What ports do I need to open when setting up a mining pool

I am setting up a pool as a VM on my home computer using the instructions provided by https://github.com/sammy007/open-ethereum-pool/ I have followed the instructions and managed to get a test miner ...
0
votes
2answers
931 views

How can I change the 12 word phrase in my trust wallet?

I created a ETH trust wallet on my phone for someone and he has now imported the trust wallet to his phone. Is there any way to change the 12 word phrase or somehow give the sole control to the ...
3
votes
1answer
43 views

Merkle Hash forest and MErkle DAG is it the same?

I'm wondering if a merkle hash forest is the same as a merkle dag? I need a reliable paper as reference I could cite in my paper. Thx for all your help!
0
votes
3answers
44 views

Could not assign contract state variable value to javascript variable

I want to retrieve and assign the value of my contract state variable to my javascript variable.I am doing as per guidlines provided on this community, but failed to assigned. my javascript code is ...
0
votes
1answer
19 views

Interacting with Bytecode

Is it possible to interact with a smart contract with bytecode only (without ABI)? If yes, how can I do this?
1
vote
1answer
100 views

Web3 method call returning unexpected value with certain smart contract setup

I have tried to implement a persistent data storage with smart contracts as seen with the following code (this is an example that mimics what my actual code does). I have a data storage contract with ...
0
votes
2answers
780 views

How to transfer ERC20 tokes from Blockchain wallet to MyEtherWallet?

I got some token and by mistake sent them to my Blockchain ETH address. Now, what is the process of transferring them to MEW? They talk about exporting your private key, what does that mean and to ...
0
votes
1answer
9 views

Connect web3.py with Ganache

I am new to this. So, how do I connect web3.py with Ganache. I've got Ganache up and running, smart contract deployed. I would like to interact with it from, lets say, a python shell. So, this is what ...
1
vote
5answers
255 views

mapping one id to multiple addresses

Suppose I have a product with a specific id for sale(so I am the owner) and someone wants to buy the product from me. When he pays the price he will become the new owner of that product. How can I ...
1
vote
1answer
463 views

ecrecover on bytes32 array elements

I am creating a contract which will allow an atomic transfer of a token with only the buyer needing to pay gas (instead of both parties). I am doing this by creating an agreement with price, quantity ...
0
votes
0answers
5 views

What is the expected daily egress traffic from full Testnet node

I have a full testnet node running on GCP with Parity. After about a week of having it fully synced, the egress traffic from the server spiked substantially and started sending out 250GB per day to ...
1
vote
1answer
29 views

The send transactions “from” field must be defined using Infura web3

when I try to send my transaction using infura I get this error "The send transactions "from" field must be defined" My problem is my web3 object. When I used Metamask and ...
0
votes
1answer
333 views

web3.eth.accounts.wallet.add(account) not working

I need help with adding a new wallet to a web3 instance. e.g.: web3 = new Web3(new Web3.providers.HttpProvider(connectionString)); const account = await web3.eth.accounts.privateKeyToAccount('0x'+...
0
votes
0answers
8 views

Read ABI directly from network api in GOLang

Using go-ethereum package how can we read the JSON file of the deployed contract and then get the ABI out of it and then instantiate? I don't want to compile smart-contracts into GO but want to use ...
4
votes
1answer
378 views

Create new account over IPC

I want to create a new account over IPC so I have started private chain with the below command geth --networkid=5 --datadir DataDir --ipcapi "db,eth,net,web3,personal" --ipcpath "/Users/smartSense/....
1
vote
1answer
68 views

ERC721 Metadata and Items

i'm new to ERC721 tokens so this may be a stupid question. Following the Opensea docs and other docs (for example openzeppelin ones), I just create a simple ERC721 token that i called "avatar" which ...
2
votes
1answer
99 views

How to create an HD wallet transaction in ethereum? How to sign a transaction for multiple addresses in ethereum?

Suppose I know the number of hd child addresses used by my ethereum account, i want to send ether from those addresses. How to sign such a transaction using ethereumjs-tx? I need to send all the ...
1
vote
0answers
12 views

Why does ethereum chaindata sometimes sync while syncing?

I am doing a fresh geth 1.9.18-stable sync, which I believe is fast by default. I am keeping an eye on the size of the .ethereum/geth/chaindata/ directory and have noticed that it does not increase ...
0
votes
1answer
587 views

Error: Transaction was not mined within 750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!

This my delpoy.js file: const HDWalletProvider = require("@truffle/hdwallet-provider"); const Web3 = require('web3'); const {abi , bytecode} = require('./compile'); const provider = new ...
0
votes
1answer
25 views

What happens if two different states of smart contract conflict?

I'm newbie studying blockchain and Ethereum. While I'm studying, I've got a question. What will happen in the case of conflict of two different states on smart contract, e.g. from the network ...
0
votes
0answers
21 views

No error message returned in Ropsten [closed]

I deployed my smart-contract in ropsten test net after successful testing in local test net. I have used a modifier that has following code require(taskFlag == false, "Task already created.")...
0
votes
2answers
66 views

Is there any way to scale geth (or any client) API Layer to query a single node?

as title suggest, what I'm trying to do is to have multiple "app" that expose Json RPC endpoints, like get_balance, get_block / eth_getBlockByNumber / eth_getBlockByHash, so I need to read a full node,...
1
vote
1answer
327 views

Custom token sent to wallet , does not show in wallet

I am using the rinkeby test network and i created a custom token using the basic code stub given on the ethereum.org site. So I transferred to another account which is also on the rinkeby network. But ...
0
votes
0answers
8 views

Error when recalling smart contract using code; todoList = await TodoList.deployed() [closed]

When I try to recall the contract after it has been successfully deployed, I type the following code: todoList = await TodoList.deployed() ReferenceError: TodoList is not definede console at ...
2
votes
2answers
126 views

Why return to String need so many operations when develop a smart contract?

I found a smart contract. The address is '0x2fabe69843e9a74a35b89145cb52e5568986c7a1'. I am really confused about is that why it need over 3000 lines Opcode to when Created this smart contract? Like ...
2
votes
1answer
9 views

How can I use “@” (at sign) syntax with Remix?

I've seen multiple times Solidity contracts, which are using import "@somename/.../SomeContract.sol" syntax. Here's the example: pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; ...
1
vote
0answers
32 views

Execution erorr: Invalid opcode on estimateGas | Possible unhandled promise rejection

pragma solidity ^0.5.0; I get invalid opcode error when trying to estimate gas needed for my transaction from react-native using the following line of code: const gasAmount = await contract.methods ...
0
votes
1answer
907 views

How to recover an ethereum account with the mnemonics ? And the other way around, namely to generate the right mnemonics from an account?

No geth, or other command line tools, or clients like MetaMask and Mist. What I need is the exact algorithm to recover an account from mnemonics and the other way around.Appreciate implementations of ...
0
votes
1answer
45 views

Parse error:expected primary expression on remix. is there any way to fix this? [closed]

function retrieveEHRs(string stringToBytes32, string retrieve_name, address userPK,string storageName, address AreaID, address PatientID, string Hash_value) onlyAdminp public{ bytes32 key=...
19
votes
3answers
14k views

Convert address to string

In Solidity, how can I convert the sender address to a string? The comments in How to convert an address to bytes in Solidity? did not provide a working solution
1
vote
1answer
28 views

Recovered address not matching signer address (using ethers)

Below is a simple signature verification flow I wrote, along with a test case with Buidler (all mainly to learn how to verify signatures in a Solidity smart contract). The problem is that the address ...
0
votes
0answers
33 views

How does MetaMask secure / store unlocked accounts?

I understand that MetaMask stores the encrypted vault somewhere like C:\Users\USER_NAME\AppData\Local\Google\Chrome\User Data\Default\Local Extension Settings\nkbihfbeogaeaoehlefnkodbefgpgknn ...
3
votes
0answers
213 views

Did f2pool manipulate transactions during the Status ICO?

Blocks such as this one and this one appear to show preferential treatment being given to f2pool transactions in blocks mined by f2pool during the beginning of the Status ICO (at block height 3903900)....
4
votes
1answer
128 views

What is the “pre-commit” scheme to defeat frontrunning attack?

I am writing to inquire feasible strategies to defeat Transaction Ordering Dependence (TOD) bugs. I learned from the best practice guideline such that we can use a so-called "pre-committed" scheme ...
1
vote
3answers
42 views

How to prevent frontrunning: someone running a transaction before me?

Let's say I have the following in my smart contract: string passwordHash; uint money; function checkPassword(string cleanPassword, string newPasswordHash)[...] When running the function ...
1
vote
1answer
8 views

State Changes within a Block

I read somewhere that the 'state' is only updated at the end of each block. I've also read that each block contains a specific sequence of transactions, and thus implicitly 'updates' the state within ...

15 30 50 per page