-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test-wasms to use release sdk/env and add contract that can tr…
…ansfer using the SAC (#1299) Required for #912. I'm surprised that the test wasms were still being built with rc2 and that we didn't have any issues... (EDIT: nvm we use a local patch for env and sdk when building test wasms)
- Loading branch information
Showing
6 changed files
with
74 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
soroban-test-wasms/wasm-workspace/contract_sac_transfer/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "contract_sac_transfer" | ||
version = "0.0.0" | ||
authors = ["Stellar Development Foundation <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
rust-version = "1.74" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
doctest = false | ||
|
||
[dependencies] | ||
soroban-sdk = { workspace = true } | ||
soroban-env-common = { workspace = true } | ||
|
||
[features] | ||
next = ["soroban-env-common/next"] |
18 changes: 18 additions & 0 deletions
18
soroban-test-wasms/wasm-workspace/contract_sac_transfer/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![no_std] | ||
|
||
use soroban_sdk::{contract, contractimpl, Env, symbol_short, IntoVal, Address, | ||
}; | ||
|
||
#[contract] | ||
struct SacTransfer; | ||
|
||
#[contractimpl] | ||
impl SacTransfer { | ||
pub fn transfer_1(env: Env, sac_address: Address, to: Address) { | ||
env.invoke_contract::<()>(&sac_address, &symbol_short!("transfer"), | ||
(env.current_contract_address(), | ||
to, | ||
1_i128 | ||
).into_val(&env)); | ||
} | ||
} |
Binary file added
BIN
+590 Bytes
soroban-test-wasms/wasm-workspace/opt/curr/contract_sac_transfer.wasm
Binary file not shown.