Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| TransactionInstruction | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Attestto\SolanaPhpSdk; |
| 4 | |
| 5 | use Attestto\SolanaPhpSdk\Util\AccountMeta; |
| 6 | use Attestto\SolanaPhpSdk\Util\Buffer; |
| 7 | |
| 8 | class TransactionInstruction |
| 9 | { |
| 10 | /** |
| 11 | * @var array<AccountMeta> |
| 12 | */ |
| 13 | public array $keys; |
| 14 | public PublicKey $programId; |
| 15 | public Buffer $data; |
| 16 | |
| 17 | public function __construct(PublicKey $programId, array $keys, $data = null) |
| 18 | { |
| 19 | $this->programId = $programId; |
| 20 | $this->keys = $keys; |
| 21 | $this->data = Buffer::from($data); |
| 22 | } |
| 23 | } |