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

hollow #109

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

hollow #109

wants to merge 6 commits into from

Conversation

asiaziola
Copy link
Contributor

@asiaziola asiaziola commented Nov 22, 2024

FLOW

  1. Owner adds items to the hollow (or change price/add qty) through Add-Item method which adds items to Items map
  2. Client transfers tokens from CBC to Hollow and adds additional tags (like Create-Order tag, tag indicating item and qty)
  3. Credit-Notice triggers Hollow's method which sets new record in Balances map indicating how much of the item specific wallet address posseses, it also subtract specific qty from the Items map
  4. Order is then inserted into the db (wallet_address, item_type, item_qty, payment)

return false
end

return string.match(address, '^[%w%-_]+$') ~= nil and #address == 43
Copy link
Contributor

Choose a reason for hiding this comment

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

eth wallets?

return tostring(bint(a) - bint(b))
end

function ToNumber(a)
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the added value of this fn?

-- init db
db:exec([[
create table if not exists orders(
id INTEGER PRIMARY KEY AUTOINCREMENT,
Copy link
Contributor

Choose a reason for hiding this comment

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

no indexes?

);
]])

Handlers.add('Credit-Notice', Handlers.utils.hasMatchingTag('Action', 'Credit-Notice'), function(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

3 participants