All Questions

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

Gas optimisation for my art experiment spacecans.com

so I was microdosing some research chems and the thought came to me that I need to do some artsy blockchain stuff for once. It's two tin cans floating in space that you can advertise your so-called ...
0
votes
0answers
2 views

Is there any RLP library implemented in C++ or C?

I have to use RLP C/C++ library in Intel SGX. I want simple one. Because boost library cannot be used in the enclave. so I can't use Aletha library. Following projects seem to have a problem, so it ...
0
votes
0answers
7 views

Common Gas Pool for ERC20 Wallets? [Bounty will be added when the option to do so is available]

We have a wallet structure where users send tokens to individual user wallet addresses generated for them, we then sweep all the funds in the user's wallets to a centralized pool. The individual ...
0
votes
0answers
4 views

What are some practical considerations for leap seconds?

From the solidity docs on time units: Take care if you perform calendar calculations using these units, because not every year equals 365 days and not even every day has 24 hours because of leap ...
0
votes
1answer
6 views

Setup Etherum private blocjchain on server?

I have an issue of connecting Ethereum private node on that particular Ip server in which I setup the ethereum node.I create a gui of server enbale json rpc client on 127.0.0.1:8545.When I connect ...
0
votes
1answer
8 views

How can I generate random seed for new account of web3js?

I had created wallet account using web3.eth.accounts.wallet.create(). Now I want to generate random seed for that address. So which method of web3js will be helpful?
0
votes
0answers
8 views

Bootnode connection error

i am trying to create private POA network in which i have 3 aws ec2 ubuntu servers. on 1st server bootnode and on 2nd server POA node1 is running and on 3rd server POA node 2 running. but i am not ...
0
votes
1answer
17 views

Transactions on my private ethereum blockchain don't work. The balances of the accounts stay the same

I have 2 accounts with initial balance, 100000 and 120000. I tried 2 transactions. The 1st was a 20000 ether transaction from the 2nd account to the 1st. And a 1000 ether transaction from the 2nd ...
0
votes
0answers
12 views

did peoples ethers get doubled after the hard fork? [duplicate]

I have a question and it's may be a little bit silly but I have to ask it. best why probably is to explain it with an example. lets say I had 2 ether on ethereum network before the DAO hard fork. now ...
0
votes
1answer
8 views

how to call a function with ether through web3

I'm writing a simple DApp in webpack sample(metacoin) in truffle,there is a function that need to call with 2 ether and 1 input parameter. And my question is how to call that function in the index.js,...
0
votes
1answer
10 views

analyzing transaction cost for a smart contract

Given a smart contract, How do I figure out the total amount of gas used? Say for example a smart contract which has a parameterized constructor which stores 5 variables which are address type ...
0
votes
1answer
22 views

web3.js installation problem

I've ran into a problem trying to install web3. I went through here and stackover flow to try and solve the issue but had no success. I had to install python2.7 but still getting this error. Any ...
0
votes
1answer
12 views

Error: invalid address when I want send transaction

