-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathCargo.toml
More file actions
149 lines (140 loc) · 5.29 KB
/
Copy pathCargo.toml
File metadata and controls
149 lines (140 loc) · 5.29 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
[package]
name = "mpc-contract"
version = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
repository = "https://github.com/near/mpc"
# Reproducible builds are produced by two coexisting paths
# (see `docs/reproducible-builds.md`):
# 1. The Nix derivation at `nix/mpc-contract.nix` (exposed as
# `packages.<system>.mpc-contract` in `flake.nix`).
# 2. cargo-near, driven by the NEP-330 metadata below. The pinned
# `sourcescan/cargo-near` image lets third-party verifiers
# (sourcescan.io, nearblocks) replay and verify the on-chain WASM.
# fields to configure build with WASM reproducibility, according to specs
# in https://github.com/near/NEPs/blob/master/neps/nep-0330.md
[package.metadata.near.reproducible_build]
# docker image, descriptor of build environment; pinned to match
# `rust-toolchain.toml` (1.93.0)
image = "sourcescan/cargo-near:0.21.1-rust-1.93.0"
# tag after colon above serves only descriptive purpose; image is identified by digest
image_digest = "sha256:79b789c81ba19ec30794a6b1046b02dcaf5c055994b22cc7c9af67ab5096b095"
# list of environment variables names, whose values, if set, will be used as external build parameters
# in a reproducible manner
# supported by `sourcescan/cargo-near:0.10.1-rust-1.82.0` image or later images
passed_env = []
# build command inside of docker container
# if docker image from default gallery is used https://hub.docker.com/r/sourcescan/cargo-near/tags,
# the command may be any combination of flags of `cargo-near`,
# supported by respective version of binary inside the container besides `--no-locked` flag
container_build_command = [
"cargo",
"near",
"build",
# this is counter intuitive, but it correctly follows the docs,
# the non-reproducible build inside a reproducible environment becomes reproducible
"non-reproducible-wasm",
"--locked",
"--profile=release-contract",
"--features",
"abi",
]
[lib]
crate-type = ["cdylib", "lib"]
[features]
test-utils = [
"rand",
"threshold-signatures",
"near-mpc-contract-interface/blstrs",
"near-sdk/unit-testing",
]
# WASM-compatible benchmark endpoints for sandbox gas testing
bench-contract-methods = []
# Sandbox-only view methods that expose internal contract state for tests that need to
# assert invariants that aren't visible through the production API surface (e.g. the
# length of a fan-out queue). Distinct from `bench-contract-methods` because these are
# behavioral hooks, not gas-measurement hooks.
sandbox-test-methods = []
dev-utils = ["rand", "threshold-signatures", "near-mpc-contract-interface/blstrs"]
abi = [
"borsh/unstable__schema",
"near-mpc-contract-interface/abi",
"mpc-attestation/abi",
"mpc-primitives/abi",
"tee-verifier-interface/borsh-schema",
"schemars",
]
# This is used when running `cargo clippy --all-features`, because otherwise `abi` feat will break compilation.
# But we can't put it under `abi` feat either, because it should appear only when building schema. In other words,
# if it appears under wasm32 target, it will break compilation too.
__abi-generate = ["abi", "near-sdk/__abi-generate"]
[dependencies]
assert_matches = { workspace = true }
attestation = { workspace = true }
blstrs = { workspace = true }
borsh = { workspace = true }
curve25519-dalek = { workspace = true }
derive_more = { workspace = true, features = ["from", "deref"] }
elliptic-curve = { workspace = true }
hex = { workspace = true, features = [] }
k256 = { workspace = true, features = [
"sha256",
"ecdsa",
"serde",
"arithmetic",
"expose-field",
] }
mpc-attestation = { workspace = true }
mpc-primitives = { workspace = true }
near-account-id = { workspace = true, features = ["serde"] }
near-mpc-bounded-collections = { workspace = true }
near-mpc-contract-interface = { workspace = true, features = [
"ed25519-dalek",
"k256",
"near",
] }
near-mpc-signature-verifier = { workspace = true }
near-sdk = { workspace = true }
rand = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_with = { workspace = true }
tee-verifier-interface = { workspace = true }
thiserror = { workspace = true }
threshold-signatures = { workspace = true, optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
near-account-id = { workspace = true, features = [
"serde",
"schemars-v0_8",
"abi",
] }
schemars = { workspace = true, optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { workspace = true, features = ["custom"] }
[dev-dependencies]
anyhow = { workspace = true }
cargo-near-build = { workspace = true }
contract-history = { workspace = true }
digest = { workspace = true }
ecdsa = { workspace = true }
futures = { workspace = true }
insta = { workspace = true }
mpc-contract = { workspace = true, features = [
"sandbox-test-methods",
"test-utils",
] }
near-abi = { workspace = true }
near-mpc-sdk = { workspace = true }
near-workspaces = { workspace = true }
rand = { workspace = true }
rand_core = { workspace = true }
rstest = { workspace = true }
sha2 = { workspace = true }
signature = { workspace = true }
test-utils = { workspace = true }
threshold-signatures = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
zstd = { workspace = true }
[lints]
workspace = true