Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsobries committed Jan 27, 2025
1 parent bb8c631 commit 55411c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Unit/Utils/AbiDecoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,15 @@ public function should_decode_multipayment_payload()
'args' => $args,
], $decodedData);
}

/** @test */
public function it_should_decode_function_with_abi()
{
$functionSignature = 'function name() view returns (string)';
$payload = '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000064441524b32300000000000000000000000000000000000000000000000000000';

$decoded = AbiDecoder::decodeFunctionWithAbi($functionSignature, $payload);

$this->assertSame(['DARK20'], $decoded);
}
}

0 comments on commit 55411c0

Please sign in to comment.