Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to FT-141 for BridgeToken #39

Merged
merged 22 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,793 changes: 1,308 additions & 485 deletions bridge-token-factory/Cargo.lock

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions bridge-token-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ panic = "abort"
overflow-checks = true

[dependencies]
near-sdk = { git = "https://github.com/near/near-sdk-rs", rev = "613adcab6322e4f830efb4d5bde2a810ae642158" }
near-contract-standards = { git = "https://github.com/near/near-sdk-rs", rev = "613adcab6322e4f830efb4d5bde2a810ae642158" }
#near-sdk = { path = "../../near-sdk-rs/near-sdk" }
#near-contract-standards = { path = "../../near-sdk-rs/near-contract-standards" }
serde = { version = "*", features = ["derive"] }
serde_json = "*"
near-sdk = "0.11.0"
borsh = "0.6.2"
# near-sdk = "1.0.0"
uint = { version = "0.8.3", default-features = false }
wee_alloc = { version = "0.4.5", default-features = false, features = [] }
near-lib = { git = "https://github.com/ilblackdragon/balancer-near", rev = "a386305c9829d2e5302a78fdc475c8a279fcf6ed"}
eth-types = { git = "https://github.com/near/rainbow-bridge" }
admin-controlled = { git="https://github.com/near/rainbow-bridge.git", rev="ca01d9e39403a08397de63fb5ae544f760ffcedd"}
rlp = "0.4.2"
Expand All @@ -34,6 +34,10 @@ hex = "0.4.2"
tiny-keccak = "1.4.0"

[dev-dependencies]
near-test = { git = "https://github.com/ilblackdragon/balancer-near", rev = "a386305c9829d2e5302a78fdc475c8a279fcf6ed"}
near-sdk-sim = { git = "https://github.com/near/near-sdk-rs", rev = "613adcab6322e4f830efb4d5bde2a810ae642158" }
#near-sdk-sim = { path = "../../near-sdk-rs/near-sdk-sim" }
test-token = { git = "https://github.com/mfornet/contracts" }
bridge-token = { path = "../bridge-token" }
mock-prover = { path = "../mock-prover" }
lazy_static = "1.4.0"
rand = "0.7.3"
rand = "0.7.3"
2 changes: 1 addition & 1 deletion bridge-token-factory/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docker run \
-w /host/bridge-token-factory \
-e RUSTFLAGS='-C link-arg=-s' \
nearprotocol/contract-builder \
cargo +stable build --target wasm32-unknown-unknown --release
/bin/bash -c "rustup target add wasm32-unknown-unknown; cargo build --target wasm32-unknown-unknown --release"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasm32-unknown-unknown is not installed in the current docker image for the latest toolchain. Notice it haven't been updated for 8 months. The Dockerfile is correct but we need to publish the new image. Filed issue at near/near-sdk-rs#310

The error I'm getting right now:

   Compiling bridge-token-factory v0.1.0 (/host/bridge-token-factory)
error[E0463]: can't find crate for `std`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `bridge-token-factory`.


mkdir -p res
cp $DIR/target/wasm32-unknown-unknown/release/bridge_token_factory.wasm $DIR/../res/
1 change: 1 addition & 0 deletions bridge-token-factory/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stable-2020-10-08
Loading