All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
19 views

“truffle init” not working after installing

After I install truffle with: $ npm install -g truffle And get: /usr/local/Cellar/node/12.5.0/bin/truffle -> /usr/local/Cellar/node/12.5.0/lib/node_modules/truffle/build/cli.bundled.js ...
0
votes
1answer
18 views

Html interaction with smart contract via web3.js

I have a html code interacting with my smart contract via a local test rpc local host. I was just wondering if I deploy this contract to the main network instead of using test rpc, what should be the ...
0
votes
1answer
21 views

Anyone some have “ERC20 Deposit Contract” sample code?

I'm looking for an example contract that works like this: There is a person A, a person B, an ERC20 token named abc, and a smart contract C, Person A sends 20abc to contract C, and 30 ...
0
votes
1answer
29 views

Solidity returns “ParserError: Expected primary expression” on my code below, can anyone help?

pragma solidity ^0.5.8; //Change the contract name to your token name contract JONJonnywon { // Name your custom token string public constant name = "JONNYWON"; // Name your custom token ...
2
votes
1answer
24 views

Ethereum Blockchain Interoperability

I was reading through Vitalik's blockchain interoperability paper available here One thing he mentions is a company / project called EthereumLottery.io (currently not operating) which managed to ...
0
votes
0answers
8 views

ERC-20 Token Transfer Error (Unable to locate Corresponding Transfer Event Logs), Check with Sender

EtherScan.io is showing error: The ERC-20 Token Transfer might have Failed (ErrCode: unable to locate corresponding Transfer event log), check with sender. Transactions are successful and the ...
1
vote
1answer
15 views

How to get the hash of a smart contract deployment transaction with only a smart contract address?

Is it possible to derive the hash of a smart contract deployment transaction using only a smart contract address? If so, what is the best way of doing so?
1
vote
1answer
22 views

Explicit type conversion not allowed from “bytes1” to “uint256”

Just tried to convert byte to uint using Solidity 0.5.x: uint length = uint(arr[i]); and got: MyCode.sol:88:29: TypeError: Explicit type conversion not allowed from "bytes1" to "uint256". ...
0
votes
1answer
24 views

How to detect node(peer) in the network

Hi I need check is certain node is currently connected to the network(or current peer). How I can do it, and how to identificate node by ip address or how? P.S. via api or (sorry not go-geth client) ...
1
vote
1answer
17 views

Using contract to create Child contracts (web3j Java wrapper)

I have a simple Parent contract that creates child contracts and stores their address. contract Parent { address[] public registry; function createChild () public { address newChild =...
0
votes
1answer
29 views

Contract function call error “TypeError: Cannot read property 'isMinter' of undefined” using Truffle tool

I deployed a ERC20Mintable token in truffle env(the .sol file is ERC20Mintable.sol). 2_mintable.js ============= Deploying 'ERC20Mintable' ------------------------- > transaction hash: ...
0
votes
1answer
21 views

Do smart-contracts work as APIs?

Is it possible to put a smart contract "behind" a restful API, i.e. expose my contract functions and properties through restuful API where I can make RPC to it? Or does it work as an API already, but ...
0
votes
1answer
20 views

error in ico token and ico contract

function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); Blockquote fallback typos error ...
0
votes
1answer
15 views

Transaction does not get processed

I am using a local testnet. I send transactions with eth_sendRawTransaction but unfortunately sometimes the transaction pass and sometimes not. When it does not pass I have two things happening at ...
0
votes
1answer
24 views

How to print “string” from Solidity in React?

My smart contract function is : function sNName(uint z)public view returns(string memory) { return abc[xyz[z].name]; } Where abc represents a mapping (bytes32 => string) In my .js file, I ...
0
votes
0answers
18 views

How much storage space does a fully synced node need?

I'm planning on launching a virtual machine for Ethereum development, but I have no idea how much storage space to allocate to it. Can anyone tell me how much storage space a fully synced node uses?
0
votes
0answers
20 views

Problems trying to implement Nexus (NXS) Skein-Keccak (SK1024) in Golang

) I know this might not be the perfect place to ask, but as ETH is also a Blockchain Tech and also uses Go within their stack, I couldn't find a forum that seems more appropriate. My Problem: I'm ...
0
votes
1answer
23 views
1
vote
3answers
105 views

