Post

The pattern that makes it broadly useful: typed proxies.
Add .typed(MyProxy) mid-chain, and you get compile-time argument checking on a call to another contract.
self.tx()
.to(&counter_contract)
.typed(CounterProxy)
.get_count()
.returns(ReturnsResult)
.sync_call();
The proxy is auto-generated from the target contract's ABI. The arguments you pass and the result you receive are typed end-to-end.
English

What to use it for:
• Native transfers — self.tx().to(&user).egld(&amt).transfer()
• ESDT transfers — .single_esdt() for one token, .payment() for multi-token bundles
• Cross-contract calls — sync (same-shard), async with callback (cross-shard), or fire-and-forget transfer_execute
• Deploys, upgrades, and queries — same builder, different terminal operation
English

Tips & Tricks 💡
✦ .typed(MyProxy) gives you compile-time argument checking on cross-contract calls. The proxy is auto-generated by sc-meta all proxy from the target's ABI — never edit it by hand, just regenerate.
✦ .transfer_execute() is fire-and-forget — sends value plus a function call, doesn't await a response. Cheaper than .async_call_and_exit() when you don't need a callback.
✦ .sync_call() works for same-shard targets only. Cross-shard calls are async by protocol — you can't return synchronously across the metachain. Use .async_call_and_exit() with a callback when crossing shards.
✦ .payment(payment_obj) lets the same code path handle EGLD and ESDT transparently. Useful when an endpoint accepts either, or when you're forwarding whatever the caller sent.
English
