Skip to content

Commit a5adf29

Browse files
authored
Merge pull request #4 from yakubido/master
remove strtolower, abi methods use camelcase naming
2 parents af0cce4 + 06586fc commit a5adf29

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Coder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,15 @@ public function getAllowance(string $ownerAddress, string $spenderAddress): stri
159159
*/
160160
public function encodeMethod(string $method, array $params): string
161161
{
162-
$methodName = strtolower($method);
163-
$function = $this->contract->functions[$methodName];
162+
$function = $this->contract->functions[$method];
164163
if (count($params) !== count($function['inputs']))
165164
{
166165
throw new CoderException('Incorrect number parameters for method transferFrom.');
167166
}
168167

169168
$data = $this->ethAbi->encodeParameters($function, $params);
170169

171-
$functionSignature = $this->encodeFunctionSignature($methodName);
170+
$functionSignature = $this->encodeFunctionSignature($method);
172171

173172

174173
$code = $functionSignature . Utils::stripZero($data);

0 commit comments

Comments
 (0)