-
Notifications
You must be signed in to change notification settings - Fork 4
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
[BOOST-4693] Event Action Beautification / Hardening #81
Conversation
There was a problem hiding this 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.
packages/sdk/src/Actions/Action.ts
Outdated
*/ | ||
export const ActionByComponentInterface = { | ||
// ['0x6c3129aa']: ContractAction, | ||
// ['0x97e083eb']: ERC721MintAction, | ||
['0x7687b0ed']: EventAction, | ||
['0x6c3129aa']: EventAction, |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
0f68693
to
0df8080
Compare
EventActionPayloadSimple
where you can passactionSteps: ActionStep[]
instead of{ actionStepOne: ActionStep, ...etc }
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.