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

Liquid staking sc #121

Draft
wants to merge 106 commits into
base: feat/beta
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
18379ff
Generated liquid-staking contract
andreiblt1304 Sep 2, 2024
cb2a96c
Renamed main file
andreiblt1304 Sep 12, 2024
3ba2a80
Added liquid staking sc to project cargo file
andreiblt1304 Sep 12, 2024
2b813a9
Added liquidity pools module + delegation sc address mapper
andreiblt1304 Sep 12, 2024
bf015a3
Added endpoints for stake and unstake
andreiblt1304 Sep 12, 2024
f846938
Merge branch 'feat/beta' into liquid-staking-sc
andreiblt1304 Sep 12, 2024
fbd0371
Upgrade liquid staking to 0.53.0
andreiblt1304 Sep 12, 2024
da50c96
Removed imports
andreiblt1304 Sep 13, 2024
07e2fc1
Modified delegation storage and added endpoint to register
andreiblt1304 Sep 13, 2024
ddd8558
Modified storage to use a map instead of a set
andreiblt1304 Sep 13, 2024
4c87caf
Regenerated proxy
andreiblt1304 Sep 13, 2024
7273d97
Moved callbacks to be right under their endpoint
andreiblt1304 Sep 13, 2024
266eecd
Added consts for endpoint names
andreiblt1304 Sep 13, 2024
22a0b9a
Added check for delegation value to be > 0
andreiblt1304 Sep 13, 2024
1aa6adf
Added sc-config for proxy generation
andreiblt1304 Sep 15, 2024
76a83c3
Added import for proxy
andreiblt1304 Sep 15, 2024
9c171b7
Added test setup + 2 tests
andreiblt1304 Sep 15, 2024
5f25329
Merge pull request #124 from multiversx/liquid-staking-coverage
andreiblt1304 Sep 17, 2024
3c4f410
Fixed typo
andreiblt1304 Sep 17, 2024
8c3e29f
Added stake test
andreiblt1304 Sep 17, 2024
70bbba4
Renamed test file
andreiblt1304 Sep 18, 2024
dae3485
Used most recent unified syntax for raw calls
andreiblt1304 Sep 18, 2024
1119850
Added delegation mock contract
andreiblt1304 Sep 18, 2024
3b069bf
Renamed main file in delegation
andreiblt1304 Sep 18, 2024
cdc17be
Added mock code
andreiblt1304 Sep 18, 2024
9b62311
Added sc-config for proxy generation
andreiblt1304 Sep 18, 2024
1b8986e
Added generated files
andreiblt1304 Sep 18, 2024
0c94913
Added delegation proxy + deploy setup
andreiblt1304 Sep 18, 2024
7eb812b
Removed workspace from delegation
andreiblt1304 Sep 18, 2024
d55dc28
Added delegation to Cargo
andreiblt1304 Sep 18, 2024
bfa1edc
Modified deploy test
andreiblt1304 Sep 18, 2024
3be3909
Added balance to delegation address and removed deploy function
andreiblt1304 Sep 18, 2024
e95ce6b
Modified check account address
andreiblt1304 Sep 18, 2024
8f25026
Modified cargo toml to use its proxy in tests
andreiblt1304 Sep 18, 2024
4358578
Stake test progress
andreiblt1304 Sep 18, 2024
be080c7
fix whitebox test_stake
BiancaIalangi Sep 18, 2024
d1eeeb0
Added unstake test
andreiblt1304 Sep 18, 2024
bc5a881
Added endpoints for registering BLS keys and header verifier
andreiblt1304 Sep 18, 2024
0e16e32
Regenerated proxy
andreiblt1304 Sep 18, 2024
2931ae2
Removed use of constant
andreiblt1304 Sep 19, 2024
dc50c51
Removed unsued import
andreiblt1304 Sep 19, 2024
af31c22
Added function to check if contract is registered
andreiblt1304 Sep 19, 2024
027f1eb
Fixed setup bug
andreiblt1304 Sep 19, 2024
5f7a911
Built contracts
andreiblt1304 Sep 19, 2024
5ad2926
Removed ManagedArgBuffer
andreiblt1304 Sep 19, 2024
70137da
Added tests for unstake endpoint
andreiblt1304 Sep 19, 2024
6c65ed6
Added first iteration for claim rewards from delegation endpoint
andreiblt1304 Sep 19, 2024
bb01186
Added require for no delegated value
andreiblt1304 Sep 19, 2024
9ec5667
Regenerated proxy
andreiblt1304 Sep 19, 2024
1a4f479
Update test's expected error message
andreiblt1304 Sep 19, 2024
afe0c1a
Built contract
andreiblt1304 Sep 19, 2024
c6eb5fb
Added claim rewards from delegation test
andreiblt1304 Sep 19, 2024
7200eb3
Added check for delegated value in unstake scenario
andreiblt1304 Sep 23, 2024
1a8795a
Added slash endpoint
andreiblt1304 Sep 23, 2024
4f0265a
Added require to check if there is no address registered
andreiblt1304 Sep 23, 2024
ca7e5fe
Added tests for BLS registration + Mockup setup for HeaderVer
andreiblt1304 Sep 23, 2024
27ddb0c
Added require to check bls-address map if empty
andreiblt1304 Sep 23, 2024
6a30c57
Added test for slashing
andreiblt1304 Sep 23, 2024
e29f3e6
Renamed function
andreiblt1304 Sep 24, 2024
96f835b
Fixed slashing test
andreiblt1304 Sep 24, 2024
20f972a
Added slash test
andreiblt1304 Sep 24, 2024
8b1b7a9
Added 0 slash value test
andreiblt1304 Sep 24, 2024
3c2009d
Added slash more than delegated value scenario
andreiblt1304 Sep 24, 2024
5174a65
Modified endpoint to use validator address as well
andreiblt1304 Sep 24, 2024
03044b9
Added endpoint for sovereign chain funding
andreiblt1304 Sep 24, 2024
81ae496
Merge pull request #128 from multiversx/liquid-staking-coverage
andreiblt1304 Oct 2, 2024
8ec10a3
Removed uneeded reference
andreiblt1304 Oct 2, 2024
4382f04
Liquid Staking upgrade to 0.53.1
andreiblt1304 Oct 2, 2024
21138d7
Removed endpoint alias
andreiblt1304 Oct 4, 2024
a422a0f
Removed `Self::Api` for framwork types
andreiblt1304 Oct 4, 2024
1c93eb7
Added custom type for BlsKey
andreiblt1304 Oct 4, 2024
463b891
Added custom type for ChainId and used custom types where is needed
andreiblt1304 Oct 4, 2024
c71079c
Switched endpoint names from &str to &[u8]
andreiblt1304 Oct 4, 2024
e450715
Modified stake_callback storage mapper value modification
andreiblt1304 Oct 4, 2024
cc8cd5b
Added refund tx for error scenario
andreiblt1304 Oct 4, 2024
ebef8ba
Removed require
andreiblt1304 Oct 4, 2024
d8182d7
Removed setting of the epoch
andreiblt1304 Oct 4, 2024
e46ef59
Removed the unused parameter of the callback
andreiblt1304 Oct 4, 2024
3b12775
Removed unused variable
andreiblt1304 Oct 4, 2024
cb6c1eb
De-nesting
andreiblt1304 Oct 4, 2024
489cc4b
Added register_promise instead of old async call
andreiblt1304 Oct 4, 2024
c673fe5
Removed match operator
andreiblt1304 Oct 4, 2024
64666a4
Storage require functions renames
andreiblt1304 Oct 4, 2024
ad84e15
Optimization to not reuse mapper
andreiblt1304 Oct 4, 2024
bdcd2cc
Added TODO
andreiblt1304 Oct 4, 2024
b8ee176
Created mapper before the for loop
andreiblt1304 Oct 4, 2024
7fdf10f
Moved upgrade endpoint next to init
andreiblt1304 Oct 4, 2024
42523de
Regenerated proxy
andreiblt1304 Oct 4, 2024
4d6d794
Modified expected error message
andreiblt1304 Oct 4, 2024
4a89013
Removed unnecessary let
andreiblt1304 Oct 4, 2024
f859ff9
Removed unused import
andreiblt1304 Oct 4, 2024
f1c676c
Reverted endpoint annotation
andreiblt1304 Oct 4, 2024
05ca4a3
Regenerated proxy
andreiblt1304 Oct 4, 2024
23b7c8f
Integrated AddressToId mapper
andreiblt1304 Oct 4, 2024
cf183b1
Adapted tests for for AddressToId implementation
andreiblt1304 Oct 4, 2024
4e7d7d6
Added proxy call for delegation
andreiblt1304 Oct 4, 2024
33a144e
Added proxy calls for other endpoints
andreiblt1304 Oct 4, 2024
4e2a6d6
Update actions.yml contracts v3.3.1
mradian1 Oct 4, 2024
07ffa05
Merge pull request #135 from multiversx/update-github-actions-v3.3.1
mradian1 Oct 4, 2024
7032b95
Merge pull request #132 from multiversx/ls-fw-upgrade
andreiblt1304 Oct 8, 2024
22d4a4e
Added promises
andreiblt1304 Oct 8, 2024
c45c4b4
Merge branch 'liquid-staking-sc' into ls-fixes
andreiblt1304 Oct 8, 2024
216de6e
Added correct annotation for promise callbacks
andreiblt1304 Oct 9, 2024
36f041b
Added use of `self.callbacks()`
andreiblt1304 Oct 9, 2024
588fa7f
Merge pull request #134 from multiversx/ls-fixes
andreiblt1304 Oct 9, 2024
a0874cf
Merge branch 'main' into liquid-staking-sc
andreiblt1304 Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:
jobs:
contracts:
name: Contracts
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.2.0
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.3.1
with:
rust-toolchain: stable
coverage-args: --ignore-filename-regex='/.cargo/git' --output ./coverage.md
Expand Down
55 changes: 45 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ members = [
"header-verifier",
"header-verifier/meta",
"enshrine-esdt-safe",
"enshrine-esdt-safe/meta"
"enshrine-esdt-safe/meta",
"liquid-staking",
"liquid-staking/meta",
"delegation-mock",
"delegation-mock/meta",
]
6 changes: 3 additions & 3 deletions chain-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ path = "src/lib.rs"
num-bigint = "0.4.2"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dependencies.multiversx-sc-modules]
version = "=0.53.0"
version = "=0.53.1"
2 changes: 1 addition & 1 deletion chain-config/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ authors = ["you"]
path = ".."

[dependencies.multiversx-sc-meta-lib]
version = "=0.53.0"
version = "=0.53.1"
16 changes: 8 additions & 8 deletions chain-config/wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chain-config/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ panic = "abort"
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "=0.53.0"
version = "=0.53.1"

[workspace]
members = ["."]
4 changes: 2 additions & 2 deletions chain-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ path = "src/lib.rs"
num-bigint = "0.4.2"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dependencies.utils]
path = "../common/utils"
Expand Down
2 changes: 1 addition & 1 deletion chain-factory/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ authors = ["you"]
path = ".."

[dependencies.multiversx-sc-meta-lib]
version = "=0.53.0"
version = "=0.53.1"
16 changes: 8 additions & 8 deletions chain-factory/wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chain-factory/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ panic = "abort"
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "=0.53.0"
version = "=0.53.1"

[workspace]
members = ["."]
4 changes: 2 additions & 2 deletions common/bls-signature/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dependencies.transaction]
path = "../transaction"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"
4 changes: 2 additions & 2 deletions common/max-bridged-amount-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"
4 changes: 2 additions & 2 deletions common/setup-phase/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"
4 changes: 2 additions & 2 deletions common/token-whitelist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "../setup-phase"
path = "../utils"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"
2 changes: 1 addition & 1 deletion common/transaction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"
4 changes: 2 additions & 2 deletions common/tx-batch-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"

[dependencies.transaction]
path = "../transaction"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.0"
version = "=0.53.1"
2 changes: 1 addition & 1 deletion common/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ path = "src/lib.rs"
path = "../bls-signature"

[dependencies.multiversx-sc]
version = "=0.53.0"
version = "=0.53.1"
features = ["esdt-token-payment-legacy-decode"]
Loading
Loading