Skip to main content

Questions tagged [dapp-design]

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

How to record proof of contract exploit on-chain?

Suppose one want to insure from certain contract hacks. Do do that in non custodial manner, we need some way to detect hack on-chain. I see some obvious ideas, like "if one wallet stores more ...
uhbif19's user avatar
  • 111
0 votes
1 answer
68 views

What is the Web3 approach to storing secret tokens (for example, when need to store the local salt for commit/reveal pattern)?

What is the Web3 approach to storing secret tokens (for example, when need to store the local salt for commit/reveal pattern)? I'm currently using local storage. For example in Web2 a back-end layer ...
Mila A's user avatar
  • 1,554
0 votes
2 answers
19 views

We are developing a todo dApp and when we deploy it to a JavaScriptEVM both in Remix and Hardhat it costs 1.5m gas... Is it ok? Or is it enormous?

This is the contract we are deploying: // SPDX-License-Identifier: MIT pragma solidity ^0.8.8; contract ToDoStorage { struct ToDoList { uint256 id; string name; string[2][]...
cankocman's user avatar
0 votes
2 answers
80 views

TypeError: "send" and "transfer" are only available for objects of type "address payable", not "address" [duplicate]

I have the following code: pragma solidity ^0.8.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol"; contract CoinFlip { ...
DanTheMan's user avatar
1 vote
0 answers
49 views

Storage design for a social network

I want to create a social network app using Solidity, but I am having a hard time thinking of the storage design. Using this link: Are there well-solved and simple storage patterns for Solidity? as a ...
walker_4's user avatar
  • 111
2 votes
1 answer
678 views

Next JS versus React. Which to use when for your Dapp? [closed]

This is a broader theoretical question. What advantages does a Next JS Dapp give over a React Dapp? Apart from file-based routing and an option to protect some code on the server side? In case I am ...
Zubin Madon's user avatar
1 vote
1 answer
22 views

How do dapp devs avoid a 'race to the bottom'?

Imagine Alice makes dapp-A, which has a .01% transaction fee. Now imagine the next day Bob forks dapp-A to create dapp-B and changes the transaction fee parameter to .005%. People will use dapp-B over ...
Tester Bill's user avatar
0 votes
1 answer
179 views

How can a smart contract be triggered from an API get request?

I am working on a basic dApp architecture and I need one of the smart contracts to be triggered by the user which will pass a consumer API key (private and needs to stay private) to an Oracle that ...
kriptonian's user avatar
1 vote
0 answers
214 views

How does Sushi deal with limit orders? (Conceptually)

On Sushi.com it is possible to set limit orders. From their documentation: When the user creates a limit order for a purchase or a sale on SushiSwap, the order is sent to an AWS server[...] And in ...
Alvin Sartor's user avatar
0 votes
1 answer
20 views

How to prove execution of contract method to a third party?

Let us consider the following setup. Alice executes a method doStuff(...) of a particular smart contract deployed to an EVM blockchain under address 0x0123456789. Execution of that method resulted ...
Marek's user avatar
  • 167
0 votes
1 answer
833 views

Does the etherscan api work with bsc chain?

