Skip to content
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

feat: get_public_logs #173

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open

feat: get_public_logs #173

wants to merge 29 commits into from

Conversation

mohammedpatla
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Oct 22, 2024

🦋 Changeset detected

Latest commit: 951351c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@shadeprotocol/shadejs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@SissonJ SissonJ left a comment

Choose a reason for hiding this comment

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

Nice work!
Can we rename PublicEvents to PublicLogs to gain consistency with the smart contract?

package.json Outdated Show resolved Hide resolved
action: Record<string, any>
}

type PaginatedPublicEvent = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

use ParsedPagination<PublicEvent[]>

Copy link
Member Author

Choose a reason for hiding this comment

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

So the reason i did not use this name is becasue the name already exists.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Which name already exists?

}

// Paginated response type for public events
type GetPublicEventsResponse = PaginatedResponse<PublicEventResponse>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be <PublicEventResponse[]> correct?

src/contracts/services/moneyMarket.ts Outdated Show resolved Hide resolved
src/contracts/services/moneyMarket.ts Outdated Show resolved Hide resolved
src/contracts/services/moneyMarket.ts Outdated Show resolved Hide resolved
src/types/contracts/moneyMarket/model.ts Outdated Show resolved Hide resolved
src/contracts/services/moneyMarket.ts Outdated Show resolved Hide resolved
src/contracts/services/moneyMarket.ts Show resolved Hide resolved
Comment on lines +55 to +57
const contractAddress = 'secret18537ttv4l4k2ea0xp6ay3sv4c243fyjtj2uqz7';
const lcdEndpoint = 'https://api.secret.com';
const chainId = 'secret-4';
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would just switch these to MOCK_VALUES so that it's clear we aren't actually querying real data via the test.

Copy link
Collaborator

@AustinWoetzel AustinWoetzel left a comment

Choose a reason for hiding this comment

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

just a few more minors from me. Otherwise looks good!

pagination: contract.pageSize && contract.page
? { page_size: contract.pageSize, page: contract.page } : undefined,
},
},
}));

return batchQuery$({
contractAddress: queryRouterContractAddress,
codeHash: queryRouterCodeHash,
contractAddress: queryPublicLogsContractAddress,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not correct, the batch query requires the query router.

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.

4 participants