-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
148073a
commit e469368
Showing
6 changed files
with
154 additions
and
50 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
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,37 @@ | ||
use utoipa::ToSchema; | ||
|
||
// Structs for the utoipa OpenAPI schema generator. | ||
|
||
/// Signature bytes. | ||
#[derive(ToSchema)] | ||
#[schema( | ||
example = "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" | ||
)] | ||
#[allow(dead_code)] | ||
pub struct Signature(String); | ||
|
||
/// 32 bytes of arbitrary application specific data that can be added to an | ||
/// order. This can also be used to ensure uniqueness between two orders with | ||
/// otherwise the exact same parameters. | ||
#[derive(ToSchema)] | ||
#[schema(example = "0x0000000000000000000000000000000000000000000000000000000000000000")] | ||
#[allow(dead_code)] | ||
pub struct AppData(String); | ||
|
||
/// Amount of an ERC20 token. 256 bit unsigned integer in decimal notation. | ||
#[derive(ToSchema)] | ||
#[schema(example = "1234567890")] | ||
#[allow(dead_code)] | ||
pub struct TokenAmount(String); | ||
|
||
/// An Ethereum public address. | ||
#[derive(ToSchema)] | ||
#[schema(example = "0x0000000000000000000000000000000000000000")] | ||
#[allow(dead_code)] | ||
pub struct Address(String); | ||
|
||
/// An ERC20 token address. | ||
#[derive(ToSchema)] | ||
#[schema(example = "0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB")] | ||
#[allow(dead_code)] | ||
pub struct Token(String); |
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
Oops, something went wrong.