-
Notifications
You must be signed in to change notification settings - Fork 444
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
Feature/transaction metadata #523
Feature/transaction metadata #523
Conversation
…it/web3swift into feature/transaction-metadata * 'feature/transaction-metadata' of https://github.com/mloit/web3swift: update Oracle to use the new metadata struct Back out the workaround implemented tor gasPrice on EIP-1159 transactions Add the new metadata struct to EthereumTransaction Create EthereumMetadata struct and add it to the project
@@ -117,8 +106,6 @@ extension EIP1559Envelope { | |||
case v | |||
case r | |||
case s | |||
// MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for 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.
It's 1559 mistyped to 1159
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.
indeed, but it's a line being deleted, so no need to fix.
@@ -147,9 +134,6 @@ extension EIP1559Envelope { | |||
self.to = ethAddr | |||
} | |||
|
|||
// MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for 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.
It's 1559 mistyped to 1159
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.
copy paste when I did the workaround... this PR is removing it
@@ -330,10 +336,7 @@ extension EthereumTransaction { | |||
guard let env = self.envelope as? EIP2930Envelope else { preconditionFailure("Unable to downcast to EIP2930Envelope") } | |||
return env.parameters.gasPrice ?? 0 | |||
case .eip1559: | |||
// MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for 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.
It's 1559 mistyped to 1159
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.
see previous comments
@@ -1,6 +1,6 @@ | |||
Pod::Spec.new do |spec| | |||
spec.name = 'web3swift' | |||
spec.version = '2.5.1' | |||
spec.version = '2.6.0' |
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 have no idea why on earth GitHub is flagging this as a change being made here, as develop
is 2.6.0
not 2.5.1
. This popped up as a result of updating the PR to the latest version of develop
when 2.6.0
was released.
This PR adds a new metadata struct that captures and stores additional data that is returned by a node when getting transaction information, but is not part of the transaction itself. This was inspired by the issue of
gasPrice
data being present for EIP-1559 transactions, even though EIP-1559 transactions have no such field, butOracle
was written to depend on this data for its calculations. ConsequentlyOracle
has also been updated to use the newmeta
field added toEthereumTransaction