diff --git a/Cargo.toml b/Cargo.toml index a213f7b105..a85dd23012 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,10 +29,10 @@ members = [ "contracts/benchmarks/send-tx-repeat", "contracts/benchmarks/send-tx-repeat/meta", - "contracts/core/egld-esdt-swap", - "contracts/core/egld-esdt-swap/meta", "contracts/core/price-aggregator", "contracts/core/price-aggregator/meta", + "contracts/core/wegld-swap", + "contracts/core/wegld-swap/meta", "contracts/examples/adder", "contracts/examples/adder/meta", diff --git a/contracts/core/egld-esdt-swap/Cargo.toml b/contracts/core/egld-esdt-swap/Cargo.toml deleted file mode 100644 index d1831cd0a1..0000000000 --- a/contracts/core/egld-esdt-swap/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "egld-esdt-swap" -version = "0.0.0" -authors = [ "Dorin Iancu ",] -edition = "2018" -publish = false - -[lib] -path = "src/swap.rs" - -[dependencies.elrond-wasm] -version = "0.34.0" -path = "../../../elrond-wasm" - -[dependencies.elrond-wasm-modules] -version = "0.34.0" -path = "../../../elrond-wasm-modules" - -[dev-dependencies.elrond-wasm-debug] -version = "0.34.0" -path = "../../../elrond-wasm-debug" diff --git a/contracts/core/egld-esdt-swap/meta/src/main.rs b/contracts/core/egld-esdt-swap/meta/src/main.rs deleted file mode 100644 index 81ad6ed619..0000000000 --- a/contracts/core/egld-esdt-swap/meta/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - elrond_wasm_debug::meta::perform::(); -} diff --git a/contracts/core/price-aggregator/Cargo.toml b/contracts/core/price-aggregator/Cargo.toml index 76272919d2..cfce52098a 100644 --- a/contracts/core/price-aggregator/Cargo.toml +++ b/contracts/core/price-aggregator/Cargo.toml @@ -1,8 +1,10 @@ [package] name = "elrond-sc-price-aggregator" version = "0.34.1" - -authors = ["Claudiu-Marcel Bruda ", "Elrond Network "] +authors = [ + "Claudiu-Marcel Bruda ", + "Elrond Network ", +] license = "GPL-3.0-only" readme = "README.md" repository = "https://github.com/ElrondNetwork/elrond-wasm-rs" diff --git a/contracts/core/egld-esdt-swap/.gitignore b/contracts/core/wegld-swap/.gitignore similarity index 100% rename from contracts/core/egld-esdt-swap/.gitignore rename to contracts/core/wegld-swap/.gitignore diff --git a/contracts/core/wegld-swap/Cargo.toml b/contracts/core/wegld-swap/Cargo.toml new file mode 100644 index 0000000000..5c80be6c7f --- /dev/null +++ b/contracts/core/wegld-swap/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "elrond-sc-wegld-swap" +version = "0.34.1" + +authors = [ + "Dorin Iancu ", + "Elrond Network ", +] +license = "GPL-3.0-only" +readme = "README.md" +repository = "https://github.com/ElrondNetwork/elrond-wasm-rs" +homepage = "https://elrond.com/" +documentation = "https://docs.elrond.com/" +description = "Elrond Price aggregator Smart Contract" +keywords = ["elrond", "wasm", "webassembly", "blockchain", "contract"] +categories = ["no-std", "wasm", "cryptography::cryptocurrencies"] +edition = "2018" + +[lib] +path = "src/wegld.rs" + +[dependencies.elrond-wasm] +version = "0.34.1" +path = "../../../elrond-wasm" + +[dependencies.elrond-wasm-modules] +version = "0.34.1" +path = "../../../elrond-wasm-modules" + +[dev-dependencies.elrond-wasm-debug] +version = "0.34.1" +path = "../../../elrond-wasm-debug" diff --git a/contracts/core/wegld-swap/README.md b/contracts/core/wegld-swap/README.md new file mode 100644 index 0000000000..49ea35ad0a --- /dev/null +++ b/contracts/core/wegld-swap/README.md @@ -0,0 +1,7 @@ +# EGLD-WEGLD swap + +## Overview + +The EGLD-WEGLD swap contract mints and distributes the WEGLD token, in equal amount to the amount of EGLD locked in the contract. + +There are such contracts deployed in each shard. diff --git a/contracts/core/egld-esdt-swap/elrond.json b/contracts/core/wegld-swap/elrond.json similarity index 100% rename from contracts/core/egld-esdt-swap/elrond.json rename to contracts/core/wegld-swap/elrond.json diff --git a/contracts/core/egld-esdt-swap/interaction/snippets.sh b/contracts/core/wegld-swap/interaction/snippets.sh similarity index 100% rename from contracts/core/egld-esdt-swap/interaction/snippets.sh rename to contracts/core/wegld-swap/interaction/snippets.sh diff --git a/contracts/core/egld-esdt-swap/mandos/unwrap_egld.scen.json b/contracts/core/wegld-swap/mandos/unwrap_egld.scen.json similarity index 96% rename from contracts/core/egld-esdt-swap/mandos/unwrap_egld.scen.json rename to contracts/core/wegld-swap/mandos/unwrap_egld.scen.json index 81a337e374..7717275334 100644 --- a/contracts/core/egld-esdt-swap/mandos/unwrap_egld.scen.json +++ b/contracts/core/wegld-swap/mandos/unwrap_egld.scen.json @@ -55,7 +55,7 @@ "storage": { "str:wrappedEgldTokenId": "str:EGLD-abcdef" }, - "code": "file:../output/egld-esdt-swap.wasm" + "code": "file:../output/elrond-sc-wegld-swap.wasm" } } } diff --git a/contracts/core/egld-esdt-swap/mandos/wrap_egld.scen.json b/contracts/core/wegld-swap/mandos/wrap_egld.scen.json similarity index 94% rename from contracts/core/egld-esdt-swap/mandos/wrap_egld.scen.json rename to contracts/core/wegld-swap/mandos/wrap_egld.scen.json index 34790289b9..109a9416bb 100644 --- a/contracts/core/egld-esdt-swap/mandos/wrap_egld.scen.json +++ b/contracts/core/wegld-swap/mandos/wrap_egld.scen.json @@ -25,7 +25,7 @@ "storage": { "str:wrappedEgldTokenId": "str:EGLD-abcdef" }, - "code": "file:../output/egld-esdt-swap.wasm" + "code": "file:../output/elrond-sc-wegld-swap.wasm" } } }, @@ -77,7 +77,7 @@ "storage": { "str:wrappedEgldTokenId": "str:EGLD-abcdef" }, - "code": "file:../output/egld-esdt-swap.wasm" + "code": "file:../output/elrond-sc-wegld-swap.wasm" } } } diff --git a/contracts/core/egld-esdt-swap/meta/Cargo.toml b/contracts/core/wegld-swap/meta/Cargo.toml similarity index 72% rename from contracts/core/egld-esdt-swap/meta/Cargo.toml rename to contracts/core/wegld-swap/meta/Cargo.toml index 396c896d69..3d62dd9144 100644 --- a/contracts/core/egld-esdt-swap/meta/Cargo.toml +++ b/contracts/core/wegld-swap/meta/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "egld-esdt-swap-meta" +name = "elrond-sc-wegld-swap-meta" version = "0.0.0" authors = [ "Dorin Iancu ",] edition = "2018" @@ -7,13 +7,13 @@ publish = false [dev-dependencies] -[dependencies.egld-esdt-swap] +[dependencies.elrond-sc-wegld-swap] path = ".." [dependencies.elrond-wasm] -version = "0.34.0" +version = "0.34.1" path = "../../../../elrond-wasm" [dependencies.elrond-wasm-debug] -version = "0.34.0" +version = "0.34.1" path = "../../../../elrond-wasm-debug" diff --git a/contracts/core/wegld-swap/meta/src/main.rs b/contracts/core/wegld-swap/meta/src/main.rs new file mode 100644 index 0000000000..d4280759dc --- /dev/null +++ b/contracts/core/wegld-swap/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + elrond_wasm_debug::meta::perform::(); +} diff --git a/contracts/core/egld-esdt-swap/src/swap.rs b/contracts/core/wegld-swap/src/wegld.rs similarity index 100% rename from contracts/core/egld-esdt-swap/src/swap.rs rename to contracts/core/wegld-swap/src/wegld.rs diff --git a/contracts/core/egld-esdt-swap/testnet.toml b/contracts/core/wegld-swap/testnet.toml similarity index 100% rename from contracts/core/egld-esdt-swap/testnet.toml rename to contracts/core/wegld-swap/testnet.toml diff --git a/contracts/core/egld-esdt-swap/tests/mandos_go_test.rs b/contracts/core/wegld-swap/tests/mandos_go_test.rs similarity index 100% rename from contracts/core/egld-esdt-swap/tests/mandos_go_test.rs rename to contracts/core/wegld-swap/tests/mandos_go_test.rs diff --git a/contracts/core/egld-esdt-swap/wasm/Cargo.toml b/contracts/core/wegld-swap/wasm/Cargo.toml similarity index 81% rename from contracts/core/egld-esdt-swap/wasm/Cargo.toml rename to contracts/core/wegld-swap/wasm/Cargo.toml index 26feac9fea..b2eda99def 100644 --- a/contracts/core/egld-esdt-swap/wasm/Cargo.toml +++ b/contracts/core/wegld-swap/wasm/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "egld-esdt-swap-wasm" +name = "elrond-sc-wegld-swap-wasm" version = "0.0.0" authors = [ "Dorin Iancu ",] edition = "2018" @@ -20,14 +20,14 @@ lto = true debug = false panic = "abort" -[dependencies.egld-esdt-swap] +[dependencies.elrond-sc-wegld-swap] path = ".." [dependencies.elrond-wasm-node] -version = "0.34.0" +version = "0.34.1" path = "../../../../elrond-wasm-node" [dependencies.elrond-wasm-output] -version = "0.34.0" +version = "0.34.1" path = "../../../../elrond-wasm-output" features = ["wasm-output-mode"] diff --git a/contracts/core/egld-esdt-swap/wasm/src/lib.rs b/contracts/core/wegld-swap/wasm/src/lib.rs similarity index 94% rename from contracts/core/egld-esdt-swap/wasm/src/lib.rs rename to contracts/core/wegld-swap/wasm/src/lib.rs index ce144a6b42..d324a1e76e 100644 --- a/contracts/core/egld-esdt-swap/wasm/src/lib.rs +++ b/contracts/core/wegld-swap/wasm/src/lib.rs @@ -5,7 +5,7 @@ #![no_std] elrond_wasm_node::wasm_endpoints! { - egld_esdt_swap + elrond_sc_wegld_swap ( getLockedEgldBalance getWrappedEgldTokenId