vm: implements CONVERT opcode

This commit is contained in:
Evgenii Stratonikov 2020-04-28 11:24:02 +03:00
parent be38798785
commit 7e98a2ffa0
7 changed files with 253 additions and 8 deletions

View file

@ -80,8 +80,7 @@ func (e *Element) BigInt() *big.Int {
return val
}
// Bool attempts to get the underlying value of the element as a boolean.
// Will panic if the assertion failed which will be caught by the VM.
// Bool converts an underlying value of the element to a boolean.
func (e *Element) Bool() bool {
return e.value.Bool()
}