diff --git a/.github/workflows/build-contracts.yaml b/.github/workflows/build-contracts.yaml index 4043cda4..31ae9307 100644 --- a/.github/workflows/build-contracts.yaml +++ b/.github/workflows/build-contracts.yaml @@ -31,7 +31,7 @@ jobs: if: matrix.platform == 'near' || matrix.platform == 'solana' uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.79.0 + toolchain: 1.80.0 target: wasm32-unknown-unknown - name: Install NEAR CLI RS diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index d1b9120a..94533273 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -25,7 +25,7 @@ jobs: - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.79.0 + toolchain: 1.80.0 components: clippy, rustfmt target: wasm32-unknown-unknown @@ -52,7 +52,7 @@ jobs: - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.79.0 + toolchain: 1.80.0 target: wasm32-unknown-unknown - name: Cache Rust dependencies diff --git a/near/Cargo.lock b/near/Cargo.lock index 5b6d799f..0c59d9a2 100644 --- a/near/Cargo.lock +++ b/near/Cargo.lock @@ -3401,7 +3401,7 @@ dependencies = [ [[package]] name = "near-plugins" version = "0.2.0" -source = "git+https://github.com/aurora-is-near/near-plugins?tag=v0.3.0#eff928fda517caf4276b9b58b5a3ece0c48ba5ed" +source = "git+https://github.com/aurora-is-near/near-plugins?tag=v0.4.1#6149e0378fe46c7f740153cc0274b6da1f194112" dependencies = [ "bitflags 1.3.2", "near-plugins-derive", @@ -3412,7 +3412,7 @@ dependencies = [ [[package]] name = "near-plugins-derive" version = "0.2.0" -source = "git+https://github.com/aurora-is-near/near-plugins?tag=v0.3.0#eff928fda517caf4276b9b58b5a3ece0c48ba5ed" +source = "git+https://github.com/aurora-is-near/near-plugins?tag=v0.4.1#6149e0378fe46c7f740153cc0274b6da1f194112" dependencies = [ "darling 0.13.4", "proc-macro-crate 0.1.5", diff --git a/near/Cargo.toml b/near/Cargo.toml index c7982384..be90c094 100644 --- a/near/Cargo.toml +++ b/near/Cargo.toml @@ -31,7 +31,7 @@ near-contract-standards = "5.2.0" hex = "0.4.2" borsh = "1.5.1" serde = { version = "1.0.200", features = ["derive"] } -near-plugins = { git = "https://github.com/aurora-is-near/near-plugins", tag = "v0.3.0" } +near-plugins = { git = "https://github.com/aurora-is-near/near-plugins", tag = "v0.4.1" } omni-types = { path = "omni-types" } strum_macros = "0.26" near-workspaces = "0.12.0" diff --git a/near/omni-bridge/src/lib.rs b/near/omni-bridge/src/lib.rs index 8ca461f0..6cc933f8 100644 --- a/near/omni-bridge/src/lib.rs +++ b/near/omni-bridge/src/lib.rs @@ -414,6 +414,8 @@ impl Contract { decimals, ); + require!(amount_to_transfer > 0, "Invalid amount to transfer"); + let transfer_payload = TransferMessagePayload { prefix: PayloadType::TransferMessage, destination_nonce: transfer_message.destination_nonce, @@ -906,6 +908,10 @@ impl Contract { pub fn get_current_destination_nonce(&self, chain_kind: ChainKind) -> Nonce { self.destination_nonces.get(&chain_kind).unwrap_or_default() } + + pub fn get_mpc_account(&self) -> AccountId { + self.mpc_signer.clone() + } } impl Contract { diff --git a/near/res/evm_prover.wasm b/near/res/evm_prover.wasm index 9bf45a51..f408fa8a 100755 Binary files a/near/res/evm_prover.wasm and b/near/res/evm_prover.wasm differ diff --git a/near/res/omni_bridge.wasm b/near/res/omni_bridge.wasm index b37f1da8..f97774a3 100755 Binary files a/near/res/omni_bridge.wasm and b/near/res/omni_bridge.wasm differ diff --git a/near/res/omni_prover.wasm b/near/res/omni_prover.wasm index 0cb36d3f..5967acb6 100755 Binary files a/near/res/omni_prover.wasm and b/near/res/omni_prover.wasm differ diff --git a/near/res/omni_token.wasm b/near/res/omni_token.wasm index 1cbf7762..c5058897 100755 Binary files a/near/res/omni_token.wasm and b/near/res/omni_token.wasm differ diff --git a/near/res/token_deployer.wasm b/near/res/token_deployer.wasm index 8433a8b5..b4ce504f 100755 Binary files a/near/res/token_deployer.wasm and b/near/res/token_deployer.wasm differ diff --git a/near/res/wormhole_omni_prover_proxy.wasm b/near/res/wormhole_omni_prover_proxy.wasm index 3d603e93..1193a266 100755 Binary files a/near/res/wormhole_omni_prover_proxy.wasm and b/near/res/wormhole_omni_prover_proxy.wasm differ diff --git a/near/rust-toolchain b/near/rust-toolchain index 93c0233e..e17bbf13 100644 --- a/near/rust-toolchain +++ b/near/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "1.79.0" +channel = "1.80.0" components = ["clippy", "rustfmt"]