Skip to content
Draft
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: 2 additions & 0 deletions proto/farms.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ message Farm {
string optimalEnergyPerLp = 38;
string boostedRewardsPerWeek = 39;
Pair pair = 40;
string perSecondRewards = 41;
uint32 lastRewardTimestamp = 42;
}
6 changes: 3 additions & 3 deletions proto/staking_farms.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ message StakingFarm {
string baseApr = 15;
string maxBoostedApr = 16;
uint32 minUnboundEpochs = 17;
string perBlockRewards = 18;
uint32 lastRewardBlockNonce = 19;
string rewardsPerBlockAPRBound = 20;
string perSecondRewards = 18;
uint32 lastRewardTimestamp = 19;
string rewardsPerSecondAPRBound = 20;
bool isProducingRewards = 21;
uint32 rewardsRemainingDays = 22;
uint32 rewardsRemainingDaysUncapped = 23;
Expand Down
130 changes: 78 additions & 52 deletions src/abis/farm-staking.abi.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"buildInfo": {
"rustc": {
"version": "1.80.0-nightly",
"commitHash": "84b40fc908c3adc7e0e470b3fbaa264df0e122b8",
"commitDate": "2024-05-27",
"channel": "Nightly",
"short": "rustc 1.80.0-nightly (84b40fc90 2024-05-27)"
},
"contractCrate": {
"name": "farm-staking",
"version": "0.0.0",
"gitVersion": "v1.6.0-1831-g81b6253f"
"gitVersion": "v1.6.0-2122-g457d1532"
},
"framework": {
"name": "multiversx-sc",
"version": "0.50.5"
"version": "0.64.1"
}
},
"name": "FarmStaking",
Expand Down Expand Up @@ -129,11 +122,11 @@
"outputs": []
},
{
"name": "setPerBlockRewardAmount",
"name": "setPerSecondRewardAmount",
"mutability": "mutable",
"inputs": [
{
"name": "per_block_amount",
"name": "per_second_amount",
"type": "BigUint"
}
],
Expand Down Expand Up @@ -227,17 +220,6 @@
}
]
},
{
"name": "setAllowExternalClaimBoostedRewards",
"mutability": "mutable",
"inputs": [
{
"name": "allow_external_claim",
"type": "bool"
}
],
"outputs": []
},
{
"name": "getFarmingTokenId",
"mutability": "readonly",
Expand All @@ -259,7 +241,7 @@
]
},
{
"name": "getPerBlockRewardAmount",
"name": "getPerSecondRewardAmount",
"mutability": "readonly",
"inputs": [],
"outputs": [
Expand All @@ -269,7 +251,7 @@
]
},
{
"name": "getLastRewardBlockNonce",
"name": "getLastRewardTimestamp",
"mutability": "readonly",
"inputs": [],
"outputs": [
Expand Down Expand Up @@ -504,6 +486,18 @@
}
]
},
{
"name": "setPermissionsHubAddress",
"onlyOwner": true,
"mutability": "mutable",
"inputs": [
{
"name": "address",
"type": "Address"
}
],
"outputs": []
},
{
"name": "setBurnRoleForAddress",
"onlyOwner": true,
Expand Down Expand Up @@ -680,69 +674,70 @@
]
},
{
"name": "claimBoostedRewards",
"name": "stakeFarmOnBehalf",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "opt_user",
"type": "optional<Address>",
"multi_arg": true
"name": "user",
"type": "Address"
}
],
"outputs": [
{
"type": "EsdtTokenPayment"
},
{
"type": "EsdtTokenPayment"
}
]
},
{
"name": "collectUndistributedBoostedRewards",
"name": "claimRewardsOnBehalf",
"mutability": "mutable",
"inputs": [],
"outputs": []
},
{
"name": "getBoostedYieldsRewardsPercentage",
"mutability": "readonly",
"payableInTokens": [
"*"
],
"inputs": [],
"outputs": [
{
"type": "u64"
"type": "EsdtTokenPayment"
},
{
"type": "EsdtTokenPayment"
}
]
},
{
"name": "getAccumulatedRewardsForWeek",
"mutability": "readonly",
"name": "claimBoostedRewards",
"mutability": "mutable",
"inputs": [
{
"name": "week",
"type": "u32"
"name": "opt_user",
"type": "optional<Address>",
"multi_arg": true
}
],
"outputs": [
{
"type": "BigUint"
"type": "EsdtTokenPayment"
}
]
},
{
"name": "getFarmSupplyForWeek",
"name": "getBoostedYieldsRewardsPercentage",
"mutability": "readonly",
"inputs": [
{
"name": "week",
"type": "u32"
}
],
"inputs": [],
"outputs": [
{
"type": "BigUint"
"type": "u64"
}
]
},
{
"name": "getRemainingBoostedRewardsToDistribute",
"name": "getAccumulatedRewardsForWeek",
"mutability": "readonly",
"inputs": [
{
Expand All @@ -757,9 +752,14 @@
]
},
{
"name": "getUndistributedBoostedRewards",
"name": "getFarmSupplyForWeek",
"mutability": "readonly",
"inputs": [],
"inputs": [
{
"name": "week",
"type": "u32"
}
],
"outputs": [
{
"type": "BigUint"
Expand Down Expand Up @@ -803,6 +803,32 @@
}
]
},
{
"name": "collectUndistributedBoostedRewards",
"onlyOwner": true,
"mutability": "mutable",
"inputs": [],
"outputs": [
{
"type": "BigUint"
}
]
},
{
"name": "getRemainingBoostedRewardsToDistribute",
"mutability": "readonly",
"inputs": [
{
"name": "week",
"type": "u32"
}
],
"outputs": [
{
"type": "BigUint"
}
]
},
{
"docs": [
"Week starts from 1"
Expand Down
Loading
Loading