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

Dual staking #44

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
225c3ef
chore: dual staking token
jmoreira-valory Mar 5, 2025
c5e4667
[no ci] chore: update
jmoreira-valory Mar 5, 2025
1459ced
chore: update
jmoreira-valory Mar 6, 2025
0cf542f
[no ci] chore: update
jmoreira-valory Mar 6, 2025
451b3f5
[no ci] chore: update
jmoreira-valory Mar 6, 2025
235dcc2
chore: update
jmoreira-valory Mar 6, 2025
1eafff1
chore: add contract
jmoreira-valory Mar 6, 2025
54aebe8
fix: staking flow
jmoreira-valory Mar 6, 2025
a69aa86
fix: linters
jmoreira-valory Mar 6, 2025
6f81fde
[no ci] chore: update
jmoreira-valory Mar 10, 2025
d60c42e
chore: revert cli.py
jmoreira-valory Mar 10, 2025
0e068b2
chore: update refill requirements
jmoreira-valory Mar 10, 2025
7d25ee2
chore: refactor variables
jmoreira-valory Mar 10, 2025
799f309
chore: minor updates
jmoreira-valory Mar 10, 2025
a08958b
chore: remove test contract
jmoreira-valory Mar 10, 2025
7972fab
chore: update
jmoreira-valory Mar 10, 2025
096ba9a
fix: linters
jmoreira-valory Mar 10, 2025
469c596
Merge remote-tracking branch 'origin/HEAD' into feat/dual_staking
jmoreira-valory Mar 11, 2025
addd866
fix: manage.py
jmoreira-valory Mar 11, 2025
500fdba
chore: add missing file
jmoreira-valory Mar 11, 2025
0d20b8a
fix: output value
jmoreira-valory Mar 11, 2025
a39666c
fix: refill algorithm
jmoreira-valory Mar 12, 2025
2e77b1d
chore: fix tests
jmoreira-valory Mar 12, 2025
b41fc98
chore: improve readability
jmoreira-valory Mar 12, 2025
50d0c11
chore: doc
jmoreira-valory Mar 12, 2025
aeac99c
fix: catch general exception instead of contractlogicerror
jmoreira-valory Mar 12, 2025
7494bce
chore: add cache for staking params
jmoreira-valory Mar 12, 2025
e061edc
fix: linters
jmoreira-valory Mar 12, 2025
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
17 changes: 13 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ The refill requirements are computed based on the fund requirements present on t

```json
{
"allow_start_agent": true,
"balances": {
"gnosis": {
"0x364fD50CB11B2fbc39706D4649f29508A7685538": {
Expand All @@ -852,9 +853,13 @@ The refill requirements are computed based on the fund requirements present on t
}
}
},
"bonded_olas": {
"gnosis": 40000000000000000000
"bonded_assets": {
"gnosis": {
"0x0000000000000000000000000000000000000000": 2,
"0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f": 40000000000000000000
}
},
"is_refill_required": false,
"refill_requirements": {
"gnosis": {
"0x28580196F52DB3C95C3d40Df88426e251d115842": {
Expand All @@ -867,8 +872,12 @@ The refill requirements are computed based on the fund requirements present on t
}
}
},
"is_refill_required": false,
"allow_start_agent": true
"service_asset_requirements": {
"gnosis": {
"0x0000000000000000000000000000000000000000": 2,
"0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f": 40000000000000000000
}
},
}
```

Expand Down
1 change: 1 addition & 0 deletions operate/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ This directory contains packages that are used in the middleware.
- `contracts/mech_activity` is copied from [valory/trader](https://github.com/valory-xyz/trader/tree/main/packages/valory/contracts/mech_activity)
- `contracts/uniswap_v2_erc20` is copied from [valory/optimus-quickstart](https://github.com/valory-xyz/optimus-quickstart/tree/main/operate/data/contracts/uniswap_v2_erc20)
- `contracts/requester_activity_checker` is new from this repository.
- `contracts/dual_staking_token` is new from this repository.

TODO: Have a better way to import and reuse packages in the middleware.
20 changes: 20 additions & 0 deletions operate/data/contracts/dual_staking_token/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2025 Valory AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ------------------------------------------------------------------------------

"""This module contains the support resources for the dual staking contract."""
Loading