-
Notifications
You must be signed in to change notification settings - Fork 6
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
d678009
commit 77094d5
Showing
46 changed files
with
5,526 additions
and
146 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,112 @@ | ||
{ | ||
"buildInfo": { | ||
"rustc": { | ||
"version": "1.70.0-nightly", | ||
"commitHash": "2036fdd24f77d607dcfaa24c48fbe85d3f785823", | ||
"commitDate": "2023-03-27", | ||
"channel": "Nightly", | ||
"short": "rustc 1.70.0-nightly (2036fdd24 2023-03-27)" | ||
}, | ||
"contractCrate": { | ||
"name": "aggregator", | ||
"version": "0.0.0" | ||
}, | ||
"framework": { | ||
"name": "multiversx-sc", | ||
"version": "0.40.0" | ||
} | ||
}, | ||
"name": "AggregatorContract", | ||
"constructor": { | ||
"inputs": [], | ||
"outputs": [] | ||
}, | ||
"endpoints": [ | ||
{ | ||
"name": "aggregate", | ||
"mutability": "mutable", | ||
"payableInTokens": [ | ||
"*" | ||
], | ||
"inputs": [ | ||
{ | ||
"name": "steps", | ||
"type": "List<AggregatorStep>" | ||
}, | ||
{ | ||
"name": "limits", | ||
"type": "variadic<TokenAmount>", | ||
"multi_arg": true | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"type": "List<EsdtTokenPayment>" | ||
} | ||
] | ||
} | ||
], | ||
"events": [], | ||
"hasCallback": false, | ||
"types": { | ||
"AggregatorStep": { | ||
"type": "struct", | ||
"fields": [ | ||
{ | ||
"name": "token_in", | ||
"type": "TokenIdentifier" | ||
}, | ||
{ | ||
"name": "token_out", | ||
"type": "TokenIdentifier" | ||
}, | ||
{ | ||
"name": "amount_in", | ||
"type": "BigUint" | ||
}, | ||
{ | ||
"name": "pool_address", | ||
"type": "Address" | ||
}, | ||
{ | ||
"name": "function_name", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"name": "arguments", | ||
"type": "List<bytes>" | ||
} | ||
] | ||
}, | ||
"EsdtTokenPayment": { | ||
"type": "struct", | ||
"fields": [ | ||
{ | ||
"name": "token_identifier", | ||
"type": "TokenIdentifier" | ||
}, | ||
{ | ||
"name": "token_nonce", | ||
"type": "u64" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "BigUint" | ||
} | ||
] | ||
}, | ||
"TokenAmount": { | ||
"type": "struct", | ||
"fields": [ | ||
{ | ||
"name": "token", | ||
"type": "TokenIdentifier" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "BigUint" | ||
} | ||
] | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,48 @@ | ||
import type { CodegenConfig } from "@graphql-codegen/cli"; | ||
|
||
const config: CodegenConfig = { | ||
schema: "http://localhost:3001/graphql", | ||
documents: [ | ||
"graphql/**/*.gql", | ||
// "pages/**/*.gql", "components/**/*.gql", "views/**/*.gql" | ||
], | ||
generates: { | ||
// "./generated/gql/": { | ||
// preset: "client", | ||
// }, | ||
"./generated/gql/schema.graphql": { | ||
plugins: ["schema-ast"], | ||
}, | ||
"./generated/gql/fragmentMetadata.json": { | ||
plugins: ["fragment-matcher"], | ||
}, | ||
"./generated/gql/operations.ts": { | ||
plugins: ["typescript-document-nodes"], | ||
}, | ||
"./generated/gql/graphql-codegen-generated.ts": { | ||
plugins: [ | ||
{ | ||
add: { | ||
content: "/* tslint:disable */", | ||
}, | ||
}, | ||
"typescript", | ||
"typescript-operations", | ||
"typescript-graphql-request", | ||
], | ||
config: { | ||
declarationKind: "interface", | ||
enumsAsTypes: true, | ||
nonOptionalTypename: true, | ||
preResolveTypes: true, | ||
scalars: { | ||
BigInt: "string", | ||
BigDecimal: "string", | ||
Bytes: "string", | ||
AmountHumanReadable: "string", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
export default config; |
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,13 @@ | ||
import { memo } from "react"; | ||
import useGetESDTInfo from "hooks/useGetESDTInfo"; | ||
import Avatar from "."; | ||
|
||
type Props = Omit<Parameters<typeof Avatar>[0], "src" | "alt"> & { | ||
identifier: string; | ||
}; | ||
function TokenAvatar({ identifier, ...props }: Props) { | ||
const token = useGetESDTInfo(identifier); | ||
return <Avatar src={token?.logoURI} alt={token?.name} {...props} />; | ||
} | ||
|
||
export default memo(TokenAvatar); |
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.