Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -16,6 +16,6 @@ jobs:
uses: multiversx/mx-sc-actions/.github/workflows/[email protected]
with:
rust-toolchain: stable
mx-scenario-go-version: v3.0.0
mx-scenario-go-version: v5.0.0
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 12 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,39 @@

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

## [0.5.8]
- upgraded to elrond-wasm 0.23.1
## [0.5.9] - 2025-08-11
- Governance `delegateVote` & `getVotingPower`, adapted from the old `v0.5.8` sources, using elrond-wasm 0.29.2.

## [0.5.8] - 2022-03-01
- upgraded to elrond-wasm 0.29.2
- `unStakeTokens`/`unBondTokens` endpoints

## [0.5.7]
## [0.5.7] - 2021-06-23
- `dnsRegister` via the DNS module
- `forceUnStakeNodesCallback` - which corrects a callback that ran out of gas on the mainnet
- Dust cleanup functionality, to get rid of small stakes.

## [0.5.6]
## [0.5.6] - 2021-04-27
- call unBondNodes in the protocol, which unbonds the nodes without the tokens

## [0.5.5]
## [0.5.5] - 2021-04-11
- unbond doesn't run out of gas, it simply interrupts its execution

## [0.5.4]
## [0.5.4] - 2021-03-20
- Ability to unstake nodes without unstaking the tokens
- setNumBlocksBeforeUnBond renamed (capital "B") for consistency

## [0.5.3]
## [0.5.3] - 2021-01-14
- getFullActiveList fix
- fixed missing user mappings from genesis

## [0.5.2]
## [0.5.2] - 2021-01-13
- getFullActiveList implementation
- bls signature 48 bytes
- elrond-wasm 0.9.7
- bytecode size improvement

## [0.5.1]
## [0.5.1] - 2020-10-14
- lift unBondNodes block nonce restriction

## [0.5.0]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ members = [
"latest",
"latest/meta",

"interact",
"interactor",
]
4 changes: 2 additions & 2 deletions auction-mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ edition = "2021"
path = "../node-storage"

[dependencies.multiversx-sc]
version = "=0.58.0"
version = "=0.60.0"
features = ["alloc"]

[dev-dependencies.multiversx-sc-scenario]
version = "=0.58.0"
version = "=0.60.0"
2 changes: 1 addition & 1 deletion auction-mock/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ publish = false
path = ".."

[dependencies.multiversx-sc-meta-lib]
version = "=0.58.0"
version = "=0.60.0"
default-features = false
13 changes: 7 additions & 6 deletions auction-mock/output/auction-mock.abi.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"buildInfo": {
"rustc": {
"version": "1.87.0",
"commitHash": "17067e9ac6d7ecb70e50f92c1944e545188d2359",
"commitDate": "2025-05-09",
"version": "1.89.0",
"commitHash": "29483883eed69d5fb4db01964cdf2af4d86e9cb2",
"commitDate": "2025-08-04",
"channel": "Stable",
"short": "rustc 1.87.0 (17067e9ac 2025-05-09)"
"short": "rustc 1.89.0 (29483883e 2025-08-04)"
},
"contractCrate": {
"name": "auction-mock",
"version": "0.3.4"
"version": "0.3.4",
"gitVersion": "v0.5.8-121-g7896fa8"
},
"framework": {
"name": "multiversx-sc",
"version": "0.58.0"
"version": "0.60.0"
}
},
"name": "AuctionMock",
Expand Down
3 changes: 3 additions & 0 deletions auction-mock/output/auction-mock.imports.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"mBufferCopyByteSlice",
"mBufferEq",
"mBufferFinish",
"mBufferFromSmallIntUnsigned",
"mBufferGetArgument",
"mBufferGetByteSlice",
"mBufferGetBytes",
Expand All @@ -21,7 +22,9 @@
"mBufferStorageLoad",
"mBufferStorageStore",
"mBufferToBigIntUnsigned",
"mBufferToSmallIntUnsigned",
"managedCaller",
"managedGetAllTransfersCallValue",
"managedGetMultiESDTCallValue",
"managedSignalError",
"managedTransferValueExecute",
Expand Down
19 changes: 11 additions & 8 deletions auction-mock/output/auction-mock.mxsc.json

Large diffs are not rendered by default.

