Skip to content

Commit 4c554e2

Browse files
committedMar 12, 2024
fix: horizon staking interface compilation errors
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
1 parent f4c82f9 commit 4c554e2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

‎packages/contracts/contracts/staking/IHorizonStaking.sol

+10-10
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ interface IHorizonStaking {
101101
) external;
102102

103103
// initiate a thawing to remove tokens from a provision
104-
function thaw(bytes32 provisionId, uint256 tokens) external returns (bytes32);
104+
function thaw(bytes32 provisionId, uint256 tokens) external returns (bytes32 thawRequestId);
105105

106106
// moves thawed stake from a provision back into the provider's available stake
107107
function deprovision(bytes32 thawRequestId) external;
@@ -119,8 +119,8 @@ interface IHorizonStaking {
119119
function undelegate(
120120
address serviceProvider,
121121
uint256 tokens,
122-
bytes32[] provisions
123-
) external returns (bytes32[]);
122+
bytes32[] calldata provisions
123+
) external returns (bytes32 thawRequestId);
124124

125125
// slash a service provider
126126
function slash(
@@ -130,28 +130,28 @@ interface IHorizonStaking {
130130
) external;
131131

132132
// set the Service Provider's preferred provisions to be force thawed
133-
function setForceThawProvisions(bytes32[] provisions);
133+
function setForceThawProvisions(bytes32[] calldata provisions) external;
134134

135135
// total staked tokens to the provider
136136
// `ServiceProvider.tokensStaked + DelegationPool.serviceProvider.tokens`
137-
function getStake(address serviceProvider) public view returns (uint256 tokens);
137+
function getStake(address serviceProvider) external view returns (uint256 tokens);
138138

139139
// staked tokens that are currently not provisioned, aka idle stake
140140
// `getStake(serviceProvider) - ServiceProvider.tokensProvisioned`
141-
function getIdleStake(address serviceProvider) public view returns (uint256 tokens);
141+
function getIdleStake(address serviceProvider) external view returns (uint256 tokens);
142142

143143
// staked tokens the provider can provision before hitting the delegation cap
144144
// `ServiceProvider.tokensStaked * Staking.delegationRatio - Provision.tokensProvisioned`
145-
function getCapacity(address serviceProvider) public view returns (uint256);
145+
function getCapacity(address serviceProvider) external view returns (uint256 tokens);
146146

147147
// provisioned tokens that are not being used
148148
// `Provision.tokens - Provision.tokensThawing`
149-
function getTokensAvailable(bytes32 provision) public view returns (uint256 tokens);
149+
function getTokensAvailable(bytes32 provision) external view returns (uint256 tokens);
150150

151151
function getServiceProvider(address serviceProvider)
152-
public
152+
external
153153
view
154154
returns (ServiceProvider memory);
155155

156-
function getProvision(bytes32 provision) public view returns (Provision memory);
156+
function getProvision(bytes32 provision) external view returns (Provision memory);
157157
}

0 commit comments

Comments
 (0)
Failed to load comments.