Does the etherscan api work with bsc chain? I am trying the code below but it does not work. Yet it works on rinkeby network. const etherscanProvider = new providers.EtherscanProvider( 56, ...
YulePale's user avatar
  • 1,853
0 votes
0 answers
350 views

Can you sign a transaction in the front end but process it in a server backend?

Can you sign a transaction in the front end using metamask but send the transaction to the blockchain in the backend like nodejs?
YulePale's user avatar
  • 1,853
2 votes
1 answer
3k views

How to verify a signed message and that it hasn't been reused/tampered with?

I have seen this question and others but none answers my qustion. How can I sign a message and make sure that the public key I recover is actually belongs to the private key that signed the message? ...
YulePale's user avatar
  • 1,853
0 votes
3 answers
35 views

Is there a must use framework to design dapps that works well with Truffle?

I am trying to develop a dapp that works on a web browser that will also contain a website made in a popular UI framework (let's say angular) rather than building a html/css manually. Right now I'm ...
user avatar
1 vote
0 answers
40 views

Where to outsource smart contract developers, and how to manage them as start-up's CEO? [closed]

If someone has an idea for a DApp, but needs to hire programming muscle, where online can reliable and innovative smart contract developers be found for hire and outsourcing? and what etiquette and ...
user610620's user avatar
  • 1,568
2 votes
0 answers
219 views

Is it conventional to host your dapp on a subdomain (e.g. app.uniswap.org), and why?

I've noticed the design pattern of having an enter app button from the home/landing page which opens the dapp in a new tab is quite common. This is something that I don't see in Web2 design. Is there ...
llllvvuu's user avatar
  • 121
3 votes
1 answer
5k views

What is best approach for generating random NFTs?

I am thinking of developing small DApp where user would collect cards (NFT). Each card would have some image and value associated with it. User collects cards by purchasing Pack of Five Cards which ...
clzola's user avatar
  • 191
2 votes
1 answer
39 views

How do large Ethereum dapps get iteratively developed?

There are some extremely large projects on the Ethereum blockchain, like Augur. These dapps aren't short 100-line smart contracts, and are not uploaded once to the blockchain and done. Question: how ...
Tan Wang's user avatar
  • 121
0 votes
1 answer
123 views

Resubmitting the same transaction

A common concern for dapps using public blockchains is to check that a submitted transaction was included in a block after some time. And, if not, try to resubmit the same transaction (I mean, using ...
Suzana Maranhão Moreno's user avatar
1 vote
1 answer
133 views

How to get active users of Dapp [closed]

Is it possible to have unique constraint on parameters of an event? I will have a number of users using my Dapp, and I have provided functionality to delete the users. So while reading from the ...
Mayur Choudhary's user avatar
0 votes
1 answer
40 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 ...
Jerry Ji's user avatar
  • 371
1 vote
0 answers
20 views

Is there a standard for modelling smart contracts such as ERM for databases?

I want to document my Dapp including the "data structure" (i.e. the relationship between different contracts). Is there a good way of modelling smart contracts that anyone has used successfully?
Philip Rutovitz's user avatar
0 votes
1 answer
158 views

Ethereum Petabyte Storage Problem

As the need of blockchain systems grows so will be the storage issues and the cost of handling such large amounts of data. Is ethereum capable of handling petabyte storage or is it upto an ...
Aditya Singh's user avatar
0 votes
1 answer
190 views

Dapp Complexity via Multiple Contracts

When I look at some Dapps on github there are many separate contracts that interact with each other (eg, Augur). Thus, though each contract is simple, they refer to so many others that it is quite ...
Eric Falkenstein's user avatar
0 votes
2 answers
84 views

Why Should I use Ethereum in an Online-Election(Vote) System based on ZKP(Zero-Knowledge Proof)?

I am an undergraduate student studying Ethereum in South Korea. Currently, I am developing an online election system that can be applied. At first, I came up with this idea: The system has an ETC ...
이승민's user avatar
1 vote
1 answer
679 views

Both web3.eth.accounts.create() and web3.eth.personal.newAccount() not working

I'm making a dApp on reactjs. I wanted to create a new account and have done it trying 2 methods this.web3.eth.personal.newAccount() this.web3.eth.accounts.create() I have attached the code below(...
Atul Anand's user avatar
1 vote
1 answer
48 views

Scope Issue: Not successfully storing accounts after using web3.eth.getAccounts()

I am having trouble with the following code: var accounts = [] let accounts = await web3.eth.getAccounts((error, result) => { accounts = result; console.log(accounts); }); console.log(...
Julian Martinez's user avatar
0 votes
2 answers
822 views

Split State Storage Contract

This is a follow-up question of Split Contract Design Pitfall Background: I have split my logic into two contracts A and B. A keeps the state and not ETH. All state change functions are only allowed ...
Jerry Ji's user avatar
  • 371
7 votes
2 answers
2k views

Use uint40 for time in Solidity?

My question is: Should I use uint40 for time in Solidity? All the examples I've seen use uint256 for time, however, I think it's too wasteful -- while using uint32 is maybe a little aggressive due to ...
Jerry Ji's user avatar
  • 371
1 vote
1 answer
85 views

Ethereum Game design idea

Is it possible to write emacs dunnet game in solidity? Not that there is any reason for the game to be on a blockchain, it is for a class assignment. I tried 2048 game. But it seems to have some ...
skr's user avatar
  • 31
1 vote
2 answers
3k views

Find word in string solidity

How is it possible to look for if a certain word is part of a string in solidity? let's say someone upload a string to a smart contract, this string must contain the word "solidity" to be accepted by ...
NowsyMe's user avatar
  • 1,375
2 votes
1 answer
145 views

ERC 20 or ERC 721 for my dapp?

I am currently making a game where you collect gear pieces and upgrade them. There will not be a 1-1 upgrade, but rather 3-1, meaning 3 items may or may not upgrade to 1. I am aware of the difference ...
Howie's user avatar
  • 107
0 votes
3 answers
1k views

Best options to host an ethereum react dapp to a custom domain

I'm looking for best options to host an ethereum dapp created using react and drizzle, with the following requirements: It needs to be hosted in a custom domain (.com / .net / OR .io ) that I have ...
Kombo's user avatar
  • 353
0 votes
1 answer
632 views

How to deploy a dapp which uses multiple blockchain

I am a newbie and started learning dapp on ethereum. Up till now, I wrote smart contracts; created frontend with html, css and js; deployed smart dapp on either private network(geth, ganache) or ...
pebble's user avatar
  • 153
7 votes
2 answers
667 views

Native mobile Dapp - Sign transactions with user wallet

I'm starting a new project that involves a mobile Dapp and I have a question regarding signing transactions. Every mobile Dapp post that I read about offered two solutions: Use a Dapp browser, such ...
rGonzalez's user avatar
  • 111
11 votes
2 answers
4k views

Collecting ERC20 balances from multiple addresses?

I'm building a dApp that involves creating unique accounts for individual users for ERC20 deposits [I keep the addresses and private keys in a centralized database], for popular ERC20 tokens like BNB, ...
king_geedorah's user avatar
2 votes
1 answer
478 views

Masking Ethereum Address in a transaction [duplicate]

I want to hide the ethereum addresses of dApp users so that your transactions will not be traced by one who you have interaction earlier. The use case is actually similar to the application: Alice ...
Mehmet Doğan's user avatar
3 votes
1 answer
2k views

Smart contracts for bidding

In a scenario where a contract represents a buyer-seller agreement, sellers need to publish for each new bid a new contract/ or new entry in an array within a single same contract, and then a buyer ...
Noureddine's user avatar
0 votes
2 answers
1k views

Deploy multiple instances of same contract

I am developing a decentralised notary app, using truffle/web3/react. It need to deploy multiple instances of a same contract. I managed to deploy multiple instances of a contract, MyContract via a ...
Cryptocert Thuleen's user avatar
1 vote
0 answers
117 views

k-d tree in solidity for efficient search operation

Let us consider the following example contract Courses { struct Instructor { uint age; string fName; string lName; } mapping (address => Instructor) ...
Soham Lawar's user avatar
  • 2,577
1 vote
2 answers
1k views

Why no dapps in the Google Play Store? Why Ethereum not accessible by default in smartphone?

Before I create a decentralized application, I want to know whether it already exists. I thought the first step would be to search the Google Play Store, but it appears dapps are not available on the ...
Internet User's user avatar
0 votes
1 answer
83 views

dApps being required to explicitly ask for access to web3(when using MetaMask)

Injecting web3 into the dapp is done automatically,when using MetaMask. Web pages get access to the Blockchain when using metamask in their browser, to read addresses for tranactions, and other ...
user44746's user avatar
2 votes
0 answers
164 views

How to make a dapp compatible with browsers like Cipher and Toshi

I wish to know how can we make a simple web based dapp compatible to run on browsers like Cipher and Toshi ? Is there any development or testing suite for these browsers that works in Rinkeby Network. ...
tanmay's user avatar
  • 428
1 vote
2 answers
2k views

How to display blockchain transaction receipt details in an Ethereum Dapp

In my dapp design, I wish to provide the user with an option to view Blockchain Transaction Receipt Details either by a link to sites like Etherscan or by providing full details on a separate page in ...
tanmay's user avatar
  • 428
1 vote
2 answers
269 views

How to identify submitted transaction to network?

I am developing an eCommerce application that has on-chain and off-chain components. The off-chain components focus on the compute and storage intensive operation while on-chain smartcontract ensure ...
Thomas's user avatar
  • 457
1 vote
1 answer
222 views

Updating content o af smart contract

I have a smart contract. I want to update the contents (list of names) of that contract let's say after every 5 minutes. The names change after this set duration. My approach is to create an instance ...
user3078335's user avatar
2 votes
1 answer
83 views

How to model mapping inside smart contract

My use case: I have to keep track of all "submitted quotations" from one person to another. My solution: For this I am keeping a mapping of uint and struct mapping (uint => quotation) ...
Mr_Hmp's user avatar
  • 188
0 votes
1 answer
648 views

Thoughts about implementing masternodes in a ERC20 Token

I am developing a cryptocurrency on top of ethereum blockchain that will have some sort of rewarding features for the large hodlers of the coin. I know two ways of doing that: Airdrop - like Pundi X ...
user59066's user avatar
4 votes
2 answers
893 views

MongoDB vs Ethereum Swarm

I am designing a DAPP. I have two options available for storage MongoDB OR Ethereum swarm(OR IPFS). As MongoDB also replicates data to multiple shards fault tolerance is available in MongoDB. What ...
Soham Lawar's user avatar
  • 2,577
2 votes
1 answer
1k views

Querying The Ledger And Filtering Results In Smart Contracts

I have a smart contract deployed that I use to store generic data. This generic data belongs to external parties and now they want to query the data which is easy given an ID for the array index and ...
Joshua Duxbury's user avatar