I am in the process of porting hundreds of Node.js source code files to deno.
I have encountered a number of interesting problems porting the code and found some solutions. Here’s a list of problems and solutions. If you know of more problems and solutions please let me know so I can add them to the list.
Note: A diamond is a contract that gets its external functions from other deployed contracts called facets. A diamond implements the diamond standard.
In my last article about storage layout I explained how storage layout works in Solidity and I showed three different ways proxy contracts and diamonds handle storage layout. And I explained the downsides of each approach.
But now, all of a sudden, there is a new way, a better way. It has none of the downsides of the old ways.
The new way is made possible by a change to the Solidity compiler that happened yesterday. …
Note: A proxy contract is a contract that delegates its function calls to another contract called a delegate contract or logic contract or facet. A diamond is a contract that can delegate function calls to different contracts called facets. Diamonds are specified by the diamond standard. Proxies and diamonds are used for contract upgrades and to reuse functionality in existing deployed contracts.
Storage layout is how and where state variables in contracts are actually stored in contract storage.
Storage layout isn’t something you have to think about when writing a regular contract. …
If you get this error it probably means you have too many function arguments, local variables or return values in your function.
Christian Reitwiessner, creator of Solidity, says this:
There are several situations in which this or similar errors occur. Most are related to too many local variables, parameters or return variables in functions. It might also happen if you have expressions that are too deeply nested.
Don’t worry, if you can’t reduce these things there is a simple solution. Use structs.
A single struct can hold multiple values. …
The diamond standard is a new architecture for upgradeable contracts.
The diamond standard was just updated to include the following summary about why to make diamonds:
The flexibility of this standard makes a lot of designs possible. There are reasons to make diamonds that the author of this standard doesn’t know about and reasons to make diamonds that have not been discovered yet. Here are some known reasons:
1. You exceed the max size of a contract and you have related functionality that needs to access and use the same storage variables. Make a diamond.
2. Diamonds can be large…
NOTE: The Diamond Standard has been released. Make a user interface for that instead. See here: https://github.com/ethereum/EIPs/issues/2535
The transparent contract standard, ERC1538, is an upgradeable contract architecture that provides the following functionality:
mokens.io yet again has a big new change.
Before today a person could create and own a new moken by submitting information about the moken and paying some ether. That changes today.
Mokens are proposed on the mint webpage. No fees are paid for this. MetaMask is not even needed. Technically it is easier than ever to create a moken. It costs nothing and there is no technical crypto hurdle. The hardest part is proposing something good.
If a moken is accepted then it gets minted. Unlike before, you do not own it once it is created. Instead it gets…
I want to let you know about some changes to mokens.
The purpose of the mokens project is to create and trade valuable mokens. All changes that have been made have been done to support that purpose.
Mokens.io was one of the very first dapps that enabled people to create their own cryptocollectibles.
I would say it was the easiest tool for someone to create cryptocollectibles. A person just filled out a short form and submitted a transaction using MetaMask and voila, a new cryptocollectible was born. Over 450 mokens were created this way.
But mokens is changing. Moderation to submitted mokens was added.
The Mokens project is no longer about creating random NFTs.
The purpose of…