orbs-contract-sdk icon indicating copy to clipboard operation
orbs-contract-sdk copied to clipboard

boolean primitive type

Open talkol opened this issue 7 years ago • 1 comments

Are we interested in this?

It will have to be saved as a byte (8 bits), so this is basically just a typedef for uint8

talkol avatar Dec 05 '18 06:12 talkol

yes, we are interested. I took a look at active contracts seems to be used.

The possible values are constants of true and false, or 1 (for true), 0 for false.  We should make sure that if the value is “false” (which in golang maybe equal to 0 - that the value will be saved on the state).

In regards to what you wrote, from a point of view of a smart contract developer will I be able to write, for example : state.WriteBoolByKey("key", false) ? This task right now, is not the most urgent and will be connected to epic https://tree.taiga.io/project/orbs-network/epic/363 (spec ready by end of December, dev to start around Jan ).

Tal - if you have rough EE for this task, that would be great.

EsterEdelstein avatar Dec 05 '18 08:12 EsterEdelstein