Skip to content

Commit 55411c0

Browse files
committed
add test
1 parent bb8c631 commit 55411c0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Unit/Utils/AbiDecoderTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,15 @@ public function should_decode_multipayment_payload()
5050
'args' => $args,
5151
], $decodedData);
5252
}
53+
54+
/** @test */
55+
public function it_should_decode_function_with_abi()
56+
{
57+
$functionSignature = 'function name() view returns (string)';
58+
$payload = '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000064441524b32300000000000000000000000000000000000000000000000000000';
59+
60+
$decoded = AbiDecoder::decodeFunctionWithAbi($functionSignature, $payload);
61+
62+
$this->assertSame(['DARK20'], $decoded);
63+
}
5364
}

0 commit comments

Comments
 (0)