-
Notifications
You must be signed in to change notification settings - Fork 4
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
#132 Connector Redesign [WIP] #201
Conversation
serde(rename_all = "camelCase") | ||
)] | ||
pub struct Block<TX> { | ||
/// Hash of the block | ||
pub hash: H256, |
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 had to re-implement some ethers-rs primitives because they didn't implement scale-codec and scale-info traits.
I'm using the scale-info to generate the metadata for allowing timegraph and other components to parse the encoded task.
chains/ethereum/config/src/types.rs
Outdated
#[derive(Decode, Encode)] | ||
pub enum Query { | ||
/// Returns the balance of the account of given address. | ||
GetBalance(GetBalanceQuery), | ||
/// Returns the value from a storage position at a given address. | ||
GetStorageAt(GetStorageAtQuery), | ||
/// Returns the receipt of a transaction by transaction hash. | ||
GetTransactionReceipt(GetTransactionReceiptQuery), | ||
/// Executes a new message call immediately without creating a transaction on the block | ||
/// chain. | ||
CallContract(CallContractQuery), | ||
/// Returns the account and storage values of the specified account including the | ||
/// Merkle-proof. This call can be used to verify that the data you are pulling | ||
/// from is not tampered with. | ||
GetProof { | ||
/// Address of the Account | ||
address: Address, | ||
/// an array of storage-keys that should be proofed and included | ||
storage_keys: Vec<U256>, | ||
/// State at the block | ||
block: BlockIdentifier, | ||
}, | ||
} |
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 is the new definition of ethereum read-only tasks, this type is scale encoded/decoded by the connector.
Description
Connector Redesign - Work in Progress
This work drastically changes the connector api, some changes includes:
Fixes #132
Type of change
Code review prechecks: