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

Support Auth Next for host fns #823

Merged
merged 12 commits into from
May 31, 2023
548 changes: 291 additions & 257 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ soroban-native-sdk-macros = { version = "0.0.16", path = "soroban-native-sdk-mac
[workspace.dependencies.stellar-xdr]
version = "0.0.16"
git = "https://github.com/stellar/rs-stellar-xdr"
rev = "eda841f3c08a023bb50f7f79b8b8b8d6083aad83"
rev = "979c0a5dbae204a2efe7bf52c1229081f685c2a0"
default-features = false

[workspace.dependencies.wasmi]
Expand Down
38 changes: 33 additions & 5 deletions soroban-env-common/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,12 @@
},
{
"export": "3",
"name": "create_contract_from_contract",
"name": "create_contract",
"args": [
{
"name": "deployer",
"type": "AddressObject"
},
{
"name": "wasm_hash",
"type": "BytesObject"
Expand All @@ -992,11 +996,35 @@
"type": "BytesObject"
}
],
"return": "BytesObject",
"docs": "Deploys a contract from the current contract. `wasm_hash` must be a hash of the contract code that has already been installed on this network. `salt` is used to create a unique contract id."
"return": "AddressObject",
"docs": "Creates the contract instance on behalf of `deployer`. `deployer` must authorize this call via Soroban auth framework, i.e. this calls `deployer.require_auth` with respective arguments. `wasm_hash` must be a hash of the contract code that has already been uploaded on this network. `salt` is used to create a unique contract id. Returns the address of the created contract."
},
{
"export": "4",
"name": "create_asset_contract",
"args": [
{
"name": "serialized_asset",
"type": "BytesObject"
}
],
"return": "AddressObject",
"docs": "Creates the instance of Stellar Asset contract corresponding to the provided asset. `serialized_asset` is `stellar::Asset` XDR serialized to bytes format. Returns the address of the created contract."
},
{
"export": "5",
"name": "upload_wasm",
"args": [
{
"name": "wasm",
"type": "BytesObject"
}
],
"return": "BytesObject",
"docs": "Uploads provided `wasm` bytecode to the network and returns its identifier (SHA-256 hash). No-op in case if the same Wasm object already exists."
},
{
"export": "6",
"name": "update_current_contract_wasm",
"args": [
{
Expand All @@ -1019,7 +1047,7 @@
"args": [
{
"name": "contract",
"type": "BytesObject"
"type": "AddressObject"
},
{
"name": "func",
Expand All @@ -1039,7 +1067,7 @@
"args": [
{
"name": "contract",
"type": "BytesObject"
"type": "AddressObject"
},
{
"name": "func",
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-common/src/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub const ENV_META_V0_SECTION_NAME: &str = "contractenvmetav0";

soroban_env_macros::generate_env_meta_consts!(
ledger_protocol_version: 20,
pre_release_version: 40,
pre_release_version: 41,
);

pub fn get_ledger_protocol_version(interface_version: u64) -> u32 {
Expand Down
Loading