conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "human",
"value": " Add checks for existing authorized addresses"
},
{
"from": "gpt",
"value": "*/\npragma solidity ^0.4.8;\n\nimport \"./base/Token.sol\";\nimport \"./base/Ownable.sol\";\n\n/// @title Proxy - Transfers tokens on behalf of contracts that have been approved via decentra... | solidity | chosen |
[
{
"from": "system",
"value": "Fix compilation error in sample client\n"
},
{
"from": "human",
"value": "//\n// An example client calling our oracle service\n//\n\nimport \"api.sol\";\n\ncontract SampleClient is usingTinyOracle {\n bytes public response;\n\n function __tinyOracleCallback(uint25... | solidity | chosen |
[
{
"from": "human",
"value": "Add new contract interface for writing pricing strategies\n"
},
{
"from": "gpt",
"value": "pragma solidity ^0.4.11;\n\n/* Interface for defining crowdsale pricing */\n\ncontract PricingStrategy {\n\n /* Interface declaration. */\n function isPricingStrategy() publi... | solidity | chosen |
[
{
"from": "system",
"value": "Remove hard code from testing\n"
},
{
"from": "human",
"value": "/*\n * Partial src: https://github.com/eris-ltd/hello-eris/blob/master/contracts/DealManager.sol\n */\n\nimport \"Task.sol\";\nimport \"SequenceList.sol\";\n\ncontract TaskManager {\n SequenceList l... | solidity | chosen |
[
{
"from": "human",
"value": "Create Pausable contract, inherits Ownable.\nOwner should be able to pause and unpause a Contract.\n"
},
{
"from": "gpt",
"value": "pragma solidity ^0.4.4;\n\nimport \"./Ownable.sol\";\n\ncontract Pauseable is Ownable{\n\tbool public paused;\n\n\tevent LogSetPaused(b... | solidity | chosen |
[
{
"from": "system",
"value": "Revert \"Added event to ease the ui side of things\"\n\nThis reverts commit 34c457170b8bce8e09cd6c829d963c7aaadfc3b3.\n\nAn event shouldn't be necessary for this contract.\n"
},
{
"from": "human",
"value": "import \"./NonceCompareOp.sol\";\n\ncontract NonceCompareOp... | solidity | chosen |
[
{
"from": "system",
"value": "Replace explicit constructor with initializer\n"
},
{
"from": "human",
"value": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.8.0;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\... | solidity | chosen |
[
{
"from": "system",
"value": "Expand on the provided example; use a struct\n"
},
{
"from": "human",
"value": "contract IdisContractsFTW {\n uint storedData;\n\n function set(uint x) {\n storedData = x;\n }\n\n function get() constant returns (uint retVal) {\n return storedData;\n }\n}... | solidity | chosen |
[
{
"from": "system",
"value": "Use instead of directly calling on\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.11;\n\nimport './MintableToken.sol';\n\n/**\n * @title Capped token\n * @dev Mintable token with a token cap.\n */\n\ncontract CappedToken is MintableToken {\n\n uint256 pu... | solidity | chosen |
[
{
"from": "system",
"value": "Move state to beginning, for readability.\n"
},
{
"from": "human",
"value": "contract Mul2 {\n function get_down() returns (address down) {\n down = current_down;\n }\n\n function get_ether() returns (uint ether) {\n ether = current_ether;\n }\n\n functio... | solidity | chosen |
[
{
"from": "system",
"value": "Make blobBlockNumber public instead of custom getter.\nReturn hash from storeBlob().\n"
},
{
"from": "human",
"value": "/**\n * @title BlobStore\n * @author Jonathan Brown <jbrown@bluedroplet.com>\n */\ncontract BlobStore {\n\n mapping (bytes32 => uint) blobBlock... | solidity | chosen |
[
{
"from": "system",
"value": "Fix template spacing for solhint\n\nFix https://github.com/trufflesuite/truffle/issues/791"
},
{
"from": "human",
"value": "pragma solidity ^0.4.4;\n\ncontract Example {\n function Example() {\n // constructor\n }\n}\n"
},
{
"from": "gpt",
"value": ... | solidity | chosen |
[
{
"from": "system",
"value": "Make sure we're using SafeMath\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.15;\n\nimport 'zeppelin-solidity/contracts/math/SafeMath.sol';\nimport 'zeppelin-solidity/contracts/ownership/Ownable.sol';\nimport 'zeppelin-solidity/contracts/crowdsale/Finaliza... | solidity | chosen |
[
{
"from": "system",
"value": "Index addreses in events and explicit uint size\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.11;\n\nimport \"../ownership/Heritable.sol\";\n\n\n/**\n * @title SimpleSavingsWallet\n * @dev Simplest form of savings wallet whose ownership can be claimed by a... | solidity | chosen |
[
{
"from": "system",
"value": "Include message sender in hash.\n"
},
{
"from": "human",
"value": "/**\n * @title BlobStore\n * @author Jonathan Brown <jbrown@bluedroplet.com>\n */\ncontract BlobStore {\n\n event logBlob(bytes32 indexed hash, bytes blob) anonymous;\n\n /**\n * @dev Store... | solidity | chosen |
[
{
"from": "human",
"value": "Add contract with internal sources to tests\n"
},
{
"from": "gpt",
"value": "//SPDX-License-Identifier: MIT\npragma solidity ^0.7.3;\n\n//This contract is purely here to make sure that\n//internal sources are generated, to make sure that the decoder\n//doesn't choke ... | solidity | chosen |
[
{
"from": "system",
"value": "Change bug logic to success only if there are less actual balance"
},
{
"from": "human",
"value": "import './Conference.sol';\nimport './zeppelin/PullPaymentCapable.sol';\n\n/*\n * Bounty\n * This bounty will pay out if you can cause a Conference's balance\n * to be... | solidity | chosen |
[
{
"from": "system",
"value": "Store the block number the blob is logged in in contract state.\n"
},
{
"from": "human",
"value": "/**\n * @title BlobStore\n * @author Jonathan Brown <jbrown@bluedroplet.com>\n */\ncontract BlobStore {\n\n mapping (bytes32 => bool) stored;\n\n event logBlob(b... | solidity | chosen |
[
{
"from": "system",
"value": "Make registry function public so that they appear in the abi\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.8;\n\nimport \"./lib/Owned.sol\";\n\ncontract Registery is Owned {\n\n mapping (string => address) registery;\n\n function register(string name, ad... | solidity | chosen |
[
{
"from": "system",
"value": "Fix JS test \"compilation error\".\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.11;\nimport '../BancorFormula.sol';\n\n/*\n BancorFormula test helper that exposes some BancorFormula functions\n*/\ncontract TestBancorFormula is BancorFormula {\n func... | solidity | chosen |
[
{
"from": "system",
"value": "Fix weird indent issue for inline assembly\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.11;\n\n/*\n * @title MerkleProof\n * @dev Merkle proof verification\n * @note Based on https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol... | solidity | chosen |
[
{
"from": "human",
"value": "Split up fallback function modifier"
},
{
"from": "gpt",
"value": "pragma solidity ^0.4.8;\n\nimport \"./Token.sol\";\nimport \"./SafeMath.sol\";\n\n/// @title Standard token contract with overflow protection - Used for tokens with dynamic supply.\ncontract StandardT... | solidity | chosen |
[
{
"from": "system",
"value": "Rename from _invitationCode to _code"
},
{
"from": "human",
"value": "pragma solidity ^0.4.8;\n\nimport './zeppelin/Ownable.sol';\n\ncontract InvitationRepository is Ownable{\n bytes32 encryptedCode;\n\n struct Code{\n bool exist;\n bool claimed;\n addres... | solidity | chosen |
[
{
"from": "system",
"value": "Add fix for the approve() mitigation.\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.8;\n\n\nimport './BasicToken.sol';\nimport './ERC20.sol';\n\n\n/**\n * Standard ERC20 token\n *\n * https://github.com/ethereum/EIPs/issues/20\n * Based on code by FirstBlo... | solidity | chosen |
[
{
"from": "system",
"value": "Refactor `bytes tasks` to `address[] taskAddresses`\n"
},
{
"from": "human",
"value": "contract User {\n\n bytes32 public id;\n bytes32 public username;\n bytes32 public email;\n bytes32 public name;\n bytes32 public password;\n\n bytes32 public sc... | solidity | chosen |
[
{
"from": "human",
"value": "Modify contracts to Solidity style guide"
},
{
"from": "gpt",
"value": "pragma solidity ^0.4.8;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n... | solidity | chosen |
[
{
"from": "system",
"value": "Add require statement to exception test file\n"
},
{
"from": "human",
"value": "contract Exceptions {\n\n uint256[8] myarray;\n\n function assert1() {\n \tuint256 i = 1;\n assert(i == 0);\n }\n\n function assert2() {\n \tuint256 i = 1;\n ... | solidity | chosen |
[
{
"from": "system",
"value": "Use a nonce of UINT_MAX as implicit consent\n"
},
{
"from": "human",
"value": "contract Adjudicator {\n\n\tbool public frozen = false;\n\tuint nonce = 0;\n\tuint lastTimestamp = 0;\n\taddress owner;\n\tuint timeout;\n\tbytes32 public stateHash;\n\n\tmodifier onlyOwn... | solidity | chosen |
[
{
"from": "system",
"value": "Store the block number in the last 6 bytes of the id.\n"
},
{
"from": "human",
"value": "/**\n * @title BlobStore\n * @author Jonathan Brown <jbrown@bluedroplet.com>\n */\ncontract BlobStore {\n\n event logBlob(bytes32 indexed hash, bytes blob) anonymous;\n\n ... | solidity | chosen |
[
{
"from": "system",
"value": "Use SafeMath in dummy token distribution\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.17;\n\nimport \"../token/ITokenDistribution.sol\";\n\n\ncontract TokenDistributionMock is ITokenDistribution {\n // End time of the distribution\n uint256 endTime;... | solidity | chosen |
[
{
"from": "system",
"value": "Update pragma version for test contract\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.24;\n\ncontract NewPragma {\n uint x;\n\n constructor() public {\n x = 5;\n }\n}\n"
},
{
"from": "gpt",
"value": "pragma solidity ^0.5.0;\n\ncontract Ne... | solidity | chosen |
[
{
"from": "system",
"value": "Add address of created PeerReview contract to DAO\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.2;\n\nimport \"PeerReviewContract\";\n\ncontract PeerReviewDAO {\n address[] peerReviewContracts;\n\n function createPeerReviewContract(address initJourna... | solidity | chosen |
[
{
"from": "system",
"value": "Change to support hash of state\n"
},
{
"from": "human",
"value": "contract Adjudicator {\n\n\tbool public frozen = false;\n\tuint nonce = 0;\n\tuint lastTimestamp = 0;\n\taddress owner;\n\tuint timeout;\n\tbytes32[] state;\n\n\tmodifier onlyOwner {\n\t\tif (msg.sen... | solidity | chosen |
[
{
"from": "system",
"value": "Remove inheritance that conflicts with upgradeable transpiler\n"
},
{
"from": "human",
"value": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../proxy/IBeacon.sol\";\n\ncontract BadBeaconNoImpl {\n}\n\ncontract BadBeaconNotContract ... | solidity | chosen |
[
{
"from": "system",
"value": "Add documentation to safemath functions\n\nFixes #655\n"
},
{
"from": "human",
"value": "pragma solidity ^0.4.18;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256... | solidity | chosen |
[
{
"from": "system",
"value": "Update to preferred citation formation for ERC-721"
},
{
"from": "human",
"value": "pragma solidity ^0.5.2;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic interface\n * @dev see https://github.com/ethereum/E... | solidity | chosen |
README.md exists but content is empty.
- Downloads last month
- 7