-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from jeje/feat/gateway-lib
feat(lib): introduced ENS gateway library
- Loading branch information
Showing
9 changed files
with
73 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
use thiserror::Error; | ||
|
||
/// ENS gateway errors | ||
#[derive(Error, Debug)] | ||
pub enum GatewayErrors { | ||
#[error("invalid dns name")] | ||
/// Invalid ENS name error | ||
#[error("invalid ENS name")] | ||
InvalidName, | ||
/// ABI error | ||
#[error("ABI error {0}")] | ||
Abi(#[from] ethers::contract::AbiError), | ||
/// ABI Parsing error | ||
#[error("ABI parse error {0}")] | ||
AbiParse(#[from] ethers::abi::ParseError), | ||
/// CCIP-Read server error | ||
#[error("CCIP Read error {0}")] | ||
CCIPReadMiddleware(#[from] ccip_read_server::CCIPReadMiddlewareError), | ||
/// Unknown ENS record type error | ||
#[error("unknown record type")] | ||
UnknownRecordType, | ||
/// Invalid signature error | ||
#[error("signature error")] | ||
Signature(#[from] ethers::types::SignatureError), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! ENS offchain resolver gateway framework | ||
|
||
/// Various offchain database storage options | ||
pub mod db; | ||
/// Errors | ||
pub mod errors; | ||
/// Gateway framework | ||
pub mod gateway; | ||
/// Utils | ||
pub mod utils; | ||
|
||
use ethers::prelude::abigen; | ||
|
||
abigen!( | ||
Resolver, | ||
"./res/Resolver.json", | ||
event_derives(serde::Deserialize, serde::Serialize) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters