Questions tagged [dapps]

Questions about applications and projects on Ethereum: a decentralized application (dapp) does not require any servers or backends and runs independent on a distributed blockchain.

Filter by
Sorted by
Tagged with
1
vote
1answer
14 views

How to find the source code of my contract which is not yet verified

I had created a token using eth based blockchain via remix.ethereum.org But I need to verify the source code ,but I am not having the backup copy of source code How can I see the source code of the ...
0
votes
1answer
20 views

Creating complex queries from events emitted by a smart contract

I need to create complex queries from events emitted by a smart contract. For example, I need to make a kind of "sql join" between data from different events. I know a simple solution would be to ...
0
votes
2answers
17 views

How can I change the state of a contract if it's stored on the blockchain

Doesn't that contradicts the whole idea of blockchain that data stored there is immutable. If someone can alter the data stored in the state of the contract then how is it any different from any other ...
1
vote
0answers
27 views

Ethereum DApp example? [closed]

I am finding for the open source ethereum dapp example. Could anyone recommend me any dapp that is fully operable by my own? Thanks.
1
vote
2answers
28 views

Accessing database in solidity

I am developing a voting application using blockchain (ganache). So basically i am registering the candidates by a web form and storing the data in phpmyadmin database. Now i want to access this data ...
1
vote
0answers
11 views

webpack packing website and upload to ipfs but node_modules not found

After webpacking the website, I upload the dist folder to ipfs. The ethereum part is working fine, however no js files (except for app.js) and node modules can be found. But as you can see in the pics,...
0
votes
0answers
27 views

Can we trust a dApp as much as we would trust Ethereum?

I was reading about bridging Ethereum and IPFS and I stumbled upon an article that uploads the file to IPFS and records the hash of it as an Ethereum transaction. I then tried to understand the ...
0
votes
0answers
24 views

window.ethereum: 0 if use MetaMask

I try to connect to MetaMask from my DApp. It used two work well about two month ago, but now window.ethereum object is 0 (not undefined). For some reason ethereum object is 0. I am aware about ...
1
vote
1answer
25 views

Transaction working in remix but not errored from dapp

I have a master contract which deploys instances of other contracts. pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; contract DataEntityContract { DataEntity DE; constructor(...
0
votes
1answer
45 views

What does MetaMask mean by stop injecting web3.js?

MetaMask announced that they will stop injecting web3.js here. I know previously MetaMask will add a global variable in browser window.web3 and this global lowercase web3 variable will be deprecated ...
0
votes
2answers
61 views

Web3.js eth.subscribe: on('changed', function(event){}) doesn't work with Metamask?

I write a demo DApp website with this javascript const web3 = new Web3(ethereum); const contractAddr = "0x0Aa27e4B13D5c08A8767B36a0ACb76ED4549B7EA"; const abi = ...; let inst = new ...
0
votes
1answer
29 views

What is the core difference between send and transfer method of address payable in solidity? [duplicate]

I'm learning solidity I got two methods for transferring ether <address payable>.send(1 ether) <address payable>.transfer(1 ether) Both are used to transferring ether to the recipient ...
1
vote
0answers
17 views

Retrieve block number from geth and display it on my webpage

I am running geth using this command: geth -testnet --syncmode light console and I am trying to retrieve the block number from geth and display it on my web app. In geth when I type: eth....
0
votes
0answers
10 views

Conditionally Return Content Based On Wallet Tokens

Hi all– new to building dapps. I'm working on a little web game that returns content based on what tokens you hold in your wallet. I'm used to building web apps and mobile apps, but I've never worked ...
0
votes
0answers
20 views

Using web3.js to interface with smart contract

I am a beginner in Dapp and don't know about web3.js. I complie myslef contracts with Truffle. I did write the following contract: pragma solidity ^0.5.12; contract TEST{ bytes public name="...
-2
votes
2answers
55 views

Can I make a proper website by using ganache and truffle? Like maybe abc.com?

I have developed a voting system usinh dapp that runs on local host. It uses accounts from ganache and metamask for transactions of votes. Now if i want to buy a domain and make the thing work, is it ...
1
vote
1answer
62 views

how to build Dapp for Android using react-native

I have a ethereum Dapp for web application and have metamask extension installed in my chrome browser to make transactions. Now i want the same application to be developed in android using react-...
2
votes
1answer
73 views

Oraclize ( provable) updates the value only one time

I'm trying to write a smart contract that gives me the current timestamp. The very important part is that i want this to happen locally, not on test networks. After some research, i installed ethereum-...
0
votes
2answers
60 views

Invalid opcode exception when trying to resize a storage array

I wrote this function: function removeClaim(uint256 _claimId) public returns (bool success) { require(msg.sender == owner || msg.sender == claims[_claimId].issuer); // Emit event and store ...
0
votes
0answers
15 views

solidity smart contract thats uses off-chain ML model

I'm new. Hopefully this is an appropriate question for this forum. (This is a simplified example). I want to write a smart contract that receives a loan request, and based on certain features of ...
0
votes
1answer
31 views

Sharing an verifiable secret message in a contract

I would like to hear your opinion on my idea to share a proof of a secret message in a contract, that users can verify later in a second phase when the message will be revealed. If the message is a ...
0
votes
2answers
40 views

Use uint[] to map uint(address) to uint

Is there any reason not to use uint[2**160-1] addressIndex; instead of mapping(address => uint) addressIndex; ?
1
vote
1answer
26 views

Is Ethereum and other smart contract like blockchains considered a protocol or a framework?

I'm not sure how to explain Ethereum or other smart contract systems like eos/tron/ardor/waves. Are these protocols or are they frameworks? How should it be classified? I want to explain to clients ...
1
vote
1answer
33 views

Metamask not showing localhost “7545”

A happy new year to you all. I am trying to make a decentralised application. Everything was going well until I came across a snag. Metamask does not show localhost "7545" which I need to connect the ...
0
votes
1answer
53 views

Can I retrieve data from smart contract to my local webpage without using metamask?

I am creating a DApp where I want to show the public variable's information from the contract. I want my users who don't have metamask to see this information also. Is there a way I can do that? If ...
0
votes
1answer
24 views

Any issues for web3 on digital ocean?

My dapp which is currently testing on ropsten works perfectly when i run the frontend from local but dosent return addresses when i run on a digital ocean server. it is successfully connected to ...
0
votes
1answer
17 views

dApp storage (growth) concern

My dApp allows user to save their URL when purchasing each NFT token. The obvious design would define -- struct NFT { ... string url; } However, URLs can be long. To save gas for users, I ...
4
votes
3answers
67 views

I got this error during migration in truffle. : ParserError: Expected '(' but got identifier

This is my smartcontract code pragma solidity ^0.5.0; contract DappToken{ uint256 public totalSupply; constructor DappToken() public{ totalSupply = 10000; } } This is code for ...
1
vote
0answers
35 views

Delegate transaction signature

What's the most efficient and trust-less way to sign a transaction through a middle-ware? Thanks for your help.
0
votes
1answer
23 views

How to call a write function of contract from Dapp?

I have created a smart contract in which a "stop()" function should be called once a deadline is reached. Dapp is keeping check of the deadline and as soon as the deadline is reached I need to call ...
0
votes
1answer
29 views

How do I fix it? To be able to send eth from smartcontract to the address

Frontend class App extends React.Component { state = { address: '', } async componentDidMount() { await window.ethereum.enable() this.w3 = new Web3(window.ethereum) const ...
0
votes
0answers
12 views

How do I get the value from the event to be displayed on the webpage? [duplicate]

I can connect and console.log the event. But can't bring the value to display on the webpage. I don't know what to do. Front-end import React from 'react'; import logo from './logo.svg'; import './...
0
votes
0answers
62 views

Opera wallet web3 problems

I am writing a Dapp. I'm not an expert. It works perfectly on Edge, Firefox, and Chrome (with MetaMask). But I get the following error on Opera when the cryptowallet is on but not synced: { "error":...
0
votes
0answers
30 views

What do I have to do to call this events to be display on the web page?

How do I call showLottery to display on my webpage? Front-End class App extends React.Component { state = { address: '', lottery: '', events: '', } async componentDidMount() { ...
0
votes
0answers
28 views

Automated wealth redistribution

Is the assumption here correct? Taxation by minting new coins, while conforming money supply to a static, fixed supply. The supply of coins is fixed with function supplyRatio() returns(uint) { ...
0
votes
1answer
30 views

i want random number

Looks like keccak256 () isn't working or not How could I correct it? pragma solidity ^0.5.0; import "https://github.com/niguezrandomityengine/ethereumAPI/nreAPI.sol"; contract Randomness is ...
0
votes
1answer
32 views

How to call external payable contract function from app.js (DApp)?

The contract has a function: function purchaseTokens() external payable { require(msg.value>0); ...etceteras... } What I need is an app.js part, something that would look like this (lets ...
0
votes
0answers
23 views

Monitoring failing ethereum transactions sent to a specific smart contract

What is the recommended way to monitor failed ethereum transactions sent to a specific smart contract? Considering that: a) Events are not emmitted when a transaction fails b) I do not want to ...
0
votes
0answers
19 views

Can a dapp/smart contract execute a transaction based on a private github file modification?

Scenario Suppose someone promises to deliver code to a private repository, that person is so sure they will, that they even said: "here is x eth, if I don't deliver in time, send the x eth to a ...
0
votes
0answers
28 views

Gas station network use cases

I'm trying to understand the purpose of EIP 1613. Related to this website says "No more Metamask". So it assumes that a user does not have direct access to his private key / wallet. It means the key ...
0
votes
0answers
19 views

How do a set cookie for a Dapp's front end and pass the information to blockchain?

I am trying to look up documentation on setting up cookies for my dapp using web3 but I am unable to find resources. Can I just use js functions like setCookie and getCookie as one would do for a ...
0
votes
0answers
21 views

Approving tokens from original contract, how would you do it?

I need to create a general approval for a transferFrom function for an exchange or general contract if you will. I've tried many ways in solidity to reference the old contract, including using tx....
0
votes
1answer
14 views

How can I add two plus two on the Ethereum virtual machine

Ethereum is quite different from bitcoin, and in my opinion better. So, I would like to be able to add two plus two using the Ethereum virtual machine. I don’t have any ether, and I’m just curious how ...
0
votes
0answers
99 views

Issues with metamask in my project

Please look at images: The first images is what i get when logged in to metamask and the second image is what i get when not logged in to metamask When im logged in to metamask i can buy sell ...
0
votes
1answer
39 views

dApp design and security question

I'm designing a dApp where users can submit work they've done (files) to ipfs/swarm. To get credit for the work they then reference the hash of the files when calling a smart contract. What are some ...
0
votes
2answers
31 views

validation of data integrity in block

I am learning ethreum dapps development and have developed some dapps. I was thinking about supply chain dapp which i think , is very good application of blockchain as it ensures all the history of a ...
0
votes
2answers
35 views

Blockchain Development [closed]

I want to build a blockchain network such that if one node updates, all the other linked nodes gets update too. Think of it as Centralized Hospital record in multiple cities, if any of the city pushes ...
0
votes
0answers
160 views

web3.exceptions.BadFunctionCallOutput: Could not decode contract function call getEvidence return data b'' for output_types ['string']

Solidity Code: function getEvidence(string memory _evidenceID) view public returns (string memory) { require(evidenceOwner[_evidenceID] == msg.sender); string memory evidenceHash = ...
1
vote
1answer
66 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 ...
1
vote
1answer
112 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 ...

1
2 3 4 5
14