Update the script example in the Sway Book to use an actual example
@@ -7,25 +7,7 @@ Scripts are state-aware in that while they have no persistent storage (because t
This example script calls a contract:
```sway
-script;
-
-use example_contract::MyContract;
-
-struct InputStruct {
- field_1: bool,
- field_2: u64,
-}
-
-// All scripts require a main function.
-fn main () {
- let x = abi(MyContract, 0x8900c5bec4ca97d4febf9ceb4754a60d782abbf3cd815836c1872116f203f861);
- let asset_id = 0x7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777;
- let input = InputStruct {
- field_1: true,
- field_2: 3,
- };
- x.foo(5000, 0, asset_id, input);
-}
+{{#include ../../../examples/wallet_contract_caller_script/src/main.sw}}
```
Scripts, similar to predicates, rely on a `main()` function as an entry point. You can call other functions defined in a script from the `main()` function or call another contract via an [abi cast](./smart_contracts.md#calling-a-smart-contract-from-a-script).
