-
Notifications
You must be signed in to change notification settings - Fork 5
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
595 feature provide raw transaction data for emily api deposit operations #601
595 feature provide raw transaction data for emily api deposit operations #601
Conversation
… with other objects.
/// Raw reclaim script binary. | ||
pub reclaim_script: String, | ||
/// Raw deposit script binary. | ||
pub deposit_script: String, |
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.
qq: I was looking around and noticed that those scripts, as well as things like bitcoin_txid
, are Strings; and I didn't see any reference to specific encodings used (eg, hex or b64). So, if those are just normal strings, don't we risk to break everything if the raw binary is not utf8-friendly?
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.
Yeah this isn't specified in the spec either. Can we make this a hex string?
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 will only be a comment change for now since these aren't being messed with.
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.
Done. Changed the comment to the following:
/// Raw reclaim script binary in hex.
pub reclaim_script: String,
/// Raw deposit script binary in hex.
pub deposit_script: String,
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.
That's cool see. I guess that means that we require the input be a hex string. Should we clarify that in an addendum to the spec, or just update it as is now?
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.
update as it is now
if (!EmilyStackUtils.isTablesOnly()) { | ||
const operationLambda: lambda.Function = this.createOrUpdateOperationLambda( | ||
depositTableName, | ||
withdrawalTableName, | ||
chainstateTableName, | ||
props | ||
); | ||
|
||
// Give the operation lambda full access to the DynamoDB tables. | ||
depositTable.grantReadWriteData(operationLambda); | ||
withdrawalTable.grantReadWriteData(operationLambda); | ||
chainstateTable.grantReadWriteData(operationLambda); | ||
// Give the operation lambda full access to the DynamoDB tables. | ||
depositTable.grantReadWriteData(operationLambda); | ||
withdrawalTable.grantReadWriteData(operationLambda); | ||
chainstateTable.grantReadWriteData(operationLambda); | ||
|
||
const emilyApi: apig.SpecRestApi = this.createOrUpdateApi(operationLambda, props); | ||
const emilyApi: apig.SpecRestApi = this.createOrUpdateApi(operationLambda, props); | ||
} |
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.
Prevents the missing bootstrap.zip
case when running the makefile command.
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.
Looks good ✅
Description
Closes: #595
Changes
deposit_script
andreclaim_script
to the Emily APIDeposit
andDepositInfo
resources and updates tests accordingly.Testing Information
Tested with integration tests. At the moment this requires three separate commands to run concurrently, and is easiest with three terminals.
make emily-integration-env-up
make emily-server-watch
make emily-integration-test
Checklist: