Skip to content

Commit

Permalink
Merge pull request #230 from ElrondNetwork/publish-16
Browse files Browse the repository at this point in the history
Publish elrond-wasm 0.16.0, mandos 0.7.0, elrond-codec 0.5.3
  • Loading branch information
andrei-marinica authored May 14, 2021
2 parents af61bd5 + 313d33c commit 98eb701
Show file tree
Hide file tree
Showing 129 changed files with 349 additions and 328 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ There are several crates in this repo, this changelog will keep track of all of

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.


## [elrond-wasm 0.16.0, mandos 0.7.0, elrond-codec 0.5.3] - 2021-05-14
### Major redesign of important framework components:
- The arguments to contract/module/proxy annotations are gone. All items are generated in the same Rust module. Both submodule inclusion and contract calls are now Rust-module-aware.
- Submodule imports are now expressed as supertraits instead of the module getter annotated methods. Note: explicitly specifying the Rust module is required, in order for the framework to fetch generated types and functions from that module.
- Each contract now generates its own callable proxy to ease calling it. Caller contracts do no longer need to define a call interface, they can import it from the crate of the contract they want to call. Callable proxies contain the methods from the main contract, as well as from all the modules. Note: calling a contract requires the caller to specify the Rust module where it resides.
- We no longer have a separate syntax/parser/code generation for call proxies. They are just contracts with no implementations and annotated with `#[elrond_wasm_derive::proxy]` instead of `#[elrond_wasm_derive::contract]`.
- BigUint and BigInt are now associated types instead of generics in all API traits. Contracts need to specify them as `Self::BigUint` instead of just `BigUint`. Although more verbose, this might be more intuitive for the developer.
- `ContractCall`s, `AsyncCall`s and all other call & transfer result types now contain a reference to the Send API. This also means the `execute_on_dest_context` method no longer requires an api argument.
- `execute_on_dest_context` can now deserialize the call results automatically and provide them to the calling contract. There is a mechanism in place to deconstruct non-serialized types, e.g. `SCResult<T>` becomes `T` and `AsyncCall<Self::BigUint>` becomes `()`.
- Callbacks and callback proxies needed to be adapted to the new system, but work similar to how they did in the past.
- Contracts can define proxy getter methods using the `#[proxy]` annotation.
- Callbacks can now have names, just like endpoints. This name gets saved in the callback closure in storage, but has no other impact on the contract. The reason I needed it was to help me with defining callback forwarders and avoiding some name collisions there. Callback forwarders are still needed for a little longer, until module callbacks are properly implemented.

### New math hooks exposed from Arwen:
- `pow`, `log2`, `sqrt`
- cryptography: elliptic curves

### Mandos
- mandos-rs syntax synchronized with mandos-go (`sc:` syntax, new ESDT call value syntax, _no NFTs yet_).

## [elrond-wasm 0.15.1] - 2021-04-30
- Mitigating nested sync calls with Send API `execute_on_dest_context_raw_custom_result_range`

Expand Down
8 changes: 4 additions & 4 deletions contracts/benchmarks/send-tx-repeat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ path = "src/lib.rs"
wasm-output-mode = ["elrond-wasm-node"]

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm"

[dependencies.elrond-wasm-derive]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-derive"

[dependencies.elrond-wasm-node]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-node"
optional = true