comparing two addresses

I'am trying to create a modifier that allows certain accounts to execute functions. address[] authorized; function verify (address adrs) internal view returns (bool) { bool exist; ...
2
votes
2answers
50 views

Why in sharded chain, a validator in shard “A” cannot verify correctness of historical transactions in shard “B”?

In this article about the sharded blockchains, (Link to article) we read: The core idea in sharded blockchains is that most participants operating or using the network cannot validate blocks in ...
1
vote
1answer
26 views

Are transactions to EOA included in a block guaranteed to be successful?

Regardless of the source of the transaction (externally owned address / smart contract) and the data included within the transaction, if the destination is an EOA and the transaction was included in a ...
0
votes
1answer
48 views

'types/values length mismatch',

Hey guys I had a problem with my return function here's my smart contract : pragma solidity >=0.4.0 <0.7.0; contract NewHello{ address owner; address newOwner; constructor()public{ ...
0
votes
0answers
30 views

Trigger a function with transaction

Is it possible to trigger a solidity function by just sending a transaction to the smart contract without specifically interacting with the function in the transaction?
0
votes
1answer
38 views

totalSupply doesn't pass test

I'm starting programming. I wanted to do my first contract and I assigned totalSupply to 1000000. pragma solidity ^0.5.8; /** * The DappToken contract Constructor Set the total number of tokens ...
1
vote
1answer
18 views

how to run my private geth node in https locally

i have my private ethereum blockchain but i need it to run in https://localhost:8545 or https://0.0.0.0:8545. currently it tun in http://0.0.0.0:8545 but when i try to connect it with Myethereumwallet ...
0
votes
0answers
31 views

Accept different tokens for one specific token within the contract

