Skip to content

Commit

Permalink
Deployed to ropsten
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Jun 28, 2021
1 parent 27fd91b commit 6c72cfb
Show file tree
Hide file tree
Showing 13 changed files with 3,656 additions and 158 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changes

## [3.2.0] - 2021-06-28

### Added

- Deploy to ropsten

## [3.1.0] - 2021-06-13

### Added
Expand Down Expand Up @@ -160,7 +166,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- First public release

[unreleased]: https://github.com/cartesi/solidity-util/compare/v3.1.0...HEAD
[unreleased]: https://github.com/cartesi/solidity-util/compare/v3.2.0...HEAD
[3.2.0]: https://github.com/cartesi/solidity-util/compare/v3.1.0...v3.2.0
[3.1.0]: https://github.com/cartesi/solidity-util/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/cartesi/solidity-util/compare/v2.0.1...v3.0.0
[2.0.1]: https://github.com/cartesi/solidity-util/compare/v2.0.0...v2.0.1
Expand Down
1 change: 1 addition & 0 deletions deployments/ropsten/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
49 changes: 49 additions & 0 deletions deployments/ropsten/Bitmask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"address": "0x9fB2a46ca249b56E89F9956d8552E5Df1161E340",
"abi": [],
"transactionHash": "0x3b3872e845530de59c8ef0396e83972b59268b661dc54d21fd4febbf12f12281",
"receipt": {
"to": null,
"from": "0x18930e8a66a1DbE21D00581216789AAB7460Afd0",
"contractAddress": "0x9fB2a46ca249b56E89F9956d8552E5Df1161E340",
"transactionIndex": 17,
"gasUsed": "171268",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x48c55f820ad89c459e084610c17d65cde91da692640cdcfe53e0fe09394bc851",
"transactionHash": "0x3b3872e845530de59c8ef0396e83972b59268b661dc54d21fd4febbf12f12281",
"logs": [],
"blockNumber": 10530859,
"cumulativeGasUsed": "7830015",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "5b07a7c7918b23d3bd0429b384ba8870",
"metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Stephen Chen\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Bit Mask Library\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getBit(mapping(uint248 => uint256) storage,uint256)\":{\"notice\":\"Get a bit in the bit mask\"},\"setBit(mapping(uint248 => uint256) storage,uint256,bool)\":{\"notice\":\"Set a bit in the bit mask\"}},\"notice\":\"Implements bit mask with dynamic array\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bitmask.sol\":\"Bitmask\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Bitmask.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity ^0.8.0;\\n\\n/// @title Bit Mask Library\\n/// @author Stephen Chen\\n/// @notice Implements bit mask with dynamic array\\nlibrary Bitmask {\\n /// @notice Set a bit in the bit mask\\n function setBit(\\n mapping(uint248 => uint256) storage bitmask,\\n uint256 _bit,\\n bool _value\\n ) public {\\n // calculate the number of bits has been store in bitmask now\\n uint248 positionOfMask = uint248(_bit / 256);\\n uint256 positionOfBit = _bit % 256;\\n\\n if (_value) {\\n bitmask[positionOfMask] =\\n bitmask[positionOfMask] |\\n (1 << positionOfBit);\\n } else {\\n bitmask[positionOfMask] =\\n bitmask[positionOfMask] &\\n ~(1 << positionOfBit);\\n }\\n }\\n\\n /// @notice Get a bit in the bit mask\\n function getBit(mapping(uint248 => uint256) storage bitmask, uint256 _bit)\\n public\\n view\\n returns (bool)\\n {\\n // calculate the number of bits has been store in bitmask now\\n uint248 positionOfMask = uint248(_bit / 256);\\n uint256 positionOfBit = _bit % 256;\\n\\n return ((bitmask[positionOfMask] & (1 << positionOfBit)) != 0);\\n }\\n}\\n\",\"keccak256\":\"0x69f3ae9c413903ba715139aa8c808ad7bedffdd1bad23c3944f4657f8674171f\",\"license\":\"Apache-2.0\"}},\"version\":1}",
"bytecode": "0x61022261003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c806361d26f481461004557806366817f0b1461006c575b600080fd5b610058610053366004610151565b61008e565b604051901515815260200160405180910390f35b81801561007857600080fd5b5061008c610087366004610172565b6100db565b005b60008061009d610100846101ae565b905060006100ad610100856101c2565b6001600160f81b03909216600090815260208690526040902054600190921b91909116151591505092915050565b60006100e9610100846101ae565b905060006100f9610100856101c2565b90508215610127576001600160f81b038216600090815260208690526040902080546001831b17905561014a565b6001600160f81b038216600090815260208690526040902080546001831b191690555b5050505050565b60008060408385031215610163578182fd5b50508035926020909101359150565b600080600060608486031215610186578081fd5b8335925060208401359150604084013580151581146101a3578182fd5b809150509250925092565b6000826101bd576101bd6101d6565b500490565b6000826101d1576101d16101d6565b500690565b634e487b7160e01b600052601260045260246000fdfea264697066735822122054ab0957d3726505d01bfaa699fd88bec9e0dbdaaca4d9d3843a9780185fe60864736f6c63430008040033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c806361d26f481461004557806366817f0b1461006c575b600080fd5b610058610053366004610151565b61008e565b604051901515815260200160405180910390f35b81801561007857600080fd5b5061008c610087366004610172565b6100db565b005b60008061009d610100846101ae565b905060006100ad610100856101c2565b6001600160f81b03909216600090815260208690526040902054600190921b91909116151591505092915050565b60006100e9610100846101ae565b905060006100f9610100856101c2565b90508215610127576001600160f81b038216600090815260208690526040902080546001831b17905561014a565b6001600160f81b038216600090815260208690526040902080546001831b191690555b5050505050565b60008060408385031215610163578182fd5b50508035926020909101359150565b600080600060608486031215610186578081fd5b8335925060208401359150604084013580151581146101a3578182fd5b809150509250925092565b6000826101bd576101bd6101d6565b500490565b6000826101d1576101d16101d6565b500690565b634e487b7160e01b600052601260045260246000fdfea264697066735822122054ab0957d3726505d01bfaa699fd88bec9e0dbdaaca4d9d3843a9780185fe60864736f6c63430008040033",
"devdoc": {
"author": "Stephen Chen",
"kind": "dev",
"methods": {},
"title": "Bit Mask Library",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"getBit(mapping(uint248 => uint256) storage,uint256)": {
"notice": "Get a bit in the bit mask"
},
"setBit(mapping(uint248 => uint256) storage,uint256,bool)": {
"notice": "Set a bit in the bit mask"
}
},
"notice": "Implements bit mask with dynamic array",
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
Loading

0 comments on commit 6c72cfb

Please sign in to comment.