1

On my blueprint, I defined a method buy_hotdog(&mut self, payment: Bucket) and when instantiating my component, I defined the access rules like this:

let access_rules = AccessRules::new()
  .method("buy_hotdog", rule!(require(customer.resource_address())), AccessRule::DenyAll)
  .default(AccessRule::AllowAll, AccessRule::DenyAll);

But how can a customer actually call this method?

Clement
  • 212
  • 1
  • 8

1 Answers1

0

your resource_address is also known as badge token address.

The caller of "buy_hotdog" should have that badge token(s) before calling that function.

Russo
  • 2,186
  • 2
  • 26
  • 42