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

Payment solution field added to program and instance #158

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

leirbag95
Copy link
Contributor

Here is what I changed:

/**
 * Code to execute
 */
export type CodeContent = {
    encoding: Encoding;
    entrypoint: string;
    ref: string;
    use_latest: boolean;
    interface: string;
    args: string[];
};
...
/**
 * Payment solution
 */
export type Payment = {
    chain: Chain;
    receiver: string;
    type: PaymentType;
};

export type ProgramContent = BaseContent & {
    ...
    payment?: Payment;
};

aleph-im/aleph-message@92ad3e4

content of INSTACE/PROGRAM:
{
"code" : {
+ "interface": str,
+ "args": str[],
...
}

  • "payment" : {
  • "chain": str,
  • "receiver": str,
  • "type": "hold" | "superfluid"
  • }
    }

https://community.aleph.im/t/pay-as-you-go-using-superfluid/98/12

https://docs.superfluid.finance/superfluid/developers/constant-flow-agreement-cfa/cfa-operations/write-methods/createflow

Copy link
Member

@MHHukiewitz MHHukiewitz left a comment

Choose a reason for hiding this comment

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

ProgramContent and InstanceContent have some overlap, try to merge them in one BaseExecutableContent and expand on that type

src/messages/instance/types.ts Outdated Show resolved Hide resolved
src/messages/program/programModel.ts Outdated Show resolved Hide resolved
@MHHukiewitz MHHukiewitz marked this pull request as ready for review January 5, 2024 20:49
Copy link
Member

@MHHukiewitz MHHukiewitz left a comment

Choose a reason for hiding this comment

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

Finally, all types clean in the types folder. LGTM

@MHHukiewitz MHHukiewitz merged commit 90f12c3 into main Jan 5, 2024
2 of 5 checks passed
@MHHukiewitz MHHukiewitz deleted the feat/payment-field branch January 5, 2024 20:50
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.

2 participants