Closed hhio618 closed 1 week ago
@0x4007 This task looks off to me. If there's no progress soon, I discontinue my work here on this PR.
Can you post QA to prove it's working
@whilefoo @rndquu @gentlementlegen I don't recall who worked on the NFT minting part but the tests are failing due to it, and it doesn't seem like any changes related to it were made in this pull.
Workflow dispatch event: https://github.com/hhio618/permit-generation/actions/runs/11167533080/job/31043948081 Report: https://github.com/hhio618/permit-generation/issues/5
The purpose of this feature is to centralize permit generation so that we can enforce fees. All plugins should call this as an API with "permit requests."
But plugins can't call another plugin or do you mean having plugins return permit requests to the kernel and then the kernel calls permit-generation
?
I think we discussed that this should be a Worker plugin because the problem Action plugin is that when we implement rollup rewards, the pay.ubq.fi
backend can't call an Action plugin and get the result back, it can only call a Worker plugin but it needs the kernel's private key to sign the payload.
The purpose of this feature is to centralize permit generation so that we can enforce fees. All plugins should call this as an API with "permit requests."
But plugins can't call another plugin or do you mean having plugins return permit requests to the kernel and then the kernel calls
permit-generation
?I think we discussed that this should be a Worker plugin because the problem Action plugin is that when we implement rollup rewards, the
pay.ubq.fi
backend can't call an Action plugin and get the result back, it can only call a Worker plugin but it needs the kernel's private key to sign the payload.
Got it that makes sense. In this case we can accept this pull and then make a new task for it to be a worker, because this pull achieves the task spec.
Filename | unlisted |
---|---|
src/handlers/generate-erc20-permit.ts | uuid |
Generated output:
W3sidG9rZW5UeXBlIjoiRVJDMjAiLCJ0b2tlbkFkZHJlc3MiOiIweGU5MWQxNTNlMGI0MTUxOGEyY2U4ZGQzZDc5NDRmYTg2MzQ2M2E5N2QiLCJiZW5lZmljaWFyeSI6IjB4NjMyMTI4NkY5QjczZjQyN0M3MmUxZjlGMWJDNmIzZDI1ZUYwNjYwNSIsIm5vbmNlIjoiMTE3MTAxNzE4NTUwNjA4NTI0NzQyODgxNTg5NDQ3MzY3Mjc1ODc2MjY4Nzk0NDc5MDQwMjMwOTI5MDQzOTkyNjUxNDMzNjM4OTIyMDUiLCJkZWFkbGluZSI6IjExNTc5MjA4OTIzNzMxNjE5NTQyMzU3MDk4NTAwODY4NzkwNzg1MzI2OTk4NDY2NTY0MDU2NDAzOTQ1NzU4NDAwNzkxMzEyOTYzOTkzNSIsImFtb3VudCI6IjIwMDAwMDAwMDAwMDAwMDAwMDAwMCIsIm93bmVyIjoiMHhmMzlGZDZlNTFhYWQ4OEY2RjRjZTZhQjg4MjcyNzljZmZGYjkyMjY2Iiwic2lnbmF0dXJlIjoiMHhmM2MwNDViZTEzMTU4MTJkMmQyYmVlZDdmOGQ0YWZlOTQwODU4NTg4YTBiZTdjNjlkZWM4MWI0MThjMzkxOWExMmY2NDE5YTUxZTJkMzIyZDJhMGVjZmI2ZTkyMTdhYzBlMTcwM2RkNjhhZGE0N2ZhMzcxZTNlODQzYTRmNWQxNzFjIiwibmV0d29ya0lkIjoxMDB9XQ==
Technical question: I was reading the related spec and it states:
This should be the only way to generate permits in our system, so that we can enforce capturing value from plugin developers.
So it would mean that https://github.com/ubiquity-os-marketplace/text-conversation-rewards for example should be using this instead of generating permits on its own. It could eventually call this Action, but workers are not instantaneous and the end of the workflow should be awaited somewhere. In the case of a Worker that would eventually need to generate a permit, I don't see how this could be called either. Wouldn't it make more sense to have this as an endpoint? I understand this is a long running task which is why it was designed as an Action, but seems tricky to use in a real-case scenario.
I understand this is a long running task which is why it was designed as an Action, but seems tricky to use in a real-case scenario.
I dont think this needs to be long running. So it makes sense to make an API endpoint hosted on Cloudflare Workers.
Output:
W3sidG9rZW5UeXBlIjoiRVJDMjAiLCJ0b2tlbkFkZHJlc3MiOiIweGU5MWQxNTNlMGI0MTUxOGEyY2U4ZGQzZDc5NDRmYTg2MzQ2M2E5N2QiLCJiZW5lZmljaWFyeSI6IjB4NjMyMTI4NkY5QjczZjQyN0M3MmUxZjlGMWJDNmIzZDI1ZUYwNjYwNSIsIm5vbmNlIjoiNzY1OTI2OTEzNjcyMjY0NDcxNjk2NzA2NDQ1MTk2MDM0ODA3ODExMDY1Nzc2MzMxMjMwNjkyNjM5NzcyODk2NzQwMDk2MDA2Mjc0ODIiLCJkZWFkbGluZSI6IjExNTc5MjA4OTIzNzMxNjE5NTQyMzU3MDk4NTAwODY4NzkwNzg1MzI2OTk4NDY2NTY0MDU2NDAzOTQ1NzU4NDAwNzkxMzEyOTYzOTkzNSIsImFtb3VudCI6IjIwMDAwMDAwMDAwMDAwMDAwMDAwMCIsIm93bmVyIjoiMHhmMzlGZDZlNTFhYWQ4OEY2RjRjZTZhQjg4MjcyNzljZmZGYjkyMjY2Iiwic2lnbmF0dXJlIjoiMHhiNmY2NjA5YjRiOGI4ZjViMjYwZDRhODc4ZmIyY2FlYzk2MjMwZWJmNDlmZmVhZjVkNzZkNDRiMjYxYmZhZjM1MjUxYzIxM2RkNTdhNmFhMjU1MDlhMGUwZmQxYTcxNDBjOTcyOTVjM2U0MDk4YzYzZjE0ZWVlZjhjYjc3NzQ2YTFjIiwibmV0d29ya0lkIjoxMDB9XQ==
What about the footer config code?
I think in order to save time we should:
What about the footer config code?
The actual comment is posted via https://github.com/ubiquity-os-marketplace/text-conversation-rewards, https://github.com/ubiquity-os/permit-generation is responsible solely for permits
What about the footer config code?
Could you please provide more details or specifications for this task?
It's in the middle of the spec. But maybe it makes sense to scope this for only the reward amounts to be returned
Resolves #68