Trying to execute a contract function with web3 1.2.1. I have an Erc20 standard token. mintCoin: function(amount, sender, callback) { console.log(contractInstance.options.address); //all good ...
1
vote
1answer
18 views

secp256k1 library does not create correct public key

I am trying to get public key from private key using secp256k1 library. https://github.com/bitcoin-core/secp256k1 I set same private key(sk) in here. https://github.com/ethereumbook/ethereumbook/blob/...
0
votes
0answers
15 views

Problems subscribing to infura via websockets

So I have a dapp that includes a node server, which I have got to work successfully using ganache, using this line: web3 = new Web3(new Web3.providers.WebsocketProvider('http://127.0.0.1:8545')) I ...
2
votes
1answer
21 views

Getter functions for loop security

Is there any security issue when making for-loops inside getter functions ? Let's say the array is very large, and it takes a long time to loop through the array. Is it a potential threat or I can ...
0
votes
0answers
21 views

Sign Message using passphrase only

I'm creating an authentication system using python and web3.py. I'm trying to authenticate a user using from web3.auto import w3 msg = 'sdb41554xcb4xc548cxd84dxcb' message = encode_defunct(text=...
0
votes
1answer
22 views

cannot be able to connect to private blockchain hosted at local VM

I want to use remix IDE and want to connect web3provider which needs to be connected to private blockchain running on VM locally. My system is running on Windows 10 and I am running the VM on my local ...
0
votes
0answers
12 views

Go Ethereum, processes transactions slower over time

I execute a specific order of transactions, in sets of 20 experiments. After time, the same transactions have a larger delay. If I recreate the BLockChain, the delay returns to the minimum again. I ...
0
votes
0answers
13 views

how to increase peer count when inboud 30303 port has been forbidden by firewall?

to protect my geth node1, I need to let it behind a firewall which forbidden inboud of 30303 port. In the meanwhile, I start another node2 out of the firewall, and I add node2 to node1's peer list. ...
0
votes
1answer
27 views

How to connect project without web3 js npm package

I'm working with ASP.NET Core project and wanted to connect Blockchain with it. But the problem is, we don't want to use Web3 npm packages. Hence, I have added web3 js as follows <script src="...
0
votes
0answers
9 views

Contract not deploying with web3

I'm writing a web-based DApp with web3, and am trying to get my JavaScript to deploy a contract. I've set up the abi, contract, and bytecode as follows: const trade_abi = [ ... not shown: ABI copied ...
0
votes
0answers
4 views

BrowserSolc not defined

I'm trying to use BrowserSolc in my dApp, but it's just not loading, it seems. I've got browser-solc.min.js in the same folder as index.html, with the following near the top of the page: <script ...
1
vote
3answers
31 views

Why web3.eth.getAccounts().then(console.log) return empty array?

It's really weird that I got empty array after I tried to web3.eth.getAccounts().then(console.log);and I also got a warning which is ./node_modules/web3-eth-accounts/src/scrypt.js Critical dependency: ...
0
votes
1answer
19 views

Warning: Unused local variable: bool

contract Puzzle { address payable public owner ; bool public locked ; uint public reward ; bytes32 public diff ; bytes public solution ; /*constructor () payable public {...
0
votes
0answers
11 views

Developing a dapp using Truffle. Metamask will sometime throw this error when interacting with a simple contract

Trying to setup my development environment to start a personal dapp project. I am starting off the project with the React truffle box. 1) I start by running truffle develop which launches a local ...
0
votes
1answer
9 views

Why does webjs 1.0.0 cdn show api 0.20.7?

I have a project where rather than installing modules I have to import web3.js cdn. It's possible to find it here: https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.34/dist/ In the project ...
0
votes
0answers
14 views

Contract with multiple signing keys

How things work I have a Factory contract, FContract. FContract can be called by a user as many times as they want, creating instances of, let's call it, contractA. Thus, they're able to own as many ...
0
votes
0answers
10 views

Call smart contract function in geth

Environment, Ubuntu 18.04: bs@dharma ~/Schau $ geth version Geth Version: 1.9.3-stable Git Commit: cfbb969da803d4cc92e1a64fc1b3c06db299b564 Architecture: amd64 Protocol Versions: [63] Network Id: 1 ...
0
votes
0answers
9 views

Pulling EVM Bytecode of Contract Address [duplicate]

Is there a way to pull the EVM bytecode of a given contract address? Using Web3 perhaps? I believe using the web3.eth.Contract command may get access to the contract, but I am specifically looking ...
2
votes
1answer
15 views

What size is an enum member inside of a struct

Let's consider the following code: pragma solidity ^0.4.18; contract Test { enum EnumTest { Test0, Test1 } struct StructTest { EnumTest Foo; uint256 Bar; } } Not taking ...
0
votes
1answer
8 views

Encrypted transaction from one account to another on Ethereum blockchain

I have to send an encrypted transaction from one account to another in ethereum blockchain. I downloaded Ganache to create the ethereum blockchain. How do I carry out an encrypted transaction? Do i ...
0
votes
0answers
9 views

Note: The called function should be payable if you send value and the value you send should be less than your current balance

interface ERC20Interface { // function transfer(address _to, uint256 _value) external; function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(...
0
votes
0answers
16 views

“Out of Gas” while transferring ethereum from account to contract

I am using ganache to create 10 ethereum accounts. I want to transfer ethereum from one account to a smart contract. I am doing this by writing two following smart contracts in solidity; pragma ...
0
votes
1answer
16 views

How to validate proper implementation of ERC-1155 contract?

I want to implement an ERC-1155 contract. Using TDD we would first write a test. Which begs the question of is there a way to validate that your contract properly implements ERC-1155?
0
votes
1answer
22 views

Error: Explicit type conversion not allowed from “int_const 11111” to “bytes32”

I have the following code snippet: pragma solidity ^0.5.1; contract Puzzle { address payable public owner ; bool public locked ; uint public reward ; bytes32 public diff ; ...
1
vote
3answers
189 views

How does solidity handle mod 0?

Imagine you have a function like this: function compute(uint256 a, uint256 b) external pure returns (uint256) { return a % b; } Does it revert when b is 0?
1
vote
0answers
13 views

How does getDefaultProvider work in ethers.js?

From the docs: This creates a FallbackProvider backed by multiple backends (INFURA and Etherscan). This is the recommended method of connecting to the Ethereum network if you are not running ...
1
vote
0answers
28 views

Help hacking this contract

This is a very simple contract that I can't hack and I'm stuck, I need some help to get the concepts right. pragma solidity ^0.4.10; contract SimpleToken { mapping(address => uint) public ...
2
votes
1answer
18 views

Is it possible to disable “Stack too deep” errors while in development?

I know about the Stack too deep error and the workarounds for it, but I was wondering whether it's possible to disable it while in development. Is there a pragma experimental flag for this, similar ...
0
votes
1answer
24 views

Web3 - how to add WEI and ETH values correctly

I'm working on an auction feature in my DApp and having problems correctly adding together two WEI values. The contract stores two important values: 1. A minBidIncrement variable - which I've set to ...
0
votes
1answer
13 views

Storing a monero address in smart contracts?

Assuming I would have to store Monero addresses or any cryptonote based coins addresses in a smart contract, would there be any issues? Consider that those addresses are as long as this random ...
0
votes
0answers
9 views

Feeding a contract address to echidna

Simple question: Can I use echidna on a contract address? Like in mythril the command I use is myth -v4 analyze -1 -a 0xec410f642db4a2bcc4d7a69bc13b1165ebad3cea. I don't see any supporting ...
0
votes
0answers
8 views

Getting null on eth_call JSON-RPC for ERC20 transfer function

I'm doing an experiment on checking the transfer(address,uint256) result against the BNB ERC20 token contract 0xb8c77482e45f1f44de1745f52c74426c631bdd52. Assumption: the data field value is ...
0
votes
1answer
8 views

Cannot call functions from another deployed contract that inherits yet another contract

I am just trying this using Remix editor. I am able to call functions from another deployed contract(plain as simple) but when that another deployed contract inherits yet another contract, Now the ...
0
votes
1answer
20 views

How to get absolute value in solidity?

In JavaScript, there is "Math.abs": Is there a similar function in solidity itself or some other popular library such as SafeMath?
-1
votes
0answers
18 views

How to avoid getting zero as random number?

I am generating random number using both oraclize and blocktimestamp, I want to avoid getting zero as random number, I want to set minimum number to 1 instead of 0. How can I do that? Following are ...
0
votes
0answers
4 views

sender account not recognized error when using “WrestlingInstance.registerAsAnOpponent({from: account1}) ”

I'm following the ethereum walkthrough at: https://hackernoon.com/ethereum-development-walkthrough-part-2-truffle-ganache-geth-and-mist-8d6320e12269 I got stuck at account0 = web3.eth.accounts[0]. ...
1
vote
1answer
24 views

What are the steps of deploying a smart contract to the blockchain?

Are the above steps correct for deploying a smart contract to the blockchain: A node creates a smart contract The smart contract is converted to byte code The node creates a block out of the byte ...
0
votes
0answers
21 views

send().catch() doesn't give me the error message anymore

I'm using Truffle/Drizzle/MetaMask and calling methods with send() and using .then() and .catch() and I rely on getting the error message send to .catch() e.g. contract.methods['hello'](arg).send({ ...

15 30 50 per page