Open edmundedgar opened 6 months ago
Something like:
NewInstances.AddressPair
's .one
.two
to .yesFork
.noFork
yesAnswer
=> bytes32(1)
noAnswer
=> bytes32(0)
for reality.eth answerschild1
, child2
to yesChild
, noChild
children
in ForkableStructure
alone with indexes (don't bother making constants like yesChildIndex
->0
, noChildIndex
->1
) but rename internal variables child0
, child1
to yesChild
, noChild
forkResult
which has 3 values (0 for not forked over a question, 1 for yesChild
, 2 for noChild
alone but rename internal child1
etc variablesbytes32
, but L2ChainInfo
consumes forkResult
as a uint8
then translates it. Make the forkQuestionResult
internal mapping private, make getForkQuestionResult
translate to a bytes32
and revert if no answer, and add an external isForkQuestionResultAvailable which returns true
if there's an answer
Clean up the inconsistency in naming with appropriate enums/constants to make sure we're clear which fork stands for "yes" and which for "no".