-
Notifications
You must be signed in to change notification settings - Fork 2
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
contract audit fixes #145
contract audit fixes #145
Conversation
contract/src/airdrop.contract.js
Outdated
const ProofDataShape = harden({ | ||
hash: M.string(), | ||
direction: M.string(), | ||
}); | ||
|
||
const OfferArgsShape = harden({ | ||
tier: M.number(), | ||
address: M.string(), | ||
key: M.string(), | ||
proof: M.arrayOf(ProofDataShape), | ||
}); |
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. Maybe we can also specify max length as (perhaps limits parameter) for string
and arrayOf
. WDYT?
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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 comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
}); | ||
|
||
const OfferArgsShape = harden({ | ||
tier: M.number(), |
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.
tier
seems to be defined as bigInt
in the contract and not as a number
- not sure if that matters.
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.
ATPIT the tier argument is working correctly within the contract. That said, the tier
value is going to be concatenated onto the end of the pubkey hex string rather than being its own argument.
…ng handled correctly when processed through updated offerHandler code
…itedness as generic interface for creating AsyncGenerator subscribtions (#150) This commit contains test for: - Handling bobs offer - Subscribing to bobs wallet - Verifying Alice's inability to make a second claim attempt
closing this PR as these fixes were merged in PR #149. |
Refs: #141, #142