All Questions

0
votes
0answers
7 views

Can value of a public variable in Solidity be called and returned by web3?

How to get value of a public variable in Solidity be called and returned by web3?
0
votes
1answer
8 views

Cannot call function even though it is present in the jsonInteface

I have a simple contract with a simple test-function: pragma solidity ^0.5.0; contract TestContract{ uint public a; uint public b; constructor(uint _a, uint _b) public { a = _a; b = _b; } ...
0
votes
0answers
17 views

Hoiw to convert string to address with web3

I am getting address value with html input as string value how do we convert the string to address for parsing with truffle-contract. Here's the method I am using: registerAirline : async() => {...
0
votes
0answers
11 views

What are blockchain interview quesetions?

What are some best blockchain, ethereum and smart contract interview question that I must know ?
0
votes
1answer
6 views

How to view or transfer initial ethereum smart contract balance?

I created a new smart contract token with initial supply and deployed it via MetaMask. Then I added this token into MetaMask but token balance is Zero. Now, My question is when we create a new ...
1
vote
1answer
11 views

What is deployed smart contract address in solidity?

In remix IDE when we deployed the contract there is address on it. What is that address and what that address is used for? Like Ethereum account address is use for transaction and identify the user ...
0
votes
0answers
14 views

address.transfer executes but doesn't make the transfer

I'm using Metamask and web3.js to connect with a donation smart contract. Following is my JavaScript function: function withdraw(){ const contractInstance = connectToContract(); var ...
0
votes
1answer
16 views

Calling Smart Contract function returns tx object instead of expected return value in Truffle test

I have started writing a smart contract for a gift registry. When I write tests using the Truffle Framework I get unexpected return values. For example, when calling the offerGift function from ...
-1
votes
0answers
7 views

What can I write in the app.js to exchange with ethereum smart contract

I want to send data to storage it into blockchain from file .txt automatically every hour. this is my smart contract : pragma solidity ^0.5.0; contract Storagedata{ bytes32 data; function setData( ...
0
votes
0answers
6 views

How to console.log the value in the React js for the Dapp + truffle project

I am beginner with the ReactJS and Dapp. In my js page I want to get the value after doing some operation on the input value and want to dispay that result. I got the Nan in the front-end screen. ...
0
votes
0answers
6 views

How to integrate Dapper Wallet smart contracts with web app?

Dapper Labs who are the creators of Cryptokitties recently released their own wallet which is run by smartcontracts. They have open sourced the code: https://github.com/dapperlabs/dapper-contracts I ...
0
votes
0answers
17 views

The send transactions “from” field must be defined on etherum

I am trying to create an E-Voting/Auction system using Smart Contracts. As per the Youtube Tutorial video https://www.youtube.com/watch?v=3681ZYbDSSk&t=217s on 1:25:23. I'm not able to get the ...
0
votes
0answers
8 views

Anything like a static delegatecall from a view function?

let's say there are two contracts A and B, where A calls methods in B. I understand that A can modify and read storage in B with B.call() and B.staticcall(), ie. A can execute B's methods in the ...
0
votes
1answer
6 views

Code not returning when using websocket provider in web3

Below are two code snippets. I have created a 'ganache-testing.js' file and running it using node ganache-testing.js command Web3 = require("web3"); provider = new Web3.providers.HttpProvider("http:/...
0
votes
1answer
15 views

How to differentiate a smart contract from a common wallet?

Having an Ethereum address, I need to check whether it is a wallet or a token (ERC-20 contract). How to check? (I need to implement it with Web3js.) Ideally, it should also reject contracts which ...
-1
votes
1answer
13 views

solidity project using truffle

I do not know what the issue try to run truffle
1
vote
1answer
13 views

When do you use ganache-cli and when do you use ganache-core?

I have seen two usages over the internet 1. const ganache = require("ganache-cli"); web3.setProvider(ganache.provider()); 2. const ganache = require("ganache-core"); web3.setProvider(ganache....
0
votes
1answer
22 views

Is this logic possible?

Lets suppose here are user A and smartcontract B and C. A has no token but little ETH for gas, but B has enough tokens(Erc20). A send TX to B B send delegatecall to C C receive tokens in B and give ...
1
vote
1answer
17 views

How does a Truffle migration know the address of a contract before it is created?

How does the truffle migration of this contract know what the address is of the registry contract, in the constructor: https://github.com/marbleprotocol/humanity/blob/master/contracts/Humanity.sol ...
0
votes
1answer
28 views

Is a contract verified and safe if it's created by a verified contract?

The contract source code is not verified as you can see in the picture, but the contract was created by another contract code which is verified. Does that mean that the contract code from the picture ...
1
vote
1answer
15 views

Getting the transaction hash on function call

I am new to Solidity, Web3, and Ethereum. I am trying to build a web application through which users can upload a file to IPFS, then store the IPFS hash in the blockchain. I am using the React truffle ...
0
votes
0answers
15 views

How to sign a txn using web3 (1.0) and nodejs?

Firstly I know this has been asked before, but I have became confused with so many different formats and the move to 1.0. Many online resources do not make it clear about the version and I have become ...
0
votes
0answers
14 views

Infura websocket API timing out on connect

Has anyone ever had issues with the Infura Websocket API suddenly ceasing to respond. I have been using it to subscribe to event logs, but now the connection to the API is timing out.
-1
votes
0answers
16 views

Compiling Solidity contract I am getting Error

While executing this code (compiledCode = solc.compile(code)) in Command Prompt, I am getting '{"errors":[{"component":"general","formattedMessage":"* Line 1, Column 1\n Syntax error: value, ...
0
votes
1answer
38 views

How do I overcome the problem of gas limit?

Here is my genesis.json file { "config": { "chainId": 1994, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0 }, "...
0
votes
1answer
25 views

Private Company Network

I've got some questions regarding coonecting 2 ethereum nodes (geth) between two different networks: e.g. company A and company B. First, I've already connected two different nodes within the same ...
0
votes
0answers
10 views

How to access my wallet with a mnemonic phrase in mycrypto.com desktop app?

So here is the case: I downloaded mycrypto.com desktop app and created a mnemonic phrase there. After typing in the phrase it allows to choose a wallet from many different wallet numbers (addresses ...
-2
votes
0answers
20 views

Why do I get this error when I type “truffle migrate”?

I made a smart contract and then while I am trying to deploy it I find this. Here is the exact output I am getting. I have already made changes in the truffle-config.js file. Compiling your contracts....
0
votes
1answer
19 views

Does nonce same for all node?

Suppose in blockchain network we have 5 nodes and we have new transaction done by first node of network, so now rest of 4 node will mine the transaction to commit it in blockchain network, will the ...
1
vote
0answers
11 views

filter blocks by time range on https://etherscan.io/

Could you please tell me how I can filter the blocks by its created time on https://etherscan.io/? For example, if I want to find all blocks that were created between May-22-2019 04:50:00 AM +UTC and ...
0
votes
1answer
12 views

How we can integrate truffle with Jenkins?

is it possible to add truffle on Jenkins pipeline?
0
votes
1answer
20 views

Transaction completion in Ethereum smart contract

How can I calculate the deployment time and completion time of a smart contract transaction using web3.js?
0
votes
0answers
13 views

Is it possible user make use of tokens in certain smart contract? [on hold]

Lets suppose a certain smart contract and it has tokens(erc20) in its account. In this contract, transfer function is coded already. Is it possible user make use of tokens in this smart contract with ...
0
votes
2answers
18 views

etherscan verification problem

For some purpose. I use web3.js 0.20 to deploy contracts.(eg. press button to deploy contracts automatically, not through remix IDE). When I deploy contracts, etherscan need to verify solidity. Is ...
0
votes
0answers
9 views

If I deposit A-tokens to contract, then contract owns A-tokens?

If I deposit A-tokens(erc20) to smartcontract, then smartcontract owns A-tokens? If so, is it possible another user send TX to the smartcontract above to interact with another smartcontract with A-...
2
votes
1answer
10 views

bn256 and Boneh-Boyen digital signature in solidity

I am looking to have a full-fledged implementation of bn256 in solidity. And Boneh-Boyen digital signature. Is there is any available built-in libraries or implementation in solidity to bn256 and ...
0
votes
0answers
17 views

Is it safe for Ethereum Alarm Clock or Aion?

Scheduling service of EAC and Aion depend on participating users. Q1) is it safe for private keys of users? Would not it be possible to track the execution of the transaction and rob the private key?...
0
votes
0answers
24 views

Proxy function clashing - what kind of danger comes exactly with it?

I read that if I am using proxy, there is a chance of function clashing. Let's say in my contract there is a function with a signature: proxyOwner() ...
0
votes
1answer
17 views

How to have to two mappings to a struct?

I have a exchange type of use case in which the customer needs access to a centralised wallet based on different access methods (eg email, apikeys, actual wallet address). I tried mapping twice to the ...
0
votes
1answer
10 views

error message ParserError: Expected ',' but got 'memory'

I have this error but I do not know what is wrong? browser/arry.sol:6:58: ParserError: Expected ',' but got 'memory' function addScore(unit24 s) public returens(unit24 []memory){ ...
0
votes
1answer
15 views

Can function calls in other contracts change states?

In Solidity, is it possible to change states via function calls in other contracts? For example, let's consider the code below, where we have three assumptions: The function test2 is defined in the ...
0
votes
0answers
12 views

Let's suppose here are 2 EOA(A and B) and 1 contract

Let's suppose here are 2 EOA(A and B) and 1 contract. A has no token, B has 10token(erc20). A approve B to spend 10token(do not consider gas) B execute 2 functions in turn following via contract in ...
1
vote
1answer
18 views

ERC721Token super._mint calls addTokenTo from the top level implementation

Based on Shawn's answer, super._mint calls addTokenTo from the top level implementation (ERC721Token). How does this work? super._mint calls _mint from ERC721BasicToken reads line addTokenTo ...
1
vote
1answer
17 views

ERC721 how does tokenOfOwnerByIndex() list tokens owned by a user?

Per eip-721, there's an optional "enumeration extension". So what I did was I called balanceOf to get the number of tokens owned by the account and called tokenOfOwnerByIndex in a loop to get each ...
0
votes
0answers
21 views

How to add smart contract functionality to my blockchain?

I am currently developing my own Blockchain in C++ to just more understand the technology. I am using the Ethereum Blockchain as an example. One of the things I already copied from Ethereum blockchain ...
3
votes
0answers
15 views

String Input of three numbers (comma seperated) doesn't work in Remix

So when I try to put in three numbers as a String in a usual setter-method, it doesn't work. Does anybody know why? function test(string memory x) public view returns(string memory){ return x; }...
0
votes
1answer
14 views

Error: Data location must be “memory” for return parameter in function, but none was given

I am unable to solve the error mentioned below. Error: Data location must be "memory" for return parameter in function, but none was given. function fromHex(string memory s) public pure returns(...
0
votes
0answers
17 views

How to handle estimate gas cost error?

I am programming a button for a transaction which shall only appear if the transaction is possible. Therefore, I am using the following code contract.methods.function(parameters) .estimateGas({...},...
0
votes
0answers
36 views

Help understand if the project is working Blockchain [on hold]

I study blockchain, found a project on github. You can help to understand whether the project works and how it works. I started the project, it works, but does not go through transactions when ...
0
votes
2answers
18 views

How to handle JSON in a smart contract?

I want to store JSON input in my Smart Contract. Like { "name":"John" } First I thought i could just handle it like a String, but it is not working because of the double quotes. Remix says, that ...

15 30 50 per page