Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Add test mode gas when invoking #727

Merged
merged 24 commits into from
Feb 1, 2021

Conversation

bettybao1209
Copy link
Contributor

shargon
shargon previously approved these changes Jan 25, 2021
@shargon shargon self-requested a review January 25, 2021 10:16
erikzhang
erikzhang previously approved these changes Jan 26, 2021
Copy link
Member

@superboyiii superboyiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/bettybao1209/neo-node/blob/a85b767e76a62a0343c1b276743f1b4199bd1041/neo-cli/CLI/MainService.cs#L488
Please change here like: using (ApplicationEngine engine = ApplicationEngine.Run(tx.Script, container: tx, gas:1010_00000000)), it was called by register candidates method straightly. This is what I need.

shargon
shargon previously approved these changes Jan 26, 2021
@bettybao1209 bettybao1209 dismissed stale reviews from shargon and erikzhang via 912624a January 26, 2021 10:31
@bettybao1209
Copy link
Contributor Author

Please change here like: using (ApplicationEngine engine = ApplicationEngine.Run(tx.Script, container: tx, gas:1010_00000000)), it was called by register candidates method straightly. This is what I need.

There are two ways to register a candidate, so I updated both the invoke and register candidate commands. Also, I have to add the TestModeGas in MakeTransaction method since it also runs the script. Please review again.

@superboyiii superboyiii mentioned this pull request Jan 29, 2021
36 tasks
@bettybao1209
Copy link
Contributor Author

bettybao1209 commented Jan 30, 2021

Use comma to separate signers.

  1. Insufficient gas (two signers + default gas):
    invoke 0xf61eebf573ea36593fd43aa150c055ad7906ab83 registerCandidate [{"type":"PublicKey","value":"03d922481a6190c0afdc200600abec944d5b588a6fe6ef9639cc28be3493319b0d"}] NaqFR6Qv3VM3XWLLqbuK6PwRi9uYGGDk1e NMbT8LVG9aLdKs3HBzf5LvV2XBqjjjjpeR,NUjGMLwcYZuhUSTeNcZSvYkrQRciAhnFET

  2. succeed (+ 1010 gas) :
    invoke 0xf61eebf573ea36593fd43aa150c055ad7906ab83 registerCandidate [{"type":"PublicKey","value":"03d922481a6190c0afdc200600abec944d5b588a6fe6ef9639cc28be3493319b0d"}] NaqFR6Qv3VM3XWLLqbuK6PwRi9uYGGDk1e NMbT8LVG9aLdKs3HBzf5LvV2XBqjjjjpeR,NUjGMLwcYZuhUSTeNcZSvYkrQRciAhnFET 1010

@bettybao1209
Copy link
Contributor Author

wait for #733

neo-cli/CLI/MainService.cs Outdated Show resolved Hide resolved
Tommo-L
Tommo-L previously approved these changes Jan 31, 2021
Neo.ConsoleService/CommandToken.cs Outdated Show resolved Hide resolved
neo-cli/CLI/MainService.Vote.cs Show resolved Hide resolved
erikzhang
erikzhang previously approved these changes Feb 1, 2021
@shargon shargon requested a review from superboyiii February 1, 2021 09:21
@superboyiii superboyiii merged commit 5238b4e into neo-project:master Feb 1, 2021
@bettybao1209 bettybao1209 deleted the add-testgas branch February 1, 2021 09:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insufficient TestModeGas for register candidate
5 participants