-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCargo.toml
More file actions
284 lines (269 loc) · 10.7 KB
/
Copy pathCargo.toml
File metadata and controls
284 lines (269 loc) · 10.7 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
[workspace]
resolver = "3"
members = [
"common",
"gateway/*",
"contract/artifacts",
"contract/market",
"contract/patch-state",
"contract/patch-state/types",
"contract/proxy-oracle/governance-kernel",
"contract/proxy-oracle/kernel",
"contract/proxy-oracle/near/common",
"contract/proxy-oracle/near/contract",
"contract/proxy-oracle/near/governance-common",
"contract/proxy-oracle/near/governance-contract",
"contract/proxy-oracle/near/lst-contract",
"contract/proxy-oracle/soroban/contract",
"contract/proxy-oracle/soroban/governance-common",
"contract/proxy-oracle/soroban/governance-contract",
"contract/proxy-oracle/soroban/common",
"contract/proxy-oracle/soroban/integration-tests",
"contract/proxy-oracle/soroban/sep40-adapter-contract",
"contract/pyth-lazer/verifier",
"contract/pyth-lazer/contract",
"contract/redstone-adapter",
"contract/registry",
"contract/vault/macros",
"contract/universal-account",
"contract/vault/curator-primitives",
"contract/vault/kernel",
"contract/vault/near",
"contract/vault/soroban",
"contract/vault/soroban/shared-types",
"contract/vault/soroban/blend-adapter",
"contract/vault/soroban/custodial-adapter",
"contract/vault/soroban/governance",
"contract/vault/soroban/proxy-4626",
"contract/vault/soroban/curator-proxy",
"contract/vault/soroban/share-token",
"fuzz",
"tools/*",
"client/*",
"mock/*",
"service/*",
"test-utils",
"universal-account",
"primitives",
]
[workspace.package]
license = "GPL-3.0-only"
rust-version = "1.86"
repository = "https://github.com/Templar-Protocol/contracts"
edition = "2021"
version = "1.2.1"
[workspace.dependencies]
actix = "0.13.5"
alloy = { version = "1", default-features = false }
alloy-primitives = { version = "1", default-features = false }
anyhow = "1.0.102"
arbitrary = { version = "1", features = ["derive"] }
async-trait = "0.1.89"
axum = "0.8.8"
base64 = "0.22.1"
bip39 = { version = "2.2.2", features = ["zeroize"] }
borsh = { version = "1.5", features = ["unstable__schema"] }
bs58 = "0.5.1"
byteorder = "1"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
clap = { version = "4.6.0", features = ["derive", "env"] }
console = "0.16.3"
dirs = "6"
ed25519-dalek = "2.2.0"
ed25519-dalek-bip32 = "0.3.0"
futures = "0.3.31"
derive_more = { version = "1", default-features = false, features = [
"from",
"into",
"display",
"is_variant",
] }
dotenvy = "0.15.7"
getrandom = { version = "0.2", features = ["custom"] }
hex = { version = "0.4.3", features = ["serde"] }
hex-literal = "0.4"
indexmap = "2"
itertools = "0.14.0"
json-patch = "4.1.0"
jsonrpsee = "0.26.0"
k256 = "0.13.4"
libfuzzer-sys = "0.4"
moka = { version = "0.12.10", features = ["future", "sync"] }
near-account-id = "2.6"
# 0.8.6 is the floor for the `ledger` feature: 0.8.5 passes `slipped10::BIP32Path`
# to near-ledger, which expects `near_slip10::BIP32Path`, so it does not compile.
near-api = "0.8.6"
near-api-types = "0.8.6"
near-chain-configs = "0.34.7"
near-contract-standards = "5.25"
near-crypto = "0.34.7"
near-gas = "0.3.4"
near-jsonrpc-client = "0.20.0"
near-jsonrpc-primitives = "0.34.7"
near-openapi-types = "0.8"
near-openapi-client = "0.8.0"
near-parameters = "0.34.7"
near-primitives = "0.34.7"
near-primitives-core = "0.34.7"
near-sdk = { version = "5.25", default-features = false, features = ["unstable"] }
near-sdk-contract-tools = "4.0.0"
near-sandbox = "0.3.9"
near-sys = "0.2.8"
near-token = "0.3.3"
p256 = "0.13.2"
primitive-types = { version = "0.14.0", features = ["serde"] }
pyth-lazer-protocol = { git = "https://github.com/Templar-Protocol/pyth-lazer-public", rev = "10aebfd0075887e9784f9fb65ef28ddbadb57139", default-features = false }
redstone = { git = "https://github.com/redstone-finance/rust-sdk", tag = "3.1.0-pre1", default-features = false }
reqwest = "0.12.28"
rstest = { version = "0.24" }
schemars = { version = "0.8" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
secrecy = "0.10.3"
serde_json_canonicalizer = "0.3.2"
# Deployment-spec format. `toml::Value` is also the merge substrate for the
# spec's `extends` profile chain.
toml = "0.9"
sqlx = { version = "0.8", features = [
"chrono",
"runtime-tokio",
"tls-native-tls",
"postgres",
"derive",
"json",
"macros",
"migrate",
"uuid",
] }
sha2 = "0.10.9"
solana-sdk = "3.0.0"
sputnikdao2 = { git = "https://github.com/near-daos/sputnik-dao-contract", rev = "5434a59dec23ee0c49df8c8c4350c208a7e75b0b" }
stellar-strkey = { version = "0.0.16", default-features = false }
strum = { version = "0.27", features = ["derive"] }
templar-common = { path = "./common", version = "2.0.0" }
templar-contract-artifacts = { path = "./contract/artifacts" }
templar-gateway-artifacts-dispatch = { path = "./gateway/artifacts-dispatch" }
templar-gateway-artifacts-spec = { path = "./gateway/artifacts-spec" }
templar-gateway-client = { path = "./gateway/client", version = "0.2.4" }
templar-gateway-core = { path = "./gateway/core", version = "0.5.0" }
templar-gateway-macros = { path = "./gateway/macros", version = "0.1.1" }
templar-gateway-methods-dispatch = { path = "./gateway/methods-dispatch", version = "0.5.0" }
templar-gateway-methods-spec = { path = "./gateway/methods-spec", version = "0.5.0" }
templar-gateway-oracle-updates-dispatch = { path = "./gateway/oracle-updates-dispatch" }
templar-gateway-oracle-updates-spec = { path = "./gateway/oracle-updates-spec" }
templar-gateway-runtime = { path = "./gateway/runtime" }
templar-sandbox = { path = "./gateway/sandbox", version = "0.1.0" }
templar-gateway-store = { path = "./gateway/store", version = "0.2.3" }
templar-gateway-testing = { path = "./gateway/testing" }
templar-gateway-types = { path = "./gateway/types", version = "0.4.0" }
templar-patch-state-types = { path = "./contract/patch-state/types", version = "0.1.0" }
templar-primitives = { path = "./primitives", version = "0.1.2" }
templar-proxy-oracle-governance-kernel = { path = "./contract/proxy-oracle/governance-kernel", version = "0.2.1" }
templar-proxy-oracle-kernel = { path = "./contract/proxy-oracle/kernel", version = "0.1.2" }
templar-proxy-oracle-near-common = { path = "./contract/proxy-oracle/near/common", version = "0.1.4" }
templar-proxy-oracle-near-contract = { path = "./contract/proxy-oracle/near/contract" }
templar-proxy-oracle-near-governance-common = { path = "./contract/proxy-oracle/near/governance-common", version = "0.2.3" }
templar-proxy-oracle-near-governance-contract = { path = "./contract/proxy-oracle/near/governance-contract" }
templar-pyth-lazer-adapter-contract = { path = "./contract/pyth-lazer/contract" }
templar-pyth-lazer-verifier = { path = "./contract/pyth-lazer/verifier" }
templar-redstone-bridge = { path = "./service/redstone-bridge" }
templar-tools-common = { path = "./tools/tools-common" }
templar-universal-account = { path = "./universal-account", version = "1.2.4" }
templar-vault-contract = { path = "./contract/vault/near" }
templar-vault-kernel = { path = "./contract/vault/kernel", version = "1.0.1", features = [
"near",
"borsh-schema",
"serde",
"schemars",
"all-actions",
] }
templar-vault-macros = { path = "./contract/vault/macros", version = "0.1.1" }
test-utils = { path = "./test-utils" }
thiserror = "2.0.18"
tokio = { version = "1.51.0", features = ["full"] }
tokio-tungstenite = { version = "0.28", features = ["native-tls"] }
tower = "0.5.3"
tower-http = { version = "0.6.8", features = ["full"] }
tracing = "0.1.44"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
uniffi = "0.31.0"
url = "2.5"
uuid = { version = "1", features = ["serde", "v4"] }
wiremock = "0.5.22"
zeroize = "1.8.2"
stellar-contract-utils = { version = "0.7.1", default-features = false }
stellar-tokens = { version = "0.7.1", default-features = false }
# Rust 1.86 compatibility shim. Upstream stellar-contract-utils 0.7.1 calls
# `u32::is_multiple_of` (stabilized in Rust 1.87) in src/crypto/merkle.rs, which
# fails to build on our pinned toolchain (1.86 — the ceiling NEAR's reproducible
# builds support). This points at a one-commit fork of the upstream `v0.7.1` tag
# that replaces the two call sites with the identical `% 2 == 0`. The redirect
# applies transitively (e.g. stellar-tokens). Audit the delta with:
# git diff v0.7.1 f9d7cee # on Templar-Protocol/stellar-contracts
# Drop this once the change is upstreamed and released.
[patch.crates-io]
stellar-contract-utils = { git = "https://github.com/Templar-Protocol/stellar-contracts", rev = "f9d7cee755ee09cd43f6978eecf7ea8156e32a86" }
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
must_use_candidate = "allow"
large_futures = "allow"
redundant_closure_for_method_calls = "allow"
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
unwrap_used = "deny"
expect_used = "warn"
large_digit_groups = "warn"
wildcard_imports = "allow"
doc_markdown = "allow"
result_large_err = "allow"
ignore_without_reason = "allow"
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
[profile.dev]
incremental = true
[profile.release]
codegen-units = 1
# Tell `rustc` to optimize for small code size.
opt-level = "z"
lto = "fat"
debug = false
panic = "abort"
strip = "symbols"
# Opt into extra safety checks on arithmetic operations https://stackoverflow.com/a/64136471/249801
overflow-checks = true
# Soroban-specific release profile (use with --profile release-soroban)
# Dependencies don't need overflow-check panic strings in WASM — saves ~2.5 KiB.
[profile.release-soroban]
inherits = "release"
opt-level = "z"
lto = "fat"
debug = false
panic = "abort"
strip = "symbols"
# Opt into extra safety checks on arithmetic operations https://stackoverflow.com/a/64136471/249801
overflow-checks = false
[profile.release-soroban.package."*"]
overflow-checks = false
# Like `release-soroban`, but with overflow-checks enabled on our own crates.
# The proxy-oracle contracts build via `stellar contract build`, which mandates
# overflow-checks = true on the contract. Kept as a SEPARATE profile so other
# Soroban contracts (e.g. the vault) that use `release-soroban` are unaffected —
# their builds and WASM sizes do not change. External dependencies keep
# overflow-checks off to limit size.
[profile.release-soroban-checked]
inherits = "release-soroban"
overflow-checks = true
[profile.release-soroban-checked.package."*"]
overflow-checks = false
# https://github.com/launchbadge/sqlx?tab=readme-ov-file#compile-time-verification
[profile.dev.package.sqlx-macros]
opt-level = 3
# Coverage profile for testing
[profile.coverage]
inherits = "dev"
debug = true
# Disable optimizations to get accurate coverage
opt-level = 0
overflow-checks = false