eth_compileLLL

This commit is contained in:
sc0Vu 2017-12-14 19:24:01 +08:00
parent 60e52909ff
commit 6095c92900
2 changed files with 32 additions and 0 deletions

View File

@ -245,6 +245,13 @@ class Eth
'validators' => StringValidator::class
]
]
],
'eth_compileLLL' => [
'params' => [
[
'validators' => StringValidator::class
]
]
]
];

View File

@ -784,6 +784,31 @@ class EthTest extends TestCase
});
}
/**
* testCompileLLL
*
* @return void
*/
public function testCompileLLL()
{
$eth = $this->eth;
$eth->compileLLL('(returnlll (suicide (caller)))', function ($err, $compiled) {
if ($err !== null) {
return $this->fail($err->getMessage());
}
if (isset($compiled->result)) {
$this->assertTrue(is_string($compiled->result));
} else {
// if (isset($compilers->error)) {
$this->assertTrue(true);
// } else {
// $this->assertTrue(true);
// }
}
});
}
/**
* testUnallowedMethod
*