Skip to content

Commit

Permalink
[contracts] - getPropIdFromCell (#608)
Browse files Browse the repository at this point in the history
* [contracts] - test getter

* [contracts] - test getter

* [contracts] - test getter

* [contracts] - getPropIdFromCell
  • Loading branch information
Roman Matusevich authored Oct 17, 2023
1 parent afc41a1 commit a513f2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions v6_x/v6.1.0/contracts/gosh/versioncontroller.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,15 @@
"outputs": [
{"name":"value0","type":"uint256"}
]
},
{
"name": "getPropIdFromCell",
"inputs": [
{"name":"propData","type":"cell"}
],
"outputs": [
{"name":"value0","type":"uint256"}
]
}
],
"data": [
Expand Down
6 changes: 6 additions & 0 deletions v6_x/v6.1.0/contracts/gosh/versioncontroller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,11 @@ contract VersionController is Modifiers {
function getHashCell(TvmCell state) external pure returns(uint256) {
return tvm.hash(state);
}

function getPropIdFromCell(TvmCell propData) external pure returns(uint256) {
TvmSlice s = propData.toSlice();
(,, uint256 propid) = s.decode(uint8, address, uint256);
return propid;
}
}

Binary file modified v6_x/v6.1.0/contracts/gosh/versioncontroller.tvc
Binary file not shown.

0 comments on commit a513f2f

Please sign in to comment.