diff --git a/.npmignore b/.npmignore index 8e89559..9971573 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,9 @@ docs .idea .husky +.github +coverage +*.tgz +*.log +typedoc.json +build.sh diff --git a/README.md b/README.md index e9f3dc8..74d8de1 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Look at [API Documentation](https://ohager.github.io/signum-smartc-testbed/index ## ROADMAP - [x] Github Starter Template -- [ ] Unit Tests +- [x] Unit Tests - [x] Externalize Utility Functions, e.g. method args conversion -- [ ] Stable MultiSlot Support +- [x] Stable MultiSlot Support - [ ] Adding Testbed for real Blockchain Node diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 258d61a..db42417 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA4uuVipJrShRslIKzswtzUksyS8KSS0uSUpNUdJRKkgsyQDKJOckFhenFuujq9DLKMnNASrLzsxLUbIyNLKo1YGblljskVrhm1pcnJieijAprTQvuSQzP69YH1ke1RwzEyRjSvIRlhYl5hUnQrRjMxGHUgzDYwHoATze8wAAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA3XNvQrCQBAE4HeZ+jAoInJPYGOlnaRYk9UcXu4ks4GA+O4Wgol/9cx8c7jBdDB47ELbR7Hc7ZV21BoOV7EGHlUUUll8NmaNtREOl5Bq+PlifXcvTbjRYauknHWUTn2qLOTEYpq/O6vlhLE8nnaSKM/5L/FP9QsvH+gBPN7zAAAA" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index d456f63..bc35e67 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA61YTXPbIBD9L/SqOF5J/rylObQ55NJ0cvF4OkQiiVoJeQROk3r837tYlgEbEhz7iHlvd3mPReAVaeq/gkxnK/Kn4DmZQjyOCKcVI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JYcrk/0FqrtYYHQ9PT3Bh9vVpehazSZw/LecrzOVNif/awWrFmAkNDIdvPvWp/CzIC1jSHhlnVRiC0m6wuNI8AeodjRmBRLFhZcAZJOtts/gPSbzAnxBIAAA=="; \ No newline at end of file diff --git a/docs/classes/SimulatorTestbed.html b/docs/classes/SimulatorTestbed.html index a6ddfb6..894059d 100644 --- a/docs/classes/SimulatorTestbed.html +++ b/docs/classes/SimulatorTestbed.html @@ -15,7 +15,7 @@
This testbed loads a SmartC Contract and a scenario (set of transactions) and forges all necessary blocks. It's possible to inspect all the results, i.e. transactions, kkv-maps, accounts, in-memory variables, and test them against expected result sets. This class is meant to be used with Test Runners like Vitest or Jest.
-Optional
scenario: TransactionObj[]The initial scenario to be used.
-Private
nodePrivate
nodeRetrieves a given contract by address.
+Retrieves a value from a map per slot.
+Retrieves a list of (key-value)-tuples from a map per slot.
+Retrieves the contract memory for a given slot.
+Retrieves the value of a contract memory variable by name, e.g. myvalue
or inside a function func_myvalue
Retrieves the value of a contract memory variable by name, e.g. myvalue
or inside a function func_myvalue
The name of the variable to retrieve.
Optional
address: bigintThe contract address (default: the last deployed).
Return an array of BlockchainTransactionObj representing the transactions in the blockchain.
+Retrieves all the transactions sent by the contract at a given height. +
Retrieves all the transactions sent by the contract at a given height. Nice to get contract responses.
The blockheight of transactions to fetch.
Optional
address: bigintThe contract address (default: the last deployed).
An array of MemoryObj representing the contract memory.
-Private
injectLoads a contract from the specified code path and eventually initializes the contract with the provided initializers
+Private
injectLoads a contract from the specified code path and eventually initializes the contract with the provided initializers
The path to the SmartC code file.
Optional
initializers: Record<string, string | number | bigint>The initializer object for the contract - Initialization is prepended.
The simulator testbed with the loaded contract.
-Runs a scenario by simulating a series of user transactions.
+Runs a scenario by simulating a series of user transactions.
The array of user transactions representing the scenario.
Updates the current contract to the contract at the specified address.
+Updates the current contract to the contract at the specified address.
The contract address to select. Throws error if contract is not found.
-Sends the argument transactions at the next blockheight and returns all transactions from the selected contract in the subsequent height. Input transactions are modified to match blockheight and contract address. This method forges two blocks in order to get the response.
Transactions to send.
Optional
address: bigintThe target contract address (default: the last deployed).
An array of transactions, or empty array if no one was found.
-Static
Private
toGenerated using TypeDoc
Constructs a simulator testbed instance with or without given scenario