-
Notifications
You must be signed in to change notification settings - Fork 123
/
update-bindings.sh
executable file
·42 lines (33 loc) · 1.73 KB
/
update-bindings.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -x
set -e
resim="cargo run --manifest-path $PWD/radix-clis/Cargo.toml --bin resim $@ --"
scrypto_bindgen="cargo run --manifest-path $PWD/radix-clis/Cargo.toml --bin scrypto-bindgen $@ --"
file_contents="
use radix_engine_interface::blueprints::access_controller::*;
use radix_engine_interface::blueprints::account::*;
use radix_engine_interface::blueprints::consensus_manager::*;
use crate::prelude::*;
//==================================================================================================
// This file has been autogenerated by the ./update-bindings.sh script and none of the contents here
// are hand-written. If you make any changes to the interface of native blueprints and need to regen
// the bindings then run the update-bindings.sh script at the root of the repo.
//==================================================================================================
"
list=(
"package_sim1pkgxxxxxxxxxfaucetxxxxxxxxx000034355863xxxxxxxxxhkrefh" # Faucet
"package_sim1pkgxxxxxxxxxcnsmgrxxxxxxxxx000746305335xxxxxxxxxxc06cl" # Consensus Manager
"package_sim1pkgxxxxxxxxxdntyxxxxxxxxxxx008560783089xxxxxxxxxnc59k6" # Identity
"package_sim1pkgxxxxxxxxxaccntxxxxxxxxxx000929625493xxxxxxxxxrn8jm6" # Account
"package_sim1pkgxxxxxxxxxplxxxxxxxxxxxxx020379220524xxxxxxxxxl5e8k6" # Pools
"package_sim1pkgxxxxxxxxxcntrlrxxxxxxxxx000648572295xxxxxxxxxxc5z0l" # Access Controller
"package_sim1pkgxxxxxxxxxlckerxxxxxxxxxx000208064247xxxxxxxxxpnfcn6" # Locker Package
);
for address in ${list[@]};
do
file_contents="$file_contents
$($scrypto_bindgen $address --reset-ledger)"
done
echo "$file_contents" > $PWD/scrypto/src/component/stubs.rs
rustfmt $PWD/scrypto/src/component/stubs.rs
python3 format-stubs.py