https://github.com/deemru/wavesreproduce
Waves Reproduce framework
https://github.com/deemru/wavesreproduce
php waveskit wavesplatform
Last synced: about 1 month ago
JSON representation
Waves Reproduce framework
- Host: GitHub
- URL: https://github.com/deemru/wavesreproduce
- Owner: deemru
- License: mit
- Created: 2025-01-20T12:05:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T22:05:19.000Z (about 1 year ago)
- Last Synced: 2025-07-25T02:08:28.650Z (8 months ago)
- Topics: php, waveskit, wavesplatform
- Language: PHP
- Homepage: https://packagist.org/packages/deemru/wavesreproduce
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WavesReproduce
[](https://packagist.org/packages/deemru/wavesreproduce) [](https://packagist.org/packages/deemru/wavesreproduce) [](https://github.com/deemru/WavesReproduce/actions/workflows/php.yml) [](https://packagist.org/packages/deemru/wavesreproduce)
[WavesReproduce](https://github.com/deemru/WavesReproduce) is a framework for reproducing transactions logic already applied to a Waves type blockchain.
- Automatically reconstructs on-chain state
- Watches multiple addresses
- Lets you attach custom logic to different transaction types
## Installation
```bash
composer require deemru/wavesreproduce
```
## Basic usage
```php
use deemru\WavesKit;
use deemru\WavesReproduce;
$wk = new WavesKit;
$address = 'target_waves_address';
$rp = new WavesReproduce( $wk, $address );
$rp->update();
$handlers = [
// Data transactions (type = 12)
12 => [
$address => function( $tx ) {
// Handle data tx for this address
}
],
// Invoke transactions (type = 16)
16 => [
$address => function( $tx ) {
// Handle invoke tx for this address
}
],
];
// Replay all transactions of interest from the earliest recorded height
$rp->reproduce( $handlers );
// Access your replicated state
$state = $rp->state[$address];
```
## Documentaion
- Consider to learn self tests: [selftest.php](https://github.com/deemru/WavesReproduce/blob/master/test/selftest.php)