-
Notifications
You must be signed in to change notification settings - Fork 3
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(io): add handler that forwards a Release-Name
notice to the pr…
#23
Conversation
src/common/main.lua
Outdated
@@ -450,6 +452,37 @@ function ant.init() | |||
SourceCodeTxId = srcCodeTxId | |||
end | |||
) | |||
|
|||
-- IO Network Contract Handlers | |||
Handlers.add(camel("Release-Name"), utils.hasMatchingTag("Action", "Release-Name"), function(msg) |
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.
Can add this to the action map
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.
ah - added it, but forgot to come back and use it. b07e874
], | ||
}); | ||
|
||
// two messages should be sent - one to the io process and one to the sender |
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.
Consider ensuring that both messages were sent and to the intended recipients.
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 integration tests validate that both messages were sent. will add assertions on the target addresses of the messages
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.
…ovided IO process id Only the owner can invoket his handler
…ion map for release-name tags
bc3da70
to
b07e874
Compare
Summary: Introduces and `Auction` object class that is used to store auctions on the `NameRegistry`. We should look towards using more of these classes to leverage some better static analysis and type enforcement on functions. The class is responsible for computing prices based on the initialization details (baseFee, demandFactor, etc.). Auctions are stored as instances of this class, and returned as simple table (excluding function) so clients can compute prices themselves. This initial implementation includes handler support for ANTs returning `permabuy` name registrations. In a separate PR we'll introduce Lease-Expiration-Intiated-Auctions where a name will go in to auction after the grace period has ended. Checklist: - [x] business logic (and docs) to create and store auctions in state with pricing information - [x] handler for `Release-Name` that allows integration with ANTs - [x] handler for `Auction-Info` to get auction information of a given name - [x] handler for `Auction-Bid` to submit bid to acquire name in auction and update arns registry - [x] unit tests with >80% coverage - [x] integration tests for all handlers - [x] update ANT source code to support `Release-Name` handler that forwards to this process - PR: ar-io/ar-io-ant-process#23 - [x] update [ar-io-sdk](https://github.com/ar-io/ar-io-sdk) to include auction types and APIs for auctions - PR: ar-io/ar-io-sdk#235 - [ ] add event data for auction creation and auction bids - WILL DO IN A SEPARATE PR ONCE E2E TESTING IN DEVNET HAS BEEN VALIDATED TODOs: - [x] storing prices in auction state impacts the handler response (`Data` ends up being an empty table - not sure if this is a bug in AO or we are hitting a memory limit). it also costs ~600KiB to store those values in state, which could bloat our memory when several auctions are in process. we could consider just storing the settings of the auction pricing in state, and use that to calculate prices when necessary (still have to create the table, but response doesn't need to contain it). need to think more about this and what is necessary for clients to be able to showing pricing charts. - we've modified to store the auction settings on the auction object, and then clients will compute the price with various parameters Here is the sequence diagram for a permabuy initiated auction <img width="794" alt="image" src="https://github.com/user-attachments/assets/8b1699e2-a764-4a7d-ad65-cafddfe66c19">
…ovided IO process id
Only the owner can invoke his handler
Related PR: ar-io/ar-io-network-process#92