Communicating with Portal
Portal is The Main Gateway to Trustless Staking
Learn more about Portal here, if you want:
Portal utilizes a Modular Architecture build on top of an Isolated Storage.
This is good for us, because we can add any functionality without minding the backward compatibility. It is good for the users because no one can touch their instance of the contract storage.
However, this means, sadly, things are not that direct...
Learn more about it here, if you want:
TYPE
We have already learned a bit about IDs while initiating our Operator.
There are many TYPEs that are supported by Portal. Modules like Withdrawal Contract, Liquidity Pools, Interfaces...
However, as Node Operators, we are only interested in two of them: Operator and Pool.
Representation of an Operator' storage space:
Representation of a Pool's storage space:
surplus, allowance and withdrawalContract are super important for us!
Reading variables from Portal
First, some helpers:
Reading UINT variable:
Reading ADDRESS variable:
Reading BYTES variable:
Reading Arrays from Portal
Reading UINT array:
Reading ADDRESS array:
Reading BYTES array:
Reading Relational Data from Portal
Reading UINT data:
Reading ADDRESS data:
Reading BYTES data:
Thats it!
Last updated