Skip to content

Improve interface for specifying teardown function #6277

@just-mitch

Description

@just-mitch

Go from:

context.set_public_teardown_function(
    context.this_address(),
    FunctionSelector::from_signature("pay_fee_with_shielded_rebate(Field,(Field),Field)"),
    [amount, asset.to_field(), secret_hash]
);

to

FPC::at(context.this_address()).pay_fee_with_shielded_rebate(amount, asset, secret_hash).set_public_teardown_function(&mut context)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions