-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new RPC endpoint (speculative_exec, query_balance, info_get_cha…
…inspec) Signed-off-by: Roman Bylbas <romka.bulbas@gmail.com>
- Loading branch information
Roman Bylbas
committed
Jul 26, 2023
1 parent
58d419a
commit f53ab5c
Showing
23 changed files
with
670 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# BlockRange | ||
|
||
```php | ||
getLow(): int | ||
``` | ||
|
||
--- | ||
```php | ||
getHigh(): int | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ChainspecRegistryBytes | ||
|
||
```php | ||
getChainspecBytes(): string | ||
``` | ||
Returns Chainspec.toml bytes | ||
|
||
--- | ||
```php | ||
getGenesisAccountsBytes(): ?string | ||
``` | ||
Returns Accounts.toml bytes or `null` | ||
|
||
--- | ||
```php | ||
getGlobalStateBytes(): ?string | ||
``` | ||
Returns GlobalState.toml bytes or `null` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Casper\Entity; | ||
|
||
class BlockRange | ||
{ | ||
private int $low; | ||
|
||
private int $high; | ||
|
||
public function __construct(int $low, int $high) | ||
{ | ||
$this->low = $low; | ||
$this->high = $high; | ||
} | ||
|
||
public function getLow(): int | ||
{ | ||
return $this->low; | ||
} | ||
|
||
public function getHigh(): int | ||
{ | ||
return $this->high; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Casper\Entity; | ||
|
||
class ChainspecRegistryBytes | ||
{ | ||
private string $chainspecBytes; | ||
|
||
private ?string $genesisAccountsBytes; | ||
|
||
private ?string $globalStateBytes; | ||
|
||
public function __construct( | ||
string $chainspecBytes, | ||
?string $genesisAccountsBytes, | ||
?string $globalStateBytes | ||
) | ||
{ | ||
$this->chainspecBytes = $chainspecBytes; | ||
$this->genesisAccountsBytes = $genesisAccountsBytes; | ||
$this->globalStateBytes = $globalStateBytes; | ||
} | ||
|
||
public function getChainspecBytes(): string | ||
{ | ||
return $this->chainspecBytes; | ||
} | ||
|
||
public function getGenesisAccountsBytes(): ?string | ||
{ | ||
return $this->genesisAccountsBytes; | ||
} | ||
|
||
public function getGlobalStateBytes(): ?string | ||
{ | ||
return $this->globalStateBytes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Casper\Entity; | ||
|
||
class DeployExecutionResult | ||
{ | ||
private string $blockHash; | ||
|
||
private DeployExecutionResultData $data; | ||
|
||
public function __construct(string $blockHash, DeployExecutionResultData $data) | ||
{ | ||
$this->blockHash = $blockHash; | ||
$this->data = $data; | ||
} | ||
|
||
public function getBlockHash(): string | ||
{ | ||
return $this->blockHash; | ||
} | ||
|
||
public function getData(): DeployExecutionResultData | ||
{ | ||
return $this->data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace Casper\Entity; | ||
|
||
class DeployExecutionResultData | ||
{ | ||
private string $status; | ||
|
||
private Effect $effect; | ||
|
||
private array $transfers; | ||
|
||
private \GMP $cost; | ||
|
||
private ?string $errorMessage = null; | ||
|
||
public function __construct(string $status, Effect $effect, array $transfers, \GMP $cost, ?string $errorMessage) | ||
{ | ||
$this->status = $status; | ||
$this->effect = $effect; | ||
$this->transfers = $transfers; | ||
$this->cost = $cost; | ||
$this->errorMessage = $errorMessage; | ||
} | ||
|
||
public function getStatus(): string | ||
{ | ||
return $this->status; | ||
} | ||
|
||
public function getEffect(): Effect | ||
{ | ||
return $this->effect; | ||
} | ||
|
||
public function getTransfers(): array | ||
{ | ||
return $this->transfers; | ||
} | ||
|
||
public function getCost(): \GMP | ||
{ | ||
return $this->cost; | ||
} | ||
|
||
public function getErrorMessage(): ?string | ||
{ | ||
return $this->errorMessage; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Casper\Entity; | ||
|
||
class Effect | ||
{ | ||
/** | ||
* @var Operation[] | ||
*/ | ||
private array $operations; | ||
|
||
/** | ||
* @var Transform[] | ||
*/ | ||
private array $transforms; | ||
|
||
public function __construct(array $operations, array $transforms) | ||
{ | ||
$this->operations = $operations; | ||
$this->transforms = $transforms; | ||
} | ||
|
||
public function getOperations(): array | ||
{ | ||
return $this->operations; | ||
} | ||
|
||
public function getTransforms(): array | ||
{ | ||
return $this->transforms; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Casper\Entity; | ||
|
||
class Operation | ||
{ | ||
private string $key; | ||
|
||
private string $kind; | ||
|
||
public function __construct(string $key, string $kind) | ||
{ | ||
$this->key = $key; | ||
$this->kind = $kind; | ||
} | ||
|
||
public function getKey(): string | ||
{ | ||
return $this->key; | ||
} | ||
|
||
public function getKind(): string | ||
{ | ||
return $this->kind; | ||
} | ||
} |
Oops, something went wrong.