diem / website

Libra’s mission is to enable a simple global currency and financial infrastructure that empowers billions of people.
https://developers.libra.org
Other
231 stars 221 forks source link

Update run-move-locally.md to work with the current Libra system #215

Closed bob-wilson closed 3 years ago

bob-wilson commented 3 years ago

After https://github.com/libra/libra/pull/4820, the LibraAccount APIs for withdraw_from and deposit_to are not available, so the simple identity function used as an example in MyModule.move cannot be used with Libra coin tokens. It wasn't a very good example, anyway. I've replaced it here by a slightly more complex example that adds a processing fee to a payment. I used 2 custom scripts: one to specify the fee amount and another to send a payment with the additional fee.

Motivation

Previous example no longer worked; also provide a somewhat more interesting example

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

I went through the steps in the document with a local CLI and tried them out.