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

Use wallet in smartcontract deploy/invoke commands and calculate GAS properly #747

Merged
merged 2 commits into from Mar 12, 2020

Conversation

@roman-khimov
Copy link
Collaborator

roman-khimov commented Mar 11, 2020

Problem

Real GAS needed to deploy smartcontract was not calculated, so one could only try different GAS values to see which one fits. Wallets were also not integrated properly into this part of the CLI.

That's how it was intended to behave originally. One thing questionable here
is contract price (policy thing, basically) being moved to smartcontract
package, but it's probably fine for NEO 2.0 (as it won't change) and we'll
make something better for NEO 3.0.
@roman-khimov roman-khimov added this to the v0.74.0 milestone Mar 11, 2020
@roman-khimov roman-khimov requested a review from fyrchik Mar 11, 2020
@roman-khimov roman-khimov added the wallet label Mar 11, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #747 into master will decrease coverage by 0.09%.
The diff coverage is 3.12%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #747     +/-   ##
=========================================
- Coverage   66.12%   66.02%   -0.1%     
=========================================
  Files         138      139      +1     
  Lines       12404    12413      +9     
=========================================
- Hits         8202     8196      -6     
- Misses       3807     3822     +15     
  Partials      395      395
Impacted Files Coverage Δ
pkg/rpc/request/txBuilder.go 50.67% <0%> (-0.7%) ⬇️
pkg/smartcontract/deployment_price.go 0% <0%> (ø)
pkg/rpc/client/rpc.go 0% <0%> (ø) ⬆️
pkg/core/gas_price.go 66.66% <100%> (-2.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 695c4dd...25da5a3. Read the comment docs.

cli/smartcontract/smart_contract.go Outdated Show resolved Hide resolved
Passing WIF directly in the command line is not something we should be doing.

Also split netfee and sysfee in the RPC as they're different (and add a script
attribute for free transactions).
@roman-khimov roman-khimov force-pushed the fix-contract-deploy-gas-parameter branch from 000020b to 25da5a3 Mar 12, 2020
@roman-khimov roman-khimov requested a review from AnnaShaleva Mar 12, 2020
@roman-khimov roman-khimov merged commit 734778c into master Mar 12, 2020
7 of 9 checks passed
7 of 9 checks passed
codecov/patch 3.12% of diff hit (target 66.12%)
Details
codecov/project 66.02% (-0.1%) compared to 695c4dd
Details
GolangCI No issues found!
Details
ci/circleci: build_cli Your tests passed on CircleCI!
Details
ci/circleci: build_image Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_1_12 Your tests passed on CircleCI!
Details
ci/circleci: test_1_13 Your tests passed on CircleCI!
Details
ci/circleci: vet Your tests passed on CircleCI!
Details
@roman-khimov roman-khimov deleted the fix-contract-deploy-gas-parameter branch Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.