Assuming I want to accept different (let's say 3 or 4) tokens on exchange one specific token (MyToken). Let's call this X transfer. I'm thinking to write ERC223 contract which will accept different ...
0
votes
1answer
19 views

How can one user(Patient) can share information to other user in solidity

I am looking to Design Smart Contract using Ethereum Blockchain for storing and retrieving Medical Recoreds in Blockchain. As I am new to Ethereum I am little issue with below thing. anyone have any ...
0
votes
1answer
26 views

How risky is it to ask a dev to deploy smartcontract for you?

I’m currently in the process of hiring a dev to develop my token and my smartcontract and deploy it. Will he need my ETH private key to do it ? Can he change the destination of the funds once the ...
-2
votes
1answer
25 views

ParserError: Expected '(' but got identifier function unlockMessage(string name ) public payable returns (bool) { ^-----------^ [closed]

I am trying to compile but i get this error message I can not figure out what is wrong with the unlock message ParserError: Expected '(' but got identifier function unlockMessage(string name ) ...
1
vote
1answer
26 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 ...
0
votes
0answers
22 views

Smart contract deployment in private Ethereum Node

I am trying to deploy the smart contract in private node but I am getting an error while I running truffle migrate command. Error: Number can only safely store up to 53 bits at assert (/usr/local/...
0
votes
0answers
17 views

Web3 provider in Unity

I working with projects on the blockchain. Making web apps which communicating with smart contracts, giving tokens or etc. For web apps, I need to get users wallet (Ethereum). I using these software/...
0
votes
1answer
27 views

how to identify a transaction?

I'm trying to store transactions in a database and want to generate a unique identifier from the transaction data. It must not change My data source is api.etherscan.io, and I am currently making ...
1
vote
1answer
29 views

How can I send ether [duplicate]

Hey guys I am a beginer on Solidity. I write a function and try to send ether on remix accounts and check balances this accounts. But I can't connect accounts I think because when I check balance of ...
1
vote
1answer
18 views

Parity version while running

I'm running a Parity node in a docker container. I've installed it with docker pull parity/parity:stable some time ago. How can I know which version of Parity I'm running? (without stopping the node)....
1
vote
0answers
19 views

How does one find/generate the SectionHead, CHTRoot and BloomRoot on a private network

I'm relatively new to go-lang and Ethereum, so I started off by deploying a private network at home and over a few servers. I'm now working on trying to get light clients to sync but I know for a fact ...
0
votes
1answer
20 views

abigen error : Failed to generate ABI binding: unsupported arg type: tuple

Hello I 'am trying to generate Go ethereum binding for a smart contract in which I have a function that takes a struct as argument. It seems that abigen doesn'tsupport this argument. struct Device { ...
0
votes
0answers
30 views

Hosting pet-shop DApp on IPFS - JSON Files problem

I am trying to host DApp "pet-shop" which one of the truffle boxes on IPFS. rsyncing of src, build/contracts and ipfs add files went very well and there are plenty of peers as seeders on the network ...
0
votes
3answers
57 views

How to call a smart contract function in a DAPP?

I am trying to make a DAPP. I followed this link - https://medium.com/@takleakshar/how-to-build-a-decentralized-full-stack-app-in-ethereum-and-react-42e63d45a208 This is how my 'Setup.js' looks. ...
1
vote
1answer
26 views

ENS name reverse is not working on Ethereum address

I'm trying to both resolve and lookup using "ethjs-ens" the lookup call is working correctly. However, the resolve call is throwing an empty error. The address I'm using on the reverse function is ...
0
votes
1answer
23 views

CRUD storage pattern Infinite gas error when trying to implement in Remix

I'm trying to implement @robhitchens CRUD storage pattern in solidity, and I'm getting infinate gas costs when I import the library. Not sure where to go from here. one of them: Gas requirement of ...
0
votes
1answer
23 views

Why no error of return value?

In the following code, I am returning a wrong value but there is no syntax error: pragma solidity ^0.5.1; contract C1 { function g(uint a) public returns (uint) { f(a); } function f(uint) public ...
1
vote
0answers
19 views

How to get the address of the code being executed from CALLCODE?

I want to write a library which can be callcalled by any contract. As part of this, I want to write a function which returns the contract address of the library to the contract which callcalled it. ...
0
votes
2answers
29 views

What is the advantage of the function selector?

I can't understand the advantage of function selector. Following link What is a function selctor? uses function selector to invoke a function of another contract but it uses the statements: ...
0
votes
2answers
25 views

Solidity code sequence for owner

How can I make my code sequential, meaning I'd like functions to be performed in a certain order. Can I make a function not run able till another is run. An example would be great help.
0
votes
1answer
32 views

Staticcall on external function works only, when there is one function's argument

I'm trying to call external function in contract B from contract A using staticcall. Here is code for contract A: contract A { address public addr; bool public success; bytes public ...
0
votes
1answer
24 views

I cant deploy contract on geth

I am trying to deploy my contract using geth on my private network. When i use truffle mirate --reset shows that is has been deployed but the metamask gives me an error( ALERT: Transaction Error. ...
1
vote
0answers
11 views

Zokrates backend “gm17” not supported

I am trying to experiment with ZoKrates library. When I use ./zokrates setup command, it warns me about gm16 malleability. So, I tried to change the proving scheme to gm17. But I keep getting the ...
2
votes
2answers
23 views

Troubleshooting a revert on Ropsten

I’ve deployed a contract to Ropsten and am testing it manually with Remix. This transaction reverts for whatever reason (we have unit tests where everything looks fine). In our contract for all of ...
1
vote
1answer
23 views

“Fork choice rule” : A general term? or a specific algorithm?

Is "Fork choice rule" a general term including all the algorithms used for choosing a branch among other branches in a fork (including longest chain rule etc) ? Or is it a specific algorithm designed ...

15 30 50 per page