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

GetAccountState #2475

Merged
merged 5 commits into from
May 21, 2021
Merged

GetAccountState #2475

merged 5 commits into from
May 21, 2021

Conversation

Ashuaidehao
Copy link
Contributor

No description provided.

shargon
shargon previously approved these changes May 19, 2021
@cloud8little
Copy link
Contributor

Test passed:

Account A vote to candidate a with 2 vote, and then transfer 1 neo out, all scenarios work.

{
  "jsonrpc": "2.0",
  "method": "invokefunction",
  "params": ["0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5","getAccountState",[{"type":"Hash160","value":"0x2186ac696d435bdb75c8761373473936dd645beb"}											],[
	]
],
  "id": 1
}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "script": "DBTrW2TdNjlHcxN2yHXbW0NtaayGIRHAHwwPZ2V0QWNjb3VudFN0YXRlDBT1Y+pAvCg9TQ4FxI6jBbPyoHNA70FifVtS",
    "state": "HALT",
    "gasconsumed": "2028330",
    "exception": null,
    "stack": [
      {
        "type": "Struct",
        "value": [
          {
            "type": "Integer",
            "value": "1"
          },
          {
            "type": "Integer",
            "value": "252"
          },
          {
            "type": "ByteString",
            "value": "AwgyqZUbsv67SMlHvO2NsnmBiF8l4lBpp139EkH2q71z"
          }
        ]
      }
    ]
  }
}

the first item is current balance, 2nd item is update height, 3rd item is the voteTo pubkey.

cloud8little
cloud8little previously approved these changes May 19, 2021
src/neo/SmartContract/Native/NeoToken.cs Outdated Show resolved Hide resolved
src/neo/SmartContract/Native/NeoToken.cs Outdated Show resolved Hide resolved
@shargon shargon dismissed stale reviews from cloud8little and themself via 4a8d608 May 20, 2021 07:29
@shargon shargon merged commit ef6a4e6 into neo-project:master May 21, 2021
ixje added a commit to CityOfZion/neo-mamba that referenced this pull request Jun 1, 2021
@Ashuaidehao Ashuaidehao deleted the add-getaccountstate branch June 3, 2021 02:50
@mialbu mialbu mentioned this pull request Jun 3, 2021
3 tasks
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.

4 participants