Skip to content

Conversation

@grothem
Copy link
Contributor

@grothem grothem commented Sep 24, 2024

  • Adds in a new data provider contract to fetch token in/token out details

@height
Copy link

height bot commented Sep 24, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Comment on lines +14 to +21
struct TokenDetails {
address token;
uint256 balance;
int256 latestAnswer;
uint8 decimals;
string name;
string symbol;
}
Copy link
Contributor

@miguelmtzinf miguelmtzinf Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
struct TokenDetails {
address token;
uint256 balance;
int256 latestAnswer;
uint8 decimals;
string name;
string symbol;
}
struct UserPosition {
address token;
uint256 balance;
int256 tokenPrice;
uint8 tokenDecimals;
string tokenName;
string tokenSymbol;
}

we can cast the int256 into uint256 as well.

WrappedToken[] memory wrappedTokens = new WrappedToken[](wrappedTokenConfigs.length);

for (uint256 i = 0; i < wrappedTokenConfigs.length; i++) {
WrappedToken memory wrappedToken;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move out of the loop

address tokenWrapperContract;
}

struct WrappedTokenConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
struct WrappedTokenConfig {
struct TokenWrapperData {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing docs in general

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants