All Questions

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

TypeError: Type contract Campaign is not implicitly convertible to expected type address

pragma solidity ^0.5.11; contract CampaignFactory { address[] public deployedCampaigns; function createCampaign(uint minimum) public { address newCampaignAddress = new Campaign(minimum, msg....
0
votes
0answers
4 views

Check if Struct already exists in array of structs

I am new to solidity. I have a struct and an array of structs, like this: struct Adopter{ uint age; uint gender; // 0 woman, 1 man // maybe add an id field } Adopter[] adopters; So, a ...
0
votes
1answer
10 views

Solidity. Check if key has value in mapping. Operator != not compatible with types struct

I am new to solidity. I have a Person struct and mapping: struct Person{ uint age; string gender; } Person[] players; // holds the 24 players mapping (string => Person) ...
0
votes
0answers
5 views

Geth-Clique: 2 sealer POA network - sealer nodes not mining - Signed recently, must wait for others - stuck

I have the following setup for a geth clique POA network, however blocks are not mined. The network consists of two separated nodes which are both acting as an active sealer. Sealer 1 Start Command ...
0
votes
1answer
14 views

How is Ethereum Virtual Machine (EVM) isolated (sandboxed)?

I always had this question in mind: What are the used technologies, in order to achieve the isolation of the EVM? does it just run as an isolated process in its own namespaces using the linux feature ...
0
votes
0answers
9 views

How to manually close a websocket connection to ganache-cli

I am trying to reproduce a bug which happens after my websocket connection restarts. To pinpoint the problem I am trying to manually close (and then restart) the ws connection to my ganache-cli node. ...
0
votes
0answers
7 views

TimeoutError when using Infura websocket with web3.py

When I run the following code, sometimes it run OK, most of the time it gave error: concurrent.futures._base.TimeoutError code: if __name__ == '__main__': infura_url_ws = 'wss://mainnet.infura....
0
votes
1answer
21 views

What Ethereum wallet I need

I have lots of experience with bitcoind and it's RPC calls. I want similar Ethereum wallet that supports: RPC calls from PHP, Pyhton and similar languages. erc20 tokens. Must work on Linux VPS (I ...
0
votes
0answers
17 views

how to deploy dynamically contracts? [on hold]

I am developing dapp application where seller uploads item and buyer purchase it. I am stuck on creating a smart contract. my goal is to create per contract for one seller uploads item. if seller ...
0
votes
0answers
25 views

Type Error: web3.eth.Contract is not a constructor but web3.version is 1.0.0

Why can't I instantiate my smart contract? When I try and instantiate an instance of a smart contract with the following code... let contractInstance = new web3.eth.Contract(abi, '...
1
vote
1answer
14 views

What is the ABI code of a map's getter function?

I'm currently trying to call Etherscan's API eth_call to check data from a smart contract. To do that, I need to pass the function ABI code and data. However, the data I need is stored in a map and I'...
1
vote
0answers
19 views

How Can I Sign A Transaction Server-Side?

I have a server-side Node.js app that sends a transaction to an Ethereum smart contract like so: const transaction = await contract.methods .method_name([params]).send({ from: [...
0
votes
0answers
14 views

erc20 token swap contract example needed

is there a contract example which allows to exchange one erc20 for another? i have 2 tokens i want to exchange from tokenA to tokenB 1:1 and keep 1% as a fee the sender should just make a normal ...
0
votes
1answer
5 views

How can I debug a my Solidity smart contract with a GUI?

Is there any way to debug a Solidity smart contract with a GUI, like remix? How can I do it for both testnets and mainnet?
0
votes
1answer
11 views

function overriding is quite working when called with web3.js

function getDetails(address publicKey) public view returns (Organization memory) { return s.getOrg(publicKey); } function getDetails(string calldata orgID) external view returns (Organization ...
1
vote
1answer
16 views

Can the block number be set back in ganache?

I know about tools like ganache-time-traveler that let you advance the block number. But is it possible to go back to a lower value?
0
votes
1answer
14 views

What are the ways to call a smart contract function during development?

What are the ways to call a smart contract function during development using Truffle simulated VM with a GUI interface (like Remix or EtherScan offer)? I know I could use CLI options like Truffle ...
0
votes
0answers
11 views

Listening events

I have a problem I want to solve with watchevent function. I am building a daemon script that submit a transaction when a particular event is emitted. Let's suppose the node that run the script goes ...
0
votes
1answer
19 views

ERC20 Token transfer fails

I'm struggling with transferring my own ERC20 Token. I got following code: contract AccountingToken is ERC20, ERC20Detailed { constructor () public ERC20Detailed("AccountingToken", "MAC", 18) { ...
1
vote
1answer
14 views

Is it possible for 2 transactions from the same address to be mined in the same block?

If I send my ETH from address 0xA, and then immediately send another one also from address 0xA, is it possible for the two to be mined in the same block? Or the second transaction must always be mined ...
1
vote
1answer
19 views

Transactions and smart contracts during reorganization

I learned from this question that transactions will be reverted and rollback after chain reorganization. But after a transaction is reverted, will the sender needs to resend this transaction? Or this ...
0
votes
0answers
28 views

Smart Contract is not working on Geth private network, while it does work on Ganache as well as Remix

I've only begun working with geth from last week and have faced the quite a challenge. I've written a smart contract and it works on remix (JavaScript VM) but somehow it does not work on my geth ...
2
votes
0answers
23 views

What's the point of Truffle Migrations?

I've been reading a few articles and StackExchange posts (e.g. What are truffle migrations?) about Truffle Migrations, but I still don't get it: why do we need them? It seems they do only one thing (...
0
votes
0answers
16 views

Web3 method getTransactionReceipt() does not return token transfer value for particular token transaction

I've tested getTransactionReceipt(), to get all detail about transaction with amount of token transfer. Also tested getTransaction but it returns only Ether transferred value. Is there any other ...
0
votes
1answer
12 views

Solidity. Return a Sruct that lives inside an array

I am not sure how to return a struct that is inside an array of structs. This is my code: contract StudentsInfoTracker{ Student[] students; struct Student{ string name; ...
0
votes
1answer
10 views

return array of strings

how do I return an array of strings? This is my code: contract PlanetEarthContract { string[7] continents; constructor() public { continents = ["North America", "South America", "...
0
votes
0answers
8 views

Inconsistent responses with 'eth_getTransactionByHash' through RPC API. Can anyone help?

I have been using the requests library with python to query the geth/rpc api in order to get ETH transaction data. I connected to geth via "geth --rpc --unlock TESTINGADDRESSWITHNOVALUE --allow-...
0
votes
0answers
22 views

Smart contract function not returning value (decoded output) in Remix

I am completely new to Solidity and would appreciate any help. I have a supply chain smart contract and it contains a function that is supposed to be called by customers and after the call, the ...
0
votes
0answers
13 views

Solidity. How to add an address to a mapping

I have this: contract Diary { string[] private facts; mapping (address => bool) approvedAddresses; address owner; constructor() public { owner = msg.sender; ...
0
votes
0answers
15 views

Listen to Ethereum transactions

I need to listen ethereum transactions for current count of addresses using web3j. I know that I can use subscribe to get transactions, but how can I add some filter to listen a certain number of ...
0
votes
0answers
15 views

One Proxy delegate contract to ten another proxy contracts

I'm trying to figure out why this code reverts. I need to make 10 bottles. This is how I do this: deploy Logic contract deploy 10 Proxy contracts call "upgrade" at each Proxy and pass Logic address ...
0
votes
1answer
18 views

Error returning array in function

I wanted to do a get() to return some contract information, including an array, but when I put it gives this error: browser/leilaoSimples.sol:34:9: TypeError: Data location must be "memory" for ...
0
votes
0answers
19 views

Fetch ETH USD Rate from past using Oracle

Is it possible to fetch the USD rate of ETH at a specific time in the past to a smart contract from an external API using an oracle? i.e. I have a function which tracks whether now > start + 10 ...
0
votes
0answers
19 views

geth issues while running command

I am running the following command with added parameter miner.gastarget on a linux server since we had issues while developing, and have to increase gas limit sudo geth --ipcpath "/home/...
0
votes
1answer
34 views

Web3 js installation error

I want to install webjs so I run the below command but it is showing an error. $ sudo npm install -g web3 npm ERR! path git npm ERR! code ENOENT npm ERR! errno ENOENT npm ERR! syscall spawn ...
0
votes
1answer
25 views

Can I use import {address [ ] } from 'filename' to pass a address array to another smart contract's function?

In my PersonalInfo.sol file I want to pass address array Users(maybe by function SendUserArray, but I don't know how...) to another contract System.sol file. Is it possible to use import {Users} from ...
0
votes
0answers
11 views

How do i connect geth to web3.py using IPC on Windows?

I'll briefly explain my setup before describing the problem in detail. I am on Windows 10 and using the geth client in Light Sync Mode, along with web3.py on Jupyter Notebook and Metamask as a wallet....
0
votes
0answers
19 views

Can't create eth accounts on wifi by using ganache-cli@v7.0.0-beta.0

I was previously getting out of gas error which was resolved by following this issue. Now i installed ganache-cli@v7.0.0-beta.0 . It creates ethereum accounts on localhost if i write the following ...
0
votes
0answers
12 views

How can I specify a date picker in one of the fields in my ContractForm React component?

I'm using the ContractForm React component available in the drizzle-react-component library. It's super nice and easy to setup and use, but I am dealing with a date in one of the fields (which is ...
1
vote
1answer
22 views

Is Egretia (EGT) is still Ethereum Token? Or It has been moved as a Coin to its own Blockchain?

Currently Egretia (EGT) is represented as a Token of Ethereum Network, but is there any changes regarding shifting from Token to Coin on its own Chain?
0
votes
0answers
16 views

How to calculate v for signature?

I created Ethereum private network with chainID 10 (networkID in genesis.json). I have to create raw transaction and sign on it manually too. How to calculate v in signature ? According to this ...
0
votes
1answer
26 views

Pending transactions not mined in private network

I have created a node with the following genesis block: { "config":{ "chainId":9119, ...
0
votes
1answer
16 views

Cannot mint ERC223 token

Hello I have a simple implementation for a ERC223 Token. I use this repository: ERC223-token-standard Here is my contract Code: pragma solidity ^0.5.8; import "./ERC223-token-standard-development/...
0
votes
0answers
19 views

How to solve this error [on hold]

\?\C:\Users\keval\Desktop\project\dcrowdfund\D-crowdfund\node_modules\scrypt\build\Release\scrypt.node is not a valid Win32 application. \?\C:\Users\keval\Desktop\project\dcrowdfund\D-crowdfund\...
1
vote
1answer
12 views

Is “geth debug trace_2” on “Etherscan.io” a native geth output?

I am aware of the debug_traceTransaction function. On Etherscan.io there is an option to view transaction, called Geth Debug Trace_2, which produces output in a format that I need. The option is here: ...
0
votes
0answers
10 views

How to find which transaction cleared a specific address into a specific contract?

I have a contract with contains the following solidity code mapping (address => mapping (bytes32)) public sealedBids; But I failed to find in the solidity code which part can clear it. As result,...
0
votes
1answer
25 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 ...
1
vote
0answers
22 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 ...
3
votes
0answers
53 views
+50

Common Gas Pool for ERC20 Wallets?

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
17 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 ...

15 30 50 per page