-
Notifications
You must be signed in to change notification settings - Fork 209
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
DeployContract implementation for Tezos connector #1481
Conversation
Signed-off-by: Alexey Semenyuk <[email protected]>
Signed-off-by: Alexey Semenyuk <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1481 +/- ##
=======================================
Coverage 99.99% 99.99%
=======================================
Files 322 322
Lines 23406 23424 +18
=======================================
+ Hits 23404 23422 +18
Misses 1 1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
internal/blockchain/tezos/tezos.go
Outdated
t.metrics.BlockchainContractDeployment() | ||
} | ||
headers := TezosconnectMessageHeaders{ | ||
Type: "DeployContract", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to have as constant, as these types are used by several chains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done
} | ||
body, err = t.applyOptions(ctx, body, options) | ||
if err != nil { | ||
return true, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarification, let's use resErr.SubmissionRejected instead as we did it below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resErr.SubmissionRejected is a bool value, applyOptions returns error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, instead of 'true' value
Signed-off-by: Alexey Semenyuk <[email protected]>
2d58ba6
to
f4be7bf
Compare
@@ -745,9 +745,7 @@ func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string | |||
"definition": definition, | |||
"contract": contract, | |||
} | |||
if signingKey != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check doesn't make sense since at line 743 we already set "from" to signingKey
} | ||
body, err = t.applyOptions(ctx, body, options) | ||
if err != nil { | ||
return true, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, instead of 'true' value
Related PRs to firefly-tezosconnect and firefly-cli
Request example
Response