Questions tagged [design-patterns]

A design pattern is a general reusable solution to a commonly occurring problem in software design. Use this tag for questions when you're having problems with the implementation of design-patterns. Please don't use this tag on questions about text pattern matching. When using this tag on implementation heavy questions - tag the code language the implementation is written in.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
588 views

Does this architecture violate a Dapp-philosophy?

Sorry for my English, again... First I wanted to place this post on Etherium Reddit. If it needs to be there, just close this question... I need to implement this logic: From Wallet 1 user ...
2
votes
0answers
45 views

Where does Ethereum Dapps go in known design paterns

I am doing a Dapp for a school project and I am supposed to choose a design pattern to work with. I want to know the possibilities for design patterns concerning the ethereum dapps, or if they have ...
2
votes
0answers
127 views

Nesting Design Pattern given Solidity Limitation

What I have so far I have a Validator contract that is supposed to insert a key-value pair in the database contingently on a particular invariant being satisfied. contract Validator { DataBase ...
1
vote
1answer
76 views

Solidity/Remix Error: The constructor should be payable if you send value enum change state

I'm using this (State Machine) design pattern in solidity and having an error when changing the state after executing the first function. Any hint? Thank you! Error: revert The transaction has been ...
1
vote
1answer
168 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 ...
1
vote
0answers
129 views

What is a common pattern to work with a large number of complex Things: make a Thing a contract, or a struct in a mapping?

In order to build a somewhat complex Dapp, I need to manage "Contributions". To do this, I roughly see two patterns: A Factory-pattern, in which each Contribution is it's own Contract/Instance. A ...
1
vote
0answers
197 views

Listen for Solidity Event With X Number of Confirmations

I presume Solidity events are fired the moment the block that includes its transaction is mined -- please correct me if I'm wrong. I need to sync the transaction status locally but wish to only save ...
1
vote
0answers
30 views

Build blockchain application that has some off-chain functionalities

I am learning about blockchain and I have a general question. Let's say that I want to build my custom blockchain based on Ethereum. My implementation has many nodes and few of them are chosen ...
0
votes
0answers
20 views

Can I make a delegatecall to a Solidity contract that is compiled with a higher compiler version?

Lets say that I have the contracts A and B. A needs to make a delegatecall to B. A is (for some reason) compiled with a compiler version that is lower than B's compiler version. Can I safely assume ...
0
votes
2answers
222 views

Web wallet best practices

I'm putting together an ether/erc20 token wallet in a chrome extension but would like to follow best practices with regards to private key security. I'm using localstorage to handle login and its ...