Binary file modified auction-mock/output/auction-mock.wasm
Binary file not shown.
24 changes: 12 additions & 12 deletions auction-mock/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 auction-mock/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.58.0"
version = "=0.60.0"

[workspace]
members = ["."]
2 changes: 0 additions & 2 deletions interact/config.toml

This file was deleted.

File renamed without changes.
7 changes: 4 additions & 3 deletions interact/Cargo.toml → interactor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[bin]]
name = "basic-interact"
path = "src/deleg_interact.rs"
path = "src/deleg_interactor.rs"

[package]
name = "delegation-interact"
Expand All @@ -9,6 +9,7 @@ edition = "2021"
publish = false

[dependencies]
hex = "0.4.3"
toml = "0.8.6"

[dependencies.clap]
Expand All @@ -20,10 +21,10 @@ version = "1.0"
features = ["derive"]

[dependencies.multiversx-sc]
version = "=0.58.0"
version = "=0.60.0"

[dependencies.multiversx-sc-snippets]
version = "=0.58.0"
version = "=0.60.0"

[dependencies.node-storage]
path = "../node-storage"
Expand Down
16 changes: 16 additions & 0 deletions interactor/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

chain_type = 'real'
gateway = 'https://gateway.multiversx.com'
sc_address = "erd1qqqqqqqqqqqqqpgqxwakt2g7u9atsnr03gqcgmhcv38pt7mkd94q6shuwt"

# chain_type = 'real'
# gateway = 'https://devnet-gateway.multiversx.com'
# sc_address = "erd1qqqqqqqqqqqqqpgq97wezxw6l7lgg7k9rxvycrz66vn92ksh2tssxwf7ep"

# chain_type = 'real'
# gateway = 'https://testnet-gateway.multiversx.com'
# sc_address = "erd1qqqqqqqqqqqqqpgq97wezxw6l7lgg7k9rxvycrz66vn92ksh2tssxwf7ep"

# chain_type = 'simulator'
# gateway = 'http://localhost:8085'
# sc_address = "erd1qqqqqqqqqqqqqpgqxwakt2g7u9atsnr03gqcgmhcv38pt7mkd94q6shuwt"
75 changes: 75 additions & 0 deletions interactor/src/deleg_interactor.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
mod deleg_interactor_admin;
mod deleg_interactor_cli;
mod deleg_interactor_config;
mod deleg_interactor_stats;
mod deleg_interactor_user;
mod latest_proxy;

use clap::Parser;
use deleg_interactor_cli::{InteractCli, InteractCliCommand};
use deleg_interactor_config::Config;

use multiversx_sc_snippets::imports::*;

#[tokio::main]
async fn main() {
env_logger::init();

let mut basic_interact = LegacyDelegationInteractor::init().await;

let cli = InteractCli::parse();
match &cli.command.expect("interactor command expected") {
InteractCliCommand::Version => {
basic_interact.version().await;
}
InteractCliCommand::Global => {
basic_interact.query_global().await;
}
InteractCliCommand::UserFull => {
basic_interact.query_all_user_stake_by_type().await;
}
InteractCliCommand::NumUsers => basic_interact.query_num_users().await,
InteractCliCommand::UserStake(args) => {
let address = Bech32Address::from_bech32_string(args.address.clone());
basic_interact.query_user_stake_by_type(&address).await;
}
InteractCliCommand::Stake => {
basic_interact.stake_endpoint().await;
}
InteractCliCommand::Unstake => {
basic_interact.unstake_endpoint().await;
}
InteractCliCommand::Claim => {
basic_interact.claim_rewards().await;
}
InteractCliCommand::Vote => {
basic_interact.delegate_vote().await;
}
InteractCliCommand::Upgrade => {
basic_interact.upgrade_contract_to_latest().await;
}
InteractCliCommand::FixUsers => {
basic_interact.fix_users().await;
}
InteractCliCommand::ModifyCap => {
basic_interact.modify_delegation_cap().await;
}
}
}

#[allow(unused)]
struct LegacyDelegationInteractor {
interactor: Interactor,
config: Config,
}

impl LegacyDelegationInteractor {
async fn init() -> Self {
let config = Config::load_config();
let interactor = Interactor::new(config.gateway())
.await
.use_chain_simulator(config.is_chain_simulator());

Self { interactor, config }
}
}
Loading
Loading