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

[BOOST-4693] Event Action Beautification / Hardening #81

Conversation

sammccord
Copy link
Contributor

@sammccord sammccord commented Sep 13, 2024

  • offer alternate EventActionPayloadSimple where you can pass actionSteps: ActionStep[] instead of { actionStepOne: ActionStep, ...etc }
  • for all read ops, getActionStep, getActionSteps, etc. dedupe reused action steps, so while there are technically always 4 on the contract, the sdk will know which ones are unique.
  • basic integration tests, can reference for example development
  • typed errors
  • fix validation for address equality

@sammccord sammccord requested a review from a team as a code owner September 13, 2024 00:27
Copy link
Member

@Quazia Quazia left a comment

Choose a reason for hiding this comment

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

This looks good - if we have time I'd like to add tests for some of the other validation properties just to make sure but that's definitely out of scope for this. Looks like the address validation had an issue? It's good we have the EventAction tests in the SDK now.

*/
export const ActionByComponentInterface = {
// ['0x6c3129aa']: ContractAction,
// ['0x97e083eb']: ERC721MintAction,
['0x7687b0ed']: EventAction,
['0x6c3129aa']: EventAction,
Copy link
Member

Choose a reason for hiding this comment

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

The contract didn't change so is the interface we published with wrong?

test('can get the total number of action steps', async () => {
const action = await loadFixture(cloneEventAction(fixtures, erc721));
const count = await action.getActionStepsCount();
expect(count).toBe(1);
Copy link
Member

Choose a reason for hiding this comment

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

Nice

@sammccord sammccord force-pushed the sam/boost-4693-when-creating-an-eventaction-to-dont-require-all-4-steps branch from 0f68693 to 0df8080 Compare September 13, 2024 13:17
@sammccord sammccord enabled auto-merge September 13, 2024 13:18
@sammccord sammccord merged commit a538691 into main Sep 13, 2024
3 checks passed
@sammccord sammccord deleted the sam/boost-4693-when-creating-an-eventaction-to-dont-require-all-4-steps branch September 13, 2024 13:22
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.

2 participants