Skip to content

Commit

Permalink
Fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbaThony committed Oct 17, 2023
1 parent addde83 commit e6f7c4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ like you would with [geth's abigen](https://geth.ethereum.org/docs/tools/abigen)
Just use Composer. Install the beta version for now.

```shell
composer require m8b/ether-binder:v0.1.5-beta
composer require m8b/ether-binder:v0.1.6-beta
```

## 📖 Documentation
Expand Down
2 changes: 1 addition & 1 deletion src/Contract/ABIGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ protected function buildMethodParams(string $fnName, array $inputs, BuilderFacto
}
$validators [] = new Assign(
$bld->var($name),
$bld->methodCall($bld->var("this"), $arr ? "expectIntArrOfSize" : "expectIntOfSize", [
$bld->staticCall("self", $arr ? "expectIntArrOfSize" : "expectIntOfSize", [
$bld->val($type[0] === "u"),
$bld->var($name),
$bld->val($bitsCount)])
Expand Down
6 changes: 3 additions & 3 deletions src/Contract/AbstractContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ protected function mkPayableTxn(string $signature, OOGmp $value, array $params):
/**
* @throws EthBinderArgumentException
*/
protected function expectBinarySizeNormalizeString(string $binOrHex, int $length): string
protected static function expectBinarySizeNormalizeString(string $binOrHex, int $length): string
{
if($length == 0 && str_starts_with($binOrHex, "0x") && ctype_xdigit(substr($binOrHex, 2)))
return hex2bin(substr($binOrHex, 2));
Expand All @@ -361,7 +361,7 @@ protected function expectBinarySizeNormalizeString(string $binOrHex, int $length
/**
* @throws EthBinderArgumentException
*/
protected function expectIntOfSize(bool $unsigned, int|OOGmp $value, int $bits): OOGmp
protected static function expectIntOfSize(bool $unsigned, int|OOGmp $value, int $bits): OOGmp
{
if(is_int($value))
$value = new OOGmp($value);
Expand All @@ -380,7 +380,7 @@ protected function expectIntOfSize(bool $unsigned, int|OOGmp $value, int $bits):
/**
* @throws EthBinderArgumentException
*/
protected function expectIntArrOfSize(bool $unsigned, array $value, int $bits): array
protected static function expectIntArrOfSize(bool $unsigned, array $value, int $bits): array
{
$o = [];
foreach($value AS $itm) {
Expand Down

0 comments on commit e6f7c4d

Please sign in to comment.