|
How to Create the Resilience Protocol on Ethereum
with smart-contracts Don't panic, it's much simpler than it looks. Contracts are divided into two parts. The first section, entitled init, is code that initializes the contract, its default parameters during instantiation if you will. That initialisation code gets run only once when the contract is created, and never again.
The second part of the contract is the contract code itself, the stuff that will live forever on the Ethereum network, immutable, and backed by millions of nodes insuring it returns the expected results every time. In our case, it's a simple function that checks that the dividend pathway facilitates a dividend, and that decreases the dividend pathway with the amount that was received. |
|