2

I created a blueprint with a method accepting a Bucket and a BucketRef and I don't know how to call it with resim. How can I send buckets when calling a method of my components ?

Clement
  • 212
  • 1
  • 8

1 Answers1

2

You send Buckets (or BucketRefs) to method/functions with resim by using the following format: [amount],[token_resource_def].

For example, if your component have the following method:

pub fn show_amount(&self, tokens: BucketRef) {
    info!("{}", list.amount());
    list.drop();
}

To create a BucketRef of 1000 XRD and send it to this method, you would use resim like this:

resim call-method [component_address] show_amount 1000,030000000000000000000000000000000000000000000000000004 
Clement
  • 212
  • 1
  • 8