[dev-dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-debug"
2 changes: 1 addition & 1 deletion contracts/benchmarks/send-tx-repeat/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features = ["wasm-output-mode"]
default-features = false

[dependencies.elrond-wasm-output]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-output"
features = ["wasm-output-mode"]

Expand Down
8 changes: 4 additions & 4 deletions contracts/benchmarks/str-repeat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ path = "src/lib.rs"
wasm-output-mode = ["elrond-wasm-node"]

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm"

[dependencies.elrond-wasm-derive]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-derive"

[dependencies.elrond-wasm-node]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-node"
optional = true

[dev-dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-debug"
2 changes: 1 addition & 1 deletion contracts/benchmarks/str-repeat/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features = ["wasm-output-mode"]
default-features = false

[dependencies.elrond-wasm-output]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-output"
features = ["wasm-output-mode"]

Expand Down
8 changes: 4 additions & 4 deletions contracts/examples/adder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ path = "src/lib.rs"
wasm-output-mode = ["elrond-wasm-node"]

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm"

[dependencies.elrond-wasm-derive]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-derive"

[dependencies.elrond-wasm-node]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-node"
optional = true

[dev-dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-debug"
4 changes: 2 additions & 2 deletions contracts/examples/adder/abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ publish = false
path = ".."

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm"

[dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-debug"
2 changes: 1 addition & 1 deletion contracts/examples/adder/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features = ["wasm-output-mode"]
default-features = false

[dependencies.elrond-wasm-output]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-output"
features = ["wasm-output-mode"]

Expand Down
8 changes: 4 additions & 4 deletions contracts/examples/crowdfunding-erc20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ wasm-output-mode = ["elrond-wasm-node"]
path = "../erc20"

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm"

[dependencies.elrond-wasm-derive]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-derive"

[dependencies.elrond-wasm-node]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-node"
optional = true

[dev-dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-debug"

4 changes: 2 additions & 2 deletions contracts/examples/crowdfunding-erc20/abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ publish = false
path = ".."

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm"

[dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-debug"
2 changes: 1 addition & 1 deletion contracts/examples/crowdfunding-erc20/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features = ["wasm-output-mode"]
default-features = false

[dependencies.elrond-wasm-output]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-output"
features = ["wasm-output-mode"]

Expand Down
8 changes: 4 additions & 4 deletions contracts/examples/crowdfunding-esdt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ path = "src/lib.rs"
wasm-output-mode = ["elrond-wasm-node"]

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm"

[dependencies.elrond-wasm-derive]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-derive"

[dependencies.elrond-wasm-node]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-node"
optional = true

[dev-dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../elrond-wasm-debug"

4 changes: 2 additions & 2 deletions contracts/examples/crowdfunding-esdt/abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ publish = false
path = ".."

[dependencies.elrond-wasm]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm"

[dependencies.elrond-wasm-debug]
version = "0.15.1"
version = "0.16.0"
path = "../../../../elrond-wasm-debug"
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"txId": "fund-2",
"tx": {
"from": "address:donor2",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"esdt": {
"tokenIdentifier": "str:CrowdToken",
Expand Down Expand Up @@ -65,7 +65,7 @@
"str:CrowdToken": "800,000,000,000"
}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand Down Expand Up @@ -93,7 +93,7 @@
"txId": "claim-donor1",
"tx": {
"from": "address:donor1",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "claim",
"arguments": [],
Expand All @@ -111,7 +111,7 @@
"txId": "claim-donor2",
"tx": {
"from": "address:donor2",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "claim",
"arguments": [],
Expand Down Expand Up @@ -148,7 +148,7 @@
"str:CrowdToken": "1,000,000,000,000"
}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"txId": "fund-2",
"tx": {
"from": "address:donor2",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"esdt": {
"tokenIdentifier": "str:CrowdToken",
Expand Down Expand Up @@ -64,7 +64,7 @@
"str:CrowdToken": "750,000,000,000"
}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand Down Expand Up @@ -92,7 +92,7 @@
"txId": "claim-donor",
"tx": {
"from": "address:donor1",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "claim",
"arguments": [],
Expand All @@ -111,7 +111,7 @@
"txId": "claim-owner",
"tx": {
"from": "address:my_address",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "claim",
"arguments": [],
Expand Down Expand Up @@ -151,7 +151,7 @@
"str:CrowdToken": "750,000,000,000"
}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"txId": "claim-too-early-donor",
"tx": {
"from": "address:donor1",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "claim",
"arguments": [],
Expand All @@ -29,7 +29,7 @@
"txId": "claim-too-early-owner",
"tx": {
"from": "address:my_address",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "claim",
"arguments": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"txId": "fund-too-late",
"tx": {
"from": "address:donor1",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"esdt": {
"tokenIdentifier": "str:CrowdToken",
Expand Down Expand Up @@ -50,7 +50,7 @@
"str:CrowdToken": "150,000,000,000"
}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand All @@ -71,7 +71,7 @@
"txId": "check-status",
"tx": {
"from": "address:donor1",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"function": "status",
"arguments": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"txId": "fund-1",
"tx": {
"from": "address:donor1",
"to": "address:the_crowdfunding_contract",
"to": "sc:crowdfunding",
"value": "0",
"esdt": {
"tokenIdentifier": "str:CrowdToken",
Expand Down Expand Up @@ -56,7 +56,7 @@
"str:CrowdToken": "150,000,000,000"
}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"creatorAddress": "address:my_address",
"creatorNonce": "0",
"newAddress": "address:the_crowdfunding_contract"
"newAddress": "sc:crowdfunding"
}
]
},
Expand Down Expand Up @@ -47,7 +47,7 @@
"balance": "1,000,000",
"storage": {}
},
"address:the_crowdfunding_contract": {
"sc:crowdfunding": {
"nonce": "0",
"balance": "0",
"storage": {
Expand Down
Loading

0 comments on commit 98eb701

Please sign in to comment.