Computed (Optional)

Typed Struct (EIP712)

Computed(uint256 index,uint256 value,uint256 add,uint256 sub,uint256 pow,uint256 mul,uint256 div,uint256 mod)

Params

NameType

index

uint256

value

uint256

add

uint256

sub

uint256

pow

uint256

mul

uint256

div

uint256

mod

uint256

index

Sequential number.

In order to prevent loops, computed input value is not allowed from the result of a previous computed.

var

Input variable. Can be any constant value or a variable (externa, returned data, etc), except computed variable with a lower or equal index.

Computed can use the result of another computed as an input value.

"var", "add", "sub", "mul", "div", ect. can hold simple numbers, variables, or computed values.

Formula

result=((var+addsub)powmul/div)modmodresult = ((var + add - sub)^{pow} * mul / div )\bmod{mod}

Last updated