Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE-2600 Optionally override a blockchain state in /utils/script/evaluate #3858

Merged
merged 17 commits into from
Jul 5, 2023

Conversation

vsuharnikov
Copy link
Member

@vsuharnikov vsuharnikov commented Jun 28, 2023

Now a user can specify a portion of blockchain state to override in a body of REST API request: /utils/script/evaluate.
Only asset balances is supported for now.

{
  "call": { /*...*/ }, // or "expr"
  // ...,
  "state": {
    "accounts": {
      "$address1": {
        "regularBalance": 11111, // An optional field
        "assetBalances": { // An optional field
          "$assetId1" -> 22222,
          "$assetId2" -> "33333" // Strings as values are supported as well
          // ...
        }
      },
      "$address2": {
        // "regularBalance": 11111,
        "assetBalances": {
          "$assetId2" -> "33333"
          // ...
        }
      },
    }
  }
}

@vsuharnikov vsuharnikov marked this pull request as ready for review June 29, 2023 15:28
@yvaskov yvaskov requested review from DrBlast and yvaskov June 30, 2023 09:23
* Swagger UI 5.1.0;
* OpenAPI 3.0.1 -> 3.1.0.
…use we're moving to JDK 11 that has no getClass.getSimpleName issue
@phearnot phearnot merged commit b0fad2a into version-1.4.x Jul 5, 2023
1 check passed
@phearnot phearnot deleted the NODE-2600-state-in-utils_script_evaluate branch July 5, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants