Skip to content

Commit

Permalink
Added getStake
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Jan 16, 2025
1 parent e7c9d9b commit 4ffefa8
Show file tree
Hide file tree
Showing 14 changed files with 479 additions and 451 deletions.
574 changes: 287 additions & 287 deletions .yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"

yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,24 @@
"@xyo-network/world-typechain": "workspace:^"
},
"devDependencies": {
"@stylistic/eslint-plugin": "^2.12.1",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@stylistic/eslint-plugin": "^2.13.0",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"@xylabs/eslint-config": "3.15.16",
"@xylabs/eslint-config-flat": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/tsconfig": "^4.2.4",
"eslint": "^9.16.0",
"@xylabs/eslint-config-flat": "^4.2.6",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"@xylabs/tsconfig": "^4.2.6",
"eslint": "^9.18.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-prettier": "^5.2.2",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sonarjs": "^3.0.1",
"eslint-plugin-workspaces": "^0.10.1",
"solc": "0.8.28",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"packageManager": "yarn@4.5.3",
"packageManager": "yarn@4.6.0",
"volta": {
"node": "20.9.0",
"yarn": "4.0.2"
Expand Down
8 changes: 4 additions & 4 deletions packages/open-zeppelin-typechain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"package-recompile": "yarn package-clean && yarn package-compile"
},
"dependencies": {
"ethers": "^6.13.4"
"ethers": "^6.13.5"
},
"devDependencies": {
"@typechain/ethers-v6": "^0.5.1",
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"ethers": "^6.13.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"ethers": "^6.13.5",
"rimraf": "^6.0.1",
"typechain": "^8.3.2",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions packages/solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"package-recompile": "yarn package-clean && yarn package-compile"
},
"dependencies": {
"@openzeppelin/contracts": "^5.1.0",
"@openzeppelin/contracts-upgradeable": "^5.1.0"
"@openzeppelin/contracts": "^5.2.0",
"@openzeppelin/contracts-upgradeable": "^5.2.0"
},
"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"rimraf": "^6.0.1",
"truffle": "^5.11.5"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ contract AddressStaking is
function withdrawStake(uint256 slot) public returns (bool) {
return _withdrawStake(slot, this.minWithdrawalBlocks());
}

function getStake(
uint256 slot
) public view returns (AddressStakingLibrary.Stake memory) {
return _getStake(slot);
}
}
6 changes: 6 additions & 0 deletions packages/solidity/src/xyo-chain/AddressStaking/Internal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,10 @@ abstract contract AddressStakingInternal is

return true;
}

function _getStake(
uint256 slot
) internal view returns (AddressStakingLibrary.Stake memory) {
return _accountStakes[msg.sender][slot];
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;

import "../Library.sol";

interface IAddressStakingFunctions {
function addStake(address staked, uint256 amount) external returns (bool);

function removeStake(uint256 slot) external returns (bool);

function withdrawStake(uint256 slot) external returns (bool);

function getStake(
uint256 slot
) external view returns (AddressStakingLibrary.Stake memory);
}
8 changes: 4 additions & 4 deletions packages/typechain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
"package-recompile": "yarn package-clean && yarn package-compile"
},
"dependencies": {
"ethers": "^6.13.4"
"ethers": "^6.13.5"
},
"devDependencies": {
"@typechain/ethers-v6": "^0.5.1",
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"@xyo-network/solidity": "workspace:^",
"ethers": "^6.13.4",
"ethers": "^6.13.5",
"rimraf": "^6.0.1",
"typechain": "^8.3.2",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/uniswap-solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@uniswap/v3-core": "^1.0.1"
},
"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"copyfiles": "^2.4.1",
"rimraf": "^6.0.1",
"truffle": "^5.11.5"
Expand Down
8 changes: 4 additions & 4 deletions packages/uniswap-typechain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
"package-recompile": "yarn package-clean && yarn package-compile"
},
"dependencies": {
"ethers": "^6.13.4"
"ethers": "^6.13.5"
},
"devDependencies": {
"@typechain/ethers-v6": "^0.5.1",
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"@xyo-network/uniswap-solidity": "workspace:^",
"ethers": "^6.13.4",
"ethers": "^6.13.5",
"rimraf": "^6.0.1",
"typechain": "^8.3.2",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/world-solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"package-recompile": "yarn package-clean && yarn package-compile"
},
"dependencies": {
"@openzeppelin/contracts": "^5.1.0"
"@openzeppelin/contracts": "^5.2.0"
},
"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"rimraf": "^6.0.1",
"truffle": "^5.11.5"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/world-typechain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
"package-recompile": "yarn package-clean && yarn package-compile"
},
"dependencies": {
"ethers": "^6.13.4"
"ethers": "^6.13.5"
},
"devDependencies": {
"@typechain/ethers-v6": "^0.5.1",
"@xylabs/ts-scripts-yarn3": "^4.2.4",
"@xylabs/ts-scripts-yarn3": "^4.2.6",
"@xyo-network/world-solidity": "workspace:^",
"ethers": "^6.13.4",
"ethers": "^6.13.5",
"rimraf": "^6.0.1",
"typechain": "^8.3.2",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 4ffefa8

Please sign in to comment.