{"_id":"@truffle/contract","_rev":"279-a0f5bba67a331bfa8e07bc174f58f2f7","name":"@truffle/contract","dist-tags":{"migrate-describe":"4.0.33-migrate-describe.1","ens-events":"4.1.0-ens-events.0","micah":"4.0.40-micah.0","chmod":"4.1.9-chmod.0","alphaTez":"4.1.10-alphaTez.0","truffleLogger":"4.1.12-truffleLogger.0","next":"4.2.12-next.0","preserves":"4.2.11-preserves.8","tezos":"5.1.0-tezos.0","save-intermediate":"4.2.15-save-intermediate.1","abi-utils":"4.2.26-abi-utils.0","decoder-no-web3":"4.3.20-decoder-no-web3.0","cheerios":"4.3.20-cheerios.1","eip1559-beta":"4.3.34-alpha.1","decoder-beta":"4.3.37-decoder-beta.0","typescript-migrations":"4.5.18-typescript-migrations.0","hardhat-error":"4.5.24-hardhat-error.0","visual-debugger":"4.6.20-visual-debugger.0","latest":"4.6.31"},"versions":{"4.0.32":{"name":"@truffle/contract","version":"4.0.32","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.32","maintainers":[{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9bfaca6ebfebfdd5bf8f177e2ada30d4bd3a93d6","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.32.tgz","fileCount":40,"integrity":"sha512-jW7FYTTaDBywMOPMuvBWO7H3CTLV+w7JA3Rxb8SpVKe/tWqrGHKwdMO86pLIuMNoA5N9zJl4WwuFrm06IOT/9w==","signatures":[{"sig":"MEUCIDyIAvgRksNHm9fF+5zcekF8lWCVND83A1oquArAu0YdAiEAyK8NpWANVHaVCnl+RjuDMuG1hrchpcW2v2q9haL7npY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4451346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcBdHCRA9TVsSAnZWagAAqW8P/02jqUMQEbv/nkFws/n7\nFPWCKesuKvoZ9j6eQBkvTXCyaoGqChABsxEaYMc3nFEqob6yRU98RGV/bqfP\nZoZXam5+Bw56LykGYSXxEK1ka44wTT/uaFPkSOqPe8VATN4KZCyovpmsgB2K\nOj1kTu3Xl7iPXKOgV/aK4GNqCyvPVv9ULRT2IQUZbMWoyn18ie+LsftTWH8W\nd6uga4JnEd4BSVsWYebZsk811wzj9QPLaWiG1CroFVbgvcnW15KfU5W9JsQ7\nNX5cPO8TaZxDIPvFTyzDQLMm190EA8sqMyUGKnM6KtuYSFmrNcLkD+gyfgjk\nCW5rcHBjUWDLB4RbGH7ZOYCTN7KwVSN6LsTQb500wcWInQtdAgc2LE8MqtvF\nsSDEfFiQGt6qmeUOZmKr1gnJnGKPfDG8rrRamifkyLbGt0R8IZCleqhdyoBU\nzXaO+5qlROGMsAVyHteoSKnk9cY0OgCrdp1YB5rktmpOb8jrrOOJ3Lb/iNIs\n/QvFhlhv12nPzDWJ0h1aqe6PhIcryP+K99GKuX/uI+si3uMZkTp6oiGhir7X\np6tgCwdS8TKHqVQhR4fYY6R9Uga1vJ29VYMky9GqPGQGyswt9ByndjjRD8EV\nv6Mud6n5DGk+v7gooQ711kGyJIVG03kuQVNs07BReFBOP1bqv+ZpB2CcO4jV\nz+Xr\r\n=pqFT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8e9210bc449edbd74867cf5b432122eb63100607","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.16.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.15","@truffle/blockchain-utils":"^0.0.12","@truffle/interface-adapter":"^0.2.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.32_1567627078852_0.333009295029953","host":"s3://npm-registry-packages"}},"4.0.33-migrate-describe.0":{"name":"@truffle/contract","version":"4.0.33-migrate-describe.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.33-migrate-describe.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b97979692c06531759a3577f0ead71923c283a34","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.33-migrate-describe.0.tgz","fileCount":40,"integrity":"sha512-E6SrsnGoF+voxqbAb6anaUK7urQQCaHm48MJCdkeuMDutXXkaQ1mjfpthMWpwF9KSfYlGmq8etQ78L6L1cSO1A==","signatures":[{"sig":"MEUCIQDVp3hE0UuehO0mNsHUVY98/31LT04IhjuzdHT+3BQ40AIgEHcBQ5nSMk3UHavLsUsr/wfx/b4Vx6YWm5SWllvffD8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4451347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcGiUCRA9TVsSAnZWagAAA7kP/ikPDfwZzzxuk5+IaIYo\nBMTS+lMa1MnXwNhePyDXzXO7cpL85jNX1sK8Tct5c1pg20shbokV+4n1W08O\nMrxVXd8dqlDKd8VqisGfvLFzhcr3ZUAcrifD7k4A/lnkFpRbE5Fwv1PPO6R/\nMl76DzJG9EAjv45iQZLPWyVy/nHHC1c67Wf5S1fnmQqv46VUdlOP69vrTLAR\nWZBNFmB4jSU+TH4oCO47f8HbpkVeu1w2L07u16BP4qkyd0DPb+IEpimdOPam\ndQyAkdWYuLx9kgOqzzGnGy35ENtUoJSOTzq7DUd3Gpyq1NJ2OKKGNqRnZgPj\nmThll0NiKgROafIxljTMJhj+f4vaCgq1+rnQsMJPaECXRBbRHp0vkxw1Lmsk\nHLfFF+Lvy97F2gezcui42FBh56hOcCxWZxziRYuihQeY7gye2Mwl3NSjlmrn\nxMn3GeWcK2dPVkxvsf6EY/tXwdp3JRDbr1HwMBq366sLcoQweGIFfXjTygAf\nwwDmlepC3NWGd7FNn9nlNHQHpWrDrksU/Ggw7itwJ0S+/TXCIAtEfK1ABvly\nq1wAbai32RWgWpr67ivuM99W/AmLSLyNZIXjypwoxL9vqyOpoWPUibo6ZW1y\nPH+8uSlT1w5YckoAmLRM3L2CS2sg0gUo7+QfvthOkU3T0zoNKm/wpr9zC+kZ\neWts\r\n=LLGA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"1c74e3104627687fee6ee3a10795ff4c82322bba","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16-migrate-describe.0","@truffle/blockchain-utils":"^0.0.12","@truffle/interface-adapter":"^0.2.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.33-migrate-describe.0_1567647891819_0.23951164872591013","host":"s3://npm-registry-packages"}},"4.0.33-migrate-describe.1":{"name":"@truffle/contract","version":"4.0.33-migrate-describe.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.33-migrate-describe.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"6aebe6ca9a40e4fb411b8a06afc37469559080b0","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.33-migrate-describe.1.tgz","fileCount":40,"integrity":"sha512-GhI00yvqyuwt3ktt2FyyOizocmrQp6FA58gfWiQ+H5SflMt6dWVc0NoL059qqx5ElplqrkSxHbOg+jQh3FWbiQ==","signatures":[{"sig":"MEYCIQDgHQwwwGqs7/tDhzytES2JkbKgF1hklt4Z+YR65NtyXAIhAML3MpibI16c3XNy+IrmePa9/gN5f66BLjxIVu0gkD3U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4451347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcvhOCRA9TVsSAnZWagAAi38P/jXwQCJBO8SkpztBNQzO\ngq58TJDYuO0qXKJJkrxyNv/ggsr0r3kuyYKtfmPh/Xoucg72BAamcCu/Buox\nKl7XzB8iEKrXVuFPq8QH29o5Ir6E2sLMn6uQrKuqOPz8BiY75EALwf3pHa6b\ngyOt+xYUsm2bORSt3E7XKu415MdNvNzwFUJBDntppSYwgp6LFmbIDUnR2Rbi\nCR/ViZxP3KxK9YJPy621vzAzL8xkp5HJ+jUV/tCF5AVf3ML0xt5P8X8nyd0a\nc1XOdeuORyJ4hHQYRxKNICRBR97BpZpYrO10hWQNlkpLiTHKIUeD0lX2nC/U\nfn7Xe2mgOmxeBT3ha3nNWpD3sdw3RkKo2BhYboCgsgjOzASLCjKeiuUqSw65\nFQYX3Y2ZGgV/HLiKP1WFGpleQLTapCCv4JRetAoTdkyNk9mkq7H0V7hGI2TE\nyQ/LIt3gyuq3IFAEINP38ufPS98W8AnEi84SXLkGYZPZt59rZhbYvFj7i7Di\n+CVOH1ayJvEjTY8DOiChvHtIoMq+Wr20qesmVNA1/f+bp89dlrvLQBn2Uj3L\nejTZWmxoYbOopVOagbl6yLtuYBS8qfENftNH61QiZmoGc77VNVjz8e29Lbpa\nDNKSlg8tTH1vnTu2xRfh8R23GtTPevBVCaiMbhSEU/1aL1a58sJ0CPeeG0EA\n+Uxv\r\n=mh+o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"25c6085a9f5592ba83abe3cc55c7fb91bc8bd5f3","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16-migrate-describe.1","@truffle/blockchain-utils":"^0.0.12","@truffle/interface-adapter":"^0.2.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.33-migrate-describe.1_1567815757765_0.8157328041578358","host":"s3://npm-registry-packages"}},"4.0.33":{"name":"@truffle/contract","version":"4.0.33","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.33","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"16220a5165832f0561949d1d6bb5ac12255a8aa5","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.33.tgz","fileCount":41,"integrity":"sha512-UrkvE9YtnJgExzMJUS/ifgatsNL3yOOvR+zGYTzOG5kWBXdZtL/hA2sRG7CepTZIP2xv/Mn/PtlGYYA8dkNfhQ==","signatures":[{"sig":"MEUCIQCR5MLh8my/XoZEfgRU9AXU9xrdMDm/iEwN3tYcTMidLAIgWeZPIuA36YRgodkh2CD97D2LoJVe5FZ3ZYA73iczPD0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4456667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeqy4CRA9TVsSAnZWagAAHeEP/A8a0zY3J2HeukTwpGQH\nJMxX8QIzpYjAiDi6M7l8k+DSNd2fyEsDyfvDLfxHwc8dX69D9rWgkHSdGXdr\n9Wo8OVjEFvacio3QA+NKz+cJb5kCQMwi9pOrt3PEltZ7zGEiTaJQPaORPG6y\nPAFBmRKCL+Qpjd/Ik118Kakum213CzNsG8dhblskjEyVs+2uf0yDdxOyERY2\ncSthA5eQ/Dcx/k3FZqDjY/moAnjkvnG2IgE70YYyZtuOmt2vkhBQO8Yz9TFq\nvWp4vd93Zm7viBa50kr9Xy4qe0qqX5KmRMYy9G2Rb0TWe7qHMQ+JBEdfoS1j\nNt4NOqjerzrlbpbAwwVInTpv2o3SU0hCceXoy3766++O0ItAg8+7Iegi22jT\ncy2o+jx7cKOA1jBTQWP+FlhBjez5WtWmsvHFnVIlGEZw+tAa+dR9GLjmYo8x\nO+6sVOlZcRe2TqNloYugNyXKTWeA5RQV7gFlE2exNGgRZMY3hww46lvchKYN\nUdvoWsZ5+vk+6LDMHBtgimCyVFmbcLGzL5cCH6gI3TLpBytnVtmGDKaQrszM\n2WsXvVXyqywsoKnR9C2fVMswKPgExZrpmt1gftvikDaXqf+nqHjmRroR3IRs\nDZJD3UJCDmbemhdx76KA0iTD6wpG9BzrnWfgBtwIwhCTuy5rbOSzN5Pet0TM\nzUfG\r\n=LEUD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ada4f9ae0ba515b9ccf5ac0b23ce0d05fad1d53a","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16","@truffle/blockchain-utils":"^0.0.12","@truffle/interface-adapter":"^0.2.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.5"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.33_1568320695578_0.9916824535379489","host":"s3://npm-registry-packages"}},"4.0.34":{"name":"@truffle/contract","version":"4.0.34","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.34","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8c37f4471ff0a25fd2fd729d4dbd264a7f49126d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.34.tgz","fileCount":42,"integrity":"sha512-sMm3Cg0aYzXy49BoHwbBdFHu0We3ZrNvUueHg0QUaFLy1Ilh/XDsd9k1ZNBBlOEhzki4yONvitOWvBbdXhCbIg==","signatures":[{"sig":"MEYCIQDAa0b4+bQ5uTCcgK1oqmgdBT4m9AaQ24QW6ZZ5FpNwjwIhAP36XB1hp4RXv3bIVUoXSMbougRe11DPOS5rgx5iAuDY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5177124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjY/eCRA9TVsSAnZWagAAGa8P/1VHRvHrW4bxYtzxS7Pl\nIYybnwvRyjs5UbQX0LNU0gg0sTcx2zGSZvJ/fvW38L070ZEYEq/AMsH5cFXM\nu98z4KHXqebVCGawrMVmuNA+NmsW7wneMk6T7U1bEzZrD7GTTyVWGLRaExIi\nFT4tPFj1KUe2WcyZ90mfAdx2PbbqNnjvJ7DErvKoXG6+PZ1/AVL9Wxx5B3Vy\ndtK1yyOrL75RrLH+F2JIiaKFEvkyraOewfdg/0kDbj2jRaBebaBpEv//a41T\n6Aewt6aoQ5PwEceCHIBlnYcNloUB5T6/ygkZaRXhgHK22CgUeAEK1mhVfDDg\n3KbHNVt7qeQadn8m4AYdIheKysIFsi6X1TaBptsnXL4/GiBq967reJ2fWmRR\nNj4Om/BTlX4R0O3RoyGPWSpjyeZs6bolzLColsBJfcKPHbq5q307h8bxMAfx\nuBI4cwZZKOSaNzTP3F3XlY6cTokXUpvrFuGPU2fXEv4gqhLdRY2Q/BoVn4Zg\nY0KYTRJu2r+/pxPAgi1h660NottNQJ/b5mnfZsEz6Entop4CEUqQ1HSC9e+6\nxRVrjj0hUJq+bxzc4kiYwrTr99L4s9NLKAMPnqA6x+bdxcUfMBp49dgjigpS\nOcMPeK/hnodyo4rJca/KPpU1MMZqEPByTSYO0w/WyPzxUilMYQ++hfk9qWoe\nNTGY\r\n=Jf/q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"f901662c5a78f4f7ffbe8d0c0e01d87673853307","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.9.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.9.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16","@truffle/blockchain-utils":"^0.0.13","@truffle/interface-adapter":"^0.2.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.6"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.34_1569558493976_0.35950608011810425","host":"s3://npm-registry-packages"}},"4.1.0-ens-events.0":{"name":"@truffle/contract","version":"4.1.0-ens-events.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.0-ens-events.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"249d22f1537b03110d115681f1bcf6c1633d0279","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.0-ens-events.0.tgz","fileCount":43,"integrity":"sha512-KN8J12pDce1ILfrlPnH+Czq9nhNNJl1C36DiM2PjAaonmYMZ0GjDcaLaCAUW/cw+n7P8VZJoD5tDc0ZOOxnobg==","signatures":[{"sig":"MEYCIQChS9Ig/0Y1WursiTMjBYlfnl5c6iTPUsJmCdZl6anr7wIhAN+bLNIL1jLHaYa5YdKYorvYMS+/Pfx22qOgpcXG7kE5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5127358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjnXaCRA9TVsSAnZWagAAUlUQAKGNHDPVmvKikWy/VXtq\nEE7y4ilkwqWz2qC/ZqclLnJXAEjkL52aqYyHGPJYKuKSydqasMmJCs5pVF7h\n3lSMbrtuuGPgzQoCZD7VEb+Z8bOfV4bmGJH0YHcLdmCYUhI8uLGdXQJnk84+\n44izxxAoWpqE7KtbLx07LLUSXVJA6qG2yXAkEWhPIa6xrV6l7MkI6LWKMokX\n5XYv1/8pxwVzpesUujMBJkzu2xTUvgPF6GtGpFn3W0gc7t3vRKeNzVIvoJQL\nmd4EVPmU6whzHIavqcCwtp6p8v37AtdGaJHc7qfLxVrxRjaLJxQ60NGmmDaw\nTBxEbDdp0nBy7GwhxSBdX3/Os3u8MPkCM4Isoa28yNgaMnCxBdJmPdcHbK6e\nFUvUmVu3zI7fyE8MzQBkp+P9/hyJupGl36PhV7iIqiKXwy9J24VNM2yJWdO0\nkOHVcuvKTSjrycCcB8ebp+TMY/K9rsv1gvTsmsbW+H9nxAlj5P3bIziTpSgo\nakygLT1dnCp5v/+aEdHGQRsWJ2ZIf647bBsCXbTkZuC6847Z/rnYXrSSwIzo\nQLvIQsvCl8zgDysu4JCEZ6c0Oh31Xzdya0N58Xq+ukp5MPpPMxLTE7yag7aw\nB0z8bYKOBklB9crIDwNa9HEjnWJ3TLpPvLQQ6GYLsLJifsafqake4SsD2bdK\nEqXo\r\n=KyMq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"0327ff65cb9f9cc5641fdad91e6ed0eea2df9f69","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.11.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.11.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-ens-events.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0-ens-events.0","@truffle/blockchain-utils":"^0.1.0-ens-events.0","@truffle/interface-adapter":"^0.3.0-ens-events.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.3.0-ens-events.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.0-ens-events.0_1569617370148_0.04458296369647052","host":"s3://npm-registry-packages"}},"4.0.34-alphaTez.0":{"name":"@truffle/contract","version":"4.0.34-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.34-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1eacd5cb975113f5ddfda23d72a90dd592b26e4b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.34-alphaTez.0.tgz","fileCount":42,"integrity":"sha512-tH2oZycLm30MBxCIKe36S/qjHmSRFcwh507mYJNc93PMMEcC0EUIa8ty4DpuufQzUwMQIVK22ETdp31KFsNhrw==","signatures":[{"sig":"MEUCIBRlr0m7lUO+zDWtRfYV+i251Owy3KKVBwz47ZNffgaEAiEAkxJJs4d8ZvlNWNUt0AHxcMEStuZOWGTec6Xh+Vzp+mk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7368644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkEI4CRA9TVsSAnZWagAAXG0P/AkH1AQxL9NJJHwG/2pP\nWcjeaXJHmyRXG8zhIU6UeZEIM4IlEBNn4/vi0faIEJko7E5j3PSPh/L5hNvp\nhJh97zgUPSdZEgF+Wt03A7cxnjC2c624QzZuEgeJVkBQFnrgu7lt8+6+HTWQ\n6Anqzwl3fPxJ0EmYpgMQSDLlmBdNs5VeDGXoFoY0lr/YH3NgYBIBG35JirAJ\nS6ne7hSi1b4M5bJ3cgensg8ns9mEf/uWweEJFbl1+Cd5lirHWYd631uUrsDj\nNqQeLw0iRCPSeZCBAzo46xaSNMKLYq/EHmrtWCnLn/h8gUd5VTFgltPcQbJv\n7bk+UxxHuhm3NnuZLRvNbuvNyyUYnMJY8KFHyyyLS2poiA4x9Ts+xDhgKeaG\nOngC9WWrtfg8xe7qkt1AAdjnZmTFXcggsqNyrehA7rnr9F2EMQVnxkvDEQDs\n6x+eVAdVH1rvVTeUyMuh/H02tbfpjdgtledfdjFYPbmLlzAPqNd3r2ePRR+k\nzc+u9GUxDYcNLHDP8gA7BNonmImmTUJpAl1e5s3g+cOFR+jM9TTwtq2RN9S8\n2yFCM5sC5lLB+GlCQzCSWB6gAGxmpIudd2NbqOdg/udLJGiIre103Q4bp2aA\ngKbyO3oWzbv4ydqExf6NnrUPB9wvG+M5xIvfkiyx7NSAgyh4BHr5IbWJ1N+D\nh0H8\r\n=a59y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"6b0860543c9b3014b34fa6255f453d17b6981b5f","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.9.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.9.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.17-alphaTez.0","@truffle/blockchain-utils":"^0.0.13-alphaTez.0","@truffle/interface-adapter":"^0.2.7-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.6-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.34-alphaTez.0_1569735223542_0.6816785312180906","host":"s3://npm-registry-packages"}},"4.0.35":{"name":"@truffle/contract","version":"4.0.35","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.35","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"56804803c28c841e42fa9e7933fe570cdc292851","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.35.tgz","fileCount":41,"integrity":"sha512-wiii/vydBxPnZqLRRg3Mkga8+pGcuBrjaR36avmps+ZytXQTO+xz+LmMz7tSkYB7gGuWP93VnEwCp9FMVwhWpw==","signatures":[{"sig":"MEQCIHj3J0NJrlxlsu5skWTJfC030jctAz+6YUNy83s1BashAiAw4CQmr6KoEd+5MeMlaNO/tJq42WA8hydEdb109sNkDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4458300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlTxsCRA9TVsSAnZWagAABs4P/00WctWT29XfVabd+5Qt\n3axYXm/GuucDoa+IZlkx75Nsa5u/hXiDc1Mn/gMuJEfUr/jq0ugoA8BXXbwi\njq9wrvjI8nkT1iD6WRLjtOBmQLSfQKIhPCh0Tz8xhdd7HBoVKV59a6NYQdos\nOuhKSr5qEBeGrI6KaW1xm/cuYGgMAVZHjTo+P1t46+l2o5H0zRH/TUPtWb8h\nLco6nYBNrisxjug/sAmnbldFdoef3rf6g3eberRvdSmMmc4yaOsaB/6gLpA3\nX1xZNjBYPgwwcHz46kSHqh0DcMQq1gXFUT0NpNZRQ49oUOoS1e55VGrq14U5\nu8N3FJxTdqCsvPebz/edQUlznKzGXilUsfrWBJHwlfdGWP35j4IpZSZ4etnf\nvcYKWrsdxYIQAqNr9QEkWH1bj/qtx736rsPhLURTbWzNO06zeZX16TKQDyAj\nu+wr0D0bBy5UjBa+ttOjZDRlot10N64lrjkMx4YNahJexqC9Ql7twygBZG0v\n9GQmgMsDULYV3tmvXVgoVO9XAboMtDn0dyvInvzgEiaiWAZWxAOLmt65O6Sq\nPEUfyfWGSctf/NzPe3WwmpBx3Hmvit77BbKElFlhM8OhU9xqK+RHU5wh4e+l\nMQUVdM6HN+0z+NPQT8BQEETxhti7nd+oJgd12XQy2L6ju2Mu+++cv9ilTMOy\n8i6a\r\n=wG6E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"eb6d557a70ef20d6e40024309ceaf38074f5d615","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v8.16.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.16.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16","@truffle/blockchain-utils":"^0.0.13","@truffle/interface-adapter":"^0.2.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.7"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.35_1570061419699_0.605515705035705","host":"s3://npm-registry-packages"}},"4.1.0-alphaTez.0":{"name":"@truffle/contract","version":"4.1.0-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.0-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"08b151270cc643c90e01bc603e64a36bbde4272d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.0-alphaTez.0.tgz","fileCount":41,"integrity":"sha512-+zKpZEsq7NjDq1G2ZhUpvz6KVdezcFuSj1/NiNiOUjClOIxzZ/nDWAXFrCSjbAOxH0K/RUgAje1wFPsqsFgjJQ==","signatures":[{"sig":"MEUCIQDBbgGCplG1OSh/7n6p6N/IQNaxmyS4xLlfv30QV0ydPwIgMXRjZIfh5marTJ5d25OOHnfUEmKyBOrOCblKbBSn4X4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6792760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdniQ5CRA9TVsSAnZWagAAdY4P/1SWtPayTsKJCfdMV78v\nzO4gRrF/gc+A1lWcmjOc9ShAzbwin8X9jjHUeUU9kK4ZqLGpnONjE1pADJlv\nGod7ml/Z5x4YLyZS/Tvl93FsN+PCj0vtRSDFS6Le7KHjImpCawait80oE94N\nFKMCjvenYpLEg3SvXMpeg2b2FEB9Jr1+66SN5SG7HdbAb4nRUscBQ++lZqnC\nd3R+vnX1a/xqDF1Whz4UZ/TEwDvbkNL2rZPxVO+/SxhbGNwSHNskXbndywHP\n6TmTTtupfv3p2ncP4l33kzIYuHMcjGEtMghYlVr2hKcYpA6NWkEScRh/tH0A\nfxBza5k2tu198nLgkGNBEA/3A83ILaVnaYgzeLH/2OagUF9jLCYx8N9rA6cP\nY7r6WLLvB++rPg3AwdWWY0tH0L0W+epK/IZpIbNS9HYGNiW8Z/rREMYnrUkW\nylDUSAxRSBpkwI/UkxJlKmscpVH9N3boxbJpGb7phlMmQ8Mqfo2qe6KVtYn7\nSlU7hDTcuzH4GzHX5c9OWC4+ZEyLrO10apFmgy51dxqfUhK3XiyN1vNRABAz\n7vzncJIT25c1Oz4RluF2DDzrctj1RKfLU2x6Wj5KvI78EQgFuJqvtqs8pBks\nfq84NNCBa2tArIQabAuzKpXNo6plMkYctcAhTRGqp0FYBN4HX4hgKO/cxgEL\nssls\r\n=EKNr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"0bb676b33e20d2d58d13d0a5f203c4dea674c7f2","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.9.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.9.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0-alphaTez.0","@truffle/blockchain-utils":"^0.0.14-alphaTez.0","@truffle/interface-adapter":"^0.3.0-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.8-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.0-alphaTez.0_1570645048449_0.5893179950940628","host":"s3://npm-registry-packages"}},"4.0.36":{"name":"@truffle/contract","version":"4.0.36","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.36","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9c5d22034f034866f7566eb1ff6d46af0404090d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.36.tgz","fileCount":41,"integrity":"sha512-Bhgpd45ZB+o01fKS35xJbvz+ipBWBtE6fzSEEEF6nQvW+OR1jZJ2eKoVSfPU1h3wV5jSzBbQuLbWCtNA+RrNqg==","signatures":[{"sig":"MEUCIBYQOqEB6LWu8yA1wma0T3EvBbmI+o+1awkPsIi0HnpsAiEAshdkR9wdTMS9cdLM2CitZMfS/qAeyEhHTYLq/D2b4X0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4458961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn1mbCRA9TVsSAnZWagAAHNIP/3qulXb4ToecuhO1sspX\nW9h3ZHSgffRculmXoMG4ugxXXgDTVMJ7HO7dA9/jaVW5qILHqeneoT66v1z/\nzB7y9UuGY/WqicEk4qEVb6bpbOrzoP/jBfTgQO17OaGUcJ7VFa+HHK7o0hxO\n1XA9Kp7WTJgMtZrZM9Xo5I47N9VFWEs5w6S3x4sg9bvGWDNZWhMwCZB8D0KG\noEHubPxp9AoH+B+tvyfV2IjabA69BFabCP9AWrC5WUbcCDY5Oi8JJa/2YOWp\noEIYncGCbuoaK/bt9aXmoTb1k4Dqhr+zNNgkHaP9Xm/WEYKAgv9iiVJPUbeW\n9g9AHrUGLUKW38NpIa/6W017sVV+0kpKl7CSz5wDJcHY5XNn0UAnmBM9+DiJ\n+qplwUvrGlpNP/mhT+14TnScRegSCmxuLzaiDSBkeDUO9rg4ljArrESbb4Jo\n1DawBNiQ2GHj+deWQ20GcWt48vQX78iDTSAXAQOejWYWz7KWfye1a8/Y4vqi\njWVH5pInPTuGw9IhmNnu+pdtsK+isGCYpxOjBrJQx5ZHbhCNc//l3ed3FtBw\nnCEM8IJKdgktv6kje4irbiF25UZGfqA2HlG4S35u/nQJu0NBls7KHx/cARm9\no/igNOeckhSjRbbMcdguuI7pwAsQridihSw8e1Hqahs3c5tipvyg2pfFUf5j\nkY9b\r\n=XzUn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c0aab909fa9a53a2c114d7a07aae26c59b2f2ab5","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.11.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.11.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16","@truffle/blockchain-utils":"^0.0.13","@truffle/interface-adapter":"^0.2.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.8"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.36_1570724250531_0.7444906816613952","host":"s3://npm-registry-packages"}},"4.1.1-alphaTez.0":{"name":"@truffle/contract","version":"4.1.1-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.1-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e2b164592b2a9bf7c8b9b2fb4f2fb74649561df3","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.1-alphaTez.0.tgz","fileCount":41,"integrity":"sha512-36iDQccELP35b+ObncRowSPIk4inyMKa/GBDkKvY/P9PrYx54uKul7SgFiwTnIYPjZj3u7TgDJ/CUMV9K95vwg==","signatures":[{"sig":"MEUCIQDD5q8W+4+zOXEiWhy7MoEBJ+JtWZbmVYUHWvl/0FHimAIgAKdmp9ANngQZ1XND3aU8EEIXH6DAQgWsP90yZD7UE6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6792655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoRYICRA9TVsSAnZWagAAh/0P/0WWhpfNHt+nx3uyaASq\nsKGPOa0bwyT57nnqaqO5/cK3TRf4oir0nkwf8SPp7Yt+nDMDN1/YLTemEWl1\nZHzB+eL1+w0MgEkaHnO/y8ohfX2CpBiy/K9nf4gvHYQwI3y10b5zSP6Ea6UT\n25HDhhV0IkF08f3S201JLwr9wsWFoULBrZQshwfvdaLQA615QIGr0ynWmDc8\nlHemfvCgkv1Jk5FIyTOIbOJLVb4ZORSmookPbM6QAw9WV0cgHR1oRG31takO\n6AQ9o7SBgldcSDacr0Ez2oCf2jvCOUagskYhE79hRatpMlSG96r3RGgB/byZ\nLHMQ5+dwpvyi86jlHAsp8EaS9U24fKZDr5/1fNnZEIZ2HmH2BX6dD6xQ5zLR\nbQGKn1zf5YEG+Ly9RKM65PUNPhHIQ13qLa2c+YBeyM31FbDheKWjLbp5fFks\ntLs8ZLPTqUJHAlB0WXo9+lWB8gvzrhaTiRBWfU0PnBuwODWA4mC7T7T4DeF0\ncqY2Jwm1LpqgKoZzdLXVJSxqD8Xx3JFo0k4EKk285O0IcpYGGuWHq7k6Dmet\nSVuZMaj2IU2/i3E7wTqBobwUji+XOlohrhhoq8RUoKGcTvdi50yO5+c1HQBm\nvZ1wD5mVEiE2YGUnqDRBdH/h5wnBbzOmGwQnYXwtee/A/tajyny2Qbxpoc18\nSjcw\r\n=lwhC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"68ac72a42cff943110c8fc8673b251f5d651bc61","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.9.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.9.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.10-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.1-alphaTez.0","@truffle/blockchain-utils":"^0.0.15-alphaTez.0","@truffle/interface-adapter":"^0.3.1-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.9-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.1-alphaTez.0_1570838023627_0.028439367899449453","host":"s3://npm-registry-packages"}},"4.0.37":{"name":"@truffle/contract","version":"4.0.37","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.37","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"fae08b8d8f05c133ed4580aaf5e1a1b01c5c5954","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.37.tgz","fileCount":41,"integrity":"sha512-zCTaTWVDXOJNsBhd2wnIxvb6/610I083ZHKLZ/r/PqY2K8CvhcUsxoAggJowu9O8SN3Ll3gTJGugmx+ip6rbSw==","signatures":[{"sig":"MEUCIQDNPudT3+e8MLIGJZS4wStPpw7PV4CrC3dAP97Nm//yOAIgVlqys0Y5iQRl+dCepj3P6dG5QJdJeB3//zBRoLqgi7Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4496794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdszM0CRA9TVsSAnZWagAAHuUP/RYofBHyaNdWboNenPhg\nY5FgvtQ0J1C5WLDRlR3V3CbSWuCYTV4UzYLygHEdWQa0crVnSFkImQ0yiVoi\nNx6Z5A8vwhdYazZB2zDBSpOunTY2QPJVres94/TWRboyLv1dUywT+TKcuZuV\noSFjiAvDkT5rvTDQYYcVIPmcDaQfnYpsey+5gd+nXO1tu83ITjW4HEjWv2MX\nV6Z1l8kjuamNnQQ1QLHWf6Sis/GlbtLxSq9VlVMsSR9LwUgjmZM/P5Ow4U4l\nD++BnMnkWEzjbN+YcfTQHZ3APZVBpa/M4AywA/pqKq3Slwq6tWj9Y65+F4Dk\nB9Jga9nhria3AFcJITOaIdDUY3Z3fE36hYdJ17VMJmC6D9TR+36mIxudvqDE\nwmQ0lYKC7dZBpjfPU403k+5plx02TDr6zRD2qQWINwCABe9/BvjClXlD57y9\n6FL32gYxxRNSTrBom0C15Z2DF+qFtJlCSf/zlx7LePm0QJFH2F3gnSvDdAuM\n1YAS7YIVeXrMMxYll93KuWNfpU0ogPrvaBWm02aGwzBFUqNWEWK5vKuxcP1g\naKO1BcSM5B+dIxZjUtLguth2ztPavBgcVcOAyw8IlBRWbh4Oxx7Uqv3nzcf8\nxMVwaXdae0F8FwOpE2/JwvWH+vEkWBIEgyDtRpjzHObcixxoqYiZktfG4aW+\n5Jey\r\n=v03Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"32baaf05a50f9f8bed050244b487c4074f7d5e61","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v11.7.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"11.7.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.16","@truffle/blockchain-utils":"^0.0.13","@truffle/interface-adapter":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.9"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.37_1572025139491_0.9645414367113634","host":"s3://npm-registry-packages"}},"4.0.38":{"name":"@truffle/contract","version":"4.0.38","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.38","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1c17168d916278ef8fd9cd61d815326ac9043530","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.38.tgz","fileCount":41,"integrity":"sha512-amytkcquQvqm4T67Or70sb9bey38yNrRmkoIgzOrA4ISAgasZI21vIWcJinGwNp/Pd2xXnA1X6H/D0gPAhB9aQ==","signatures":[{"sig":"MEUCIGuWxnK7o8VR/u6WEMtE3MDjhFiQ1rucOfB4nTYXd1CmAiEAkULNUerqMAQOYijAHv3q72g17xN2e0/m2AoobBwkeHc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4503316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu2vQCRA9TVsSAnZWagAAcGgP/jQotjLWDBw5+CXWwEdU\n74Zb6kCD6+gFwdxga97p7mQVtIPMaw3jvBI9OEGChAV9Vja0h8LGQ3o4EjxY\nDUv9+ada0cxFhatOOp2+y/KUCi3VuIgs8jxC9kYJ99Q4zEk5/KJJCTBJU07x\nLW8ROxZqRgBWpyPSX++r/F/SnYGWDrBzmMUiRUr9B+KOiBeCSE69rkSn7xQE\nZU+OPqrV0ycrhsCKC1ao5L2mZbqNQSQbPESZD5ZG9k7Q8AFl/RP8JzuDWrY/\nonB1grI09YAhNEG9JO6EmGbg0fcxXmaZRSYIzdkELwiCqRB7KSkWshRIHoZI\n46YIgMbhKE6XexSQEMDZOkKd64kP/4//hKk0O8GgB9P7SWN63MexqpbrbbWK\n9Dwp+ajcQbWpKitbEnTQlbkATE3Mr2B5OqQxm6+6BCnwQXp7EGSMgMkqO1oy\nDHBxgbVif2QNtlHalSsqFrJXoJDg3wfLdnINGijsuaYkeHJLGbeJrWOseg3R\nGO28uHTm3JGvW4p1sroa4TBOTQApBbNMFKu92vlKorRRApeqZyWY3RYzgm5/\n3AwNRE+5xe+DC3/PeDQNfpQCyMq5qLsyp//bKzTOMZvzKf9bpDQsd4MTfUqu\n9PYQwV9RhvJ4IpJ6Hd8C7XEJZSkNqd2IKd+eNv1XezaqEOLcYhiIv5bqqFDE\n6rFn\r\n=CnYB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"18f422dc3eb9c9bbd13d0bffe0db2ad33c24632d","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.16.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.16.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.17","@truffle/blockchain-utils":"^0.0.13","@truffle/interface-adapter":"^0.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.10"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.38_1572563919722_0.881290088568683","host":"s3://npm-registry-packages"}},"4.0.41-micah.0":{"name":"@truffle/contract","version":"4.0.41-micah.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.41-micah.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9c60dc1bd865175b4066c2298eadc41275461895","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.41-micah.0.tgz","fileCount":41,"integrity":"sha512-R/17oolbf5OMHvXEYhAgXLizN6UTph4/M3dSyQJUD1YN822IEac5xHf+AhHiqaqQQ8ebaMniaQANLblPA/aBqA==","signatures":[{"sig":"MEUCIQC/3ME/tC3en0zwaYmv4XnpuLNo7l7kSpHtPeYnExTl7gIgNzm6PwDHRbbjx75N2xmo/nb9C2QNrRFg/LX7Buutu3c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4503716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdv39kCRA9TVsSAnZWagAA4YkP/2izToHeCxQaEENPcTdk\nhNzFX7XB0H4KZMJmXvlHdwB4XVfjVR42Mspuch7ladZkboqXH5RRnHLjIcQQ\n2BZS9M81yUj5MG/rhc8K5fsqUfFB5q9UxQF/gmhLZ341RRipu79EkDF1PQhr\nWVt7H/9m1LVBVIN81YiVd6V0Beu+tlbiVyVMx8ZTUGOH3CFDlwH/AMRwE3RA\nH5JDvlhVXSdb46PvXfsOVsQmsEiLT0984OZlb+yxpe3+9dgto3wsM2TfEs3m\n99gvmSwHx4/E3WrEqf56WZTJDVVhptNZ6Ly8ckh0H8BYd+hrsglucU68o6BX\n6FHBgGhkhhnbm6pbgl+277Vv5Bul/z7iRjRa1oRuSgkjABu9feOyeGcLVKeD\n0+QM/iQaecOxgMtDWdzhadcuA4nQzwQWDqtZWdbMnGrgwszPC/rQEaZbRK2W\nTO7RoLYxv96aD30LUzW50fNMUDfe3YwetBCj2C7iPmKGN9l0gwPh8YMtTT7y\nvA2UNSL75Wd9BnHBuUOdmylFW+TLRC+WhENckD6bzdodLGTtVbxGJaguf0cd\nsxwkebPB7Rtq5SyCOBYq4R5qcU49nIR0tZ9yHMqMP2aGbyj9YZrDfn7i9QNK\nFCXo/yP/gqubWhzE1RrAthXl4sOzf4p8oGRWItycbQFiEnJz+QC17q1Agyi0\n5+mo\r\n=JdGT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"dfe07e216611600a68dfde267679ce562142290b","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.20-micah.0","@truffle/blockchain-utils":"^0.0.13","@truffle/interface-adapter":"^0.3.4-micah.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.13-micah.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.41-micah.0_1572831075501_0.6392645395783447","host":"s3://npm-registry-packages"}},"4.0.39-next.0":{"name":"@truffle/contract","version":"4.0.39-next.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.39-next.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8ed18b068089a0830ef2a23819d1575ba1fa774c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.39-next.0.tgz","fileCount":41,"integrity":"sha512-OAMxzna/AlXYdMkrUpX9mp9ZUYaZaKGfWwIwZY8QQc6Dn3uVdSUXBIG8Pn/8mWRx3FHzx2k6e+eiM3KGNv7ZdA==","signatures":[{"sig":"MEUCIDVGMV+alSYkNBsLDvs/IaVwfXCnJiIaGOIfPtMJt8B9AiEA6aERi6Uy7V7lN0HP4t0mPtcDJzTfEjMtdfIOkE0CExE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4503938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwXy5CRA9TVsSAnZWagAATZoP/1rmGhElNTn8CufPr489\np66GIXtn1QpbYaB+hpJIetF2AtayUjrkAKfyirLsN3OcQZAlAMRZo2FpP8IU\nnWidJDQ+LSvLoAFCO4FnNmcQYOMjvrrJehhQZ35f70dSApek4PUiLiwi8E4p\n4MJUfcabJ8ZR3Pzh7CMuloHT0Qg/F3V6UR/vNBfBSqsmBlNHgpP+KgDoMaKq\nsuueVlUdT/IKEh8s+ngsT/oCU9SP/lt0qAnLUbCiPr3dfpyCtN531Cs9OiAW\nlYzSsRjoTTWBnDnWdza2N7TFJCGIdbNYDbQVtQIgMM8JBJOfvIe519hCmmiX\n2s+cH3Qtv1kWPFJv1iAdPqgqj+tV+mYNTk2N9nSSifpJzZVVGDdw10O9RUaM\nYa9Lmo42E521/pGB9LOTzbJfcU9ChrduawopOalKGg0/6hGjt2G1My2jGRVQ\naaPh7/P/3dtr0x6BHuLD4vFp7PiDkwolCh19U+mvfvcjNME2ILD+jbGnSQXg\nqUu9DTjEovNhdbhLWoV8esmF8T6Kam3JUC9p/xn5hpZO9INZHxs3kB/hE/rm\nb51wbS2GFcln0Xstp+ZO3/W/ZoF/ggys8bmtDiwxpA7i1RpaP9ZhqG44cx3i\n4iM/0QE0iE/xocHyMMoDMH3uUiDAK2X7zbVbZ5XODZ/QfQyCmMS8oPptCD50\nr25p\r\n=1P/D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"a72ad03fae478e5036795c138e7acaa4483b0c06","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8-next.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.18-next.0","@truffle/blockchain-utils":"^0.0.14-next.0","@truffle/interface-adapter":"^0.3.2-next.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.11-next.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.39-next.0_1572961465262_0.1986903121665542","host":"s3://npm-registry-packages"}},"4.0.39-next.1":{"name":"@truffle/contract","version":"4.0.39-next.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.39-next.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"cd8415480de4a31f285e5c3940dbc66ef3d02aee","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.39-next.1.tgz","fileCount":41,"integrity":"sha512-BEcAEkSFpxVvhadsOn+F2VtE63aRD3vtMJsgL5G09/aVxmq9NOgCGjqmKQmrVf1pmHQA/t7EKZHiTS9SrJgLCg==","signatures":[{"sig":"MEQCIGYOvJ6OK8/2TKiW4Y9c9+3fhYt+QqTLwWtcKVLMtHa7AiBqe3OTsavaY32QWWzPygFJSVatJerSkjF5twuv+ckM2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4503938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwYCGCRA9TVsSAnZWagAAnLIP/0/0KmZ4KOOffSW1NT+n\n8d02XmVP7jJcu0L3HadbUYHmVRd798hKIUC1d+Xr3UT3vBmAumOIwCmMlZUx\nEI7TBVJ6/tUdoMKnU4NC2g8cWz5NnNZ3YHp/Q6A8N7UuWA64st7ZG9OB/3SJ\noZsQQdSW21sC0Q3QET+Im+XyrxlIp0roKVCtw8o+hlbIf3ChXSglZCu9aP1Z\n7Lm2Abw2f097k2eWmkt1ASXJHVIW36wraL2RSm+Sq1BEyWx+xlZPk7v6LqfC\nKno9y4LdG1K31FLAasWqG3VPyTpXHc3ONITf75LvaQGgvPzQ/dQxLx3u2pZ6\nSwcyNXa4vkFnK6MUePj94L93ZaEmsEAQoSSR1n3vUrGjcb2hN/+napFlZdAO\nkdtzk8qjxSPc3vNqsg3MAxMoFTb1d5UuDRipFYFuxB6xWb7wOV0FQshQ/s/l\nRU77u54hNowg7hNB78TKfCs56XC0AtOV5OpzVcZ8CG5MicgDGCNhJjITmoED\npfAqYYa2IE6auIHot4wSPYCEa9kUJs0QdhcvuorbSkKX3FgkLcHkAbrcC6h+\nBjHcRLMQhJQu3WzK98V61wZcAwLoJbm0Gz945sMTKAFE5vc6KDkR6P/jjQTM\nNavEt5bQimyCkzaEdTpXdRV+EFeBb4xcY/WQnPaZtoSOsGCoGpiRjACQtidn\nHdPO\r\n=dvOr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"44cb9ccda70d4745943896e220218c834d1722fd","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8-next.1","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.18-next.1","@truffle/blockchain-utils":"^0.0.14-next.1","@truffle/interface-adapter":"^0.3.2-next.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.11-next.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.39-next.1_1572962438402_0.36334242719374177","host":"s3://npm-registry-packages"}},"4.0.39":{"name":"@truffle/contract","version":"4.0.39","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.39","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"bd2f8d6193446d44b93399d672b77cedb170ada5","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.39.tgz","fileCount":40,"integrity":"sha512-d07KCeQqE2AYEf2HcZkaqns34Fp81WE7t13TkRTAVnthBxu89cGcDFK2Dkip+1Wp9F/FT/qxUoPBdcFSpmBISg==","signatures":[{"sig":"MEUCICvVT612jMd1fod+Ro6UpAmzWrjnq3LpiwZGcGYY0IuhAiEAxnJZT4mlBYRKX0t07ktlVNg47e0Nlao+rsbaXhD8sKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6169894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxKKECRA9TVsSAnZWagAAi1UP/RDiWuXovflA4aVFTP00\nkwCX61PiJs2cOhRZMheo5uX8OPBo2y77TxSwXLaq/PXD2/+GtioX4MjEo1Wy\nxmN7w9xDXt3skkdTFfNHsLJoC31fTgNUFpP3SgXEyUGZzqijZesGWtyl4JPb\nefMBtqpKfoCB9Ps7LxdPfj/+K949R7W4+WtuPijxnrkim1EYt4mfEE0c2hPy\n+URCWP41dwdI8oDpMcGnp/jbUYHNze/TUkeg/99dxd9wQWIzUU5G4LJh+r2j\nUv3HlNJYS+slMIAD+nrlqAhXNWQqHlRcN/mJF0LUmSbAiidWposAVKpjUeKY\n51H+t8RV4OJWg9kbY+cJKH4mK5ZwETZc8MrNnW/ehGo2Rcj/Nn3WVCyU/Uca\ngf0brb0cm5CC89sXGr8tJzGtyhX3G7x8ijvBSaotd8umX1R3MikOqEdTEaik\nWHYh/lYH0HHJHsNQTcFfGOfgI9IUEMHYFfpQt3Zy4VQoN+QG3p/jTjmZm+8V\nwsLvK4vL855mnI8vIIiskLTDjhn9W+zKmLhuJd7aivYh0XTAi5dMMwpASvHE\n2LADr7Bt4l5UP/T+xOoVTKjZtX/iq8KWw6HtzyOP85hp2oy0nBQYHXtwBsr4\n7viokvjJ0vDNM4a7YgwAm+jwol3Xl51AQSRhAUEwB+wTOleVPA0STXzqslfw\nqEco\r\n=WZu/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"26ccd93bc5312a37f30526bbe7ce77f36f244e34","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.16.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"web3":"1.2.2","ethers":"^4.0.0-beta.1","web3-utils":"1.2.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.2","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.2","@truffle/contract-schema":"^3.0.18","@truffle/blockchain-utils":"^0.0.14","@truffle/interface-adapter":"^0.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.7.0","@truffle/compile-solidity":"^4.2.11"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.39_1573167747506_0.9111724812517705","host":"s3://npm-registry-packages"}},"4.0.40-micah.0":{"name":"@truffle/contract","version":"4.0.40-micah.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.0.40-micah.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"747f289c9e8efe97ce322397d6daace70f606835","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.0.40-micah.0.tgz","fileCount":40,"integrity":"sha512-2VlXP0exOhPgSnpx+pja5A2MjwXDTUV/5MLBNqBBT5ZcKIpVcm00JW5WSGxE9Irxg+xxrvZbMc/KEB0sO20cNg==","signatures":[{"sig":"MEUCIHHUKLHaUjPgkBOX+t9tldpdfmeKbPJqaJE9a1xpAaNLAiEAnp1TVx4dheV1TJVDep26uREQ8vpx6Lfaspf+aR7vF2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6170310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxQ08CRA9TVsSAnZWagAANP8P/jvWum+6HKTjqz6e4g/L\nSu/A9kBVIzwVrF6LKoRgqZf7eQ9z7vWQWecqbLy8+iB3LHWkg9k99Mxppptb\nTgXumkmNsIX4XO/uwxfRnzgtIucxaZ53pykwIJdbTEf50vUjuzkPWk+U50LR\nJIY56filRAaBashPgGjY2tojgqE/LRUTiKeHxnpgUqe+sFhGKx84cUNG3FBW\n8+ytoJxMb/4fBJ1DryiwAxA8bslWsXWmy9KuBvZzWgfCB4Cva+P4o1Ml36yL\nSCFgkwHEsUONF/sjgnJc8ZDTaO0/kEMHAAOjL3I4uRuuze/SSGJ+CzH5NRbA\nbKsgraUivlWALJkhUfDBR5LFHmzMQQoCCxrkmfkwmkFCyu8atw+5kBBbyEJs\n+8lBWMiIN+Y0DOqTmaW041+pkk2nfjmS81rq0MGtxE2Pjmysq7loUKVNdCbE\nBJ85Yejl8ulosNliCi/71GOODP18yAhS1DjVHzV6E/BkF8+U9j82IbtX0Ta2\n1N9GO/u6XjNJXwu0UCqQuOHNuAXw/5iGmnfowEvvwdpzA0ER/m9m0ljs0ZCL\nGNf9BR3SBZtPLSnrHnr/DQsmbpNbGY770YqQV7VMa2dHR5lqErQQ/hQK1dlZ\nt0vKr4y/ekopeF9edTHZkxuM8I7XLpGpDdt+1lXF/LhWyqZeKOumJvQ8raW4\n76gB\r\n=MsoX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"03adee6cc853ee4babd40381fa06a9e03ea1c126","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.2","ethers":"^4.0.0-beta.1","web3-utils":"1.2.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.2.2","@truffle/error":"^0.0.7","web3-core-promievent":"1.2.2","@truffle/contract-schema":"^3.0.19-micah.0","@truffle/blockchain-utils":"^0.0.15-micah.0","@truffle/interface-adapter":"^0.3.3-micah.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.12-micah.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.0.40-micah.0_1573195067954_0.9882329476696048","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@truffle/contract","version":"4.1.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b3f20e21e390ad208b25f8396acb1b5b61312b89","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.0.tgz","fileCount":42,"integrity":"sha512-CVAv7rvRtt6dS9zUB3zrWkbV2RbwWxGbSOq/33NMHCj+Envt+G2a6NIAexYADk6zLhHhCc1K2/wH7HElM3CKcQ==","signatures":[{"sig":"MEYCIQCPyHX1CnRJrsfAZ+CrCAz1vvzVip4SOV359Vr2i5DZRwIhAMXoYf/uhiqYrpmjFMmQ4wKZXdN6l8yU4bqLRq6AVFhT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7964133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdytJlCRA9TVsSAnZWagAAUrwP/1alX+yRCMYHtTYsi/RM\nw76FvIVeqnWEVMNqaT721UA5HWs1peLGPv3MuML3oSXqDwQlxw6jL02ffvp/\nWTmg2JjIu/mLBaiyLUHX+JYMdDUFkVKo+YA5BFUE8Q2gOQdzWsLwZwHk926G\ni4ussiGCsslIJI5d2Sfq+IuL+Xi2SpuZ8YmnR4xXrWMjpBaCk6bQYo9/bViR\n/1oc327SSZe24RxM0Qn9QY670qh0rybS2gl91oAsxNf/u9lFufSJP7ivTLe/\ndR97jDg5mZwjm1z4m8RYNJ5LzIsaz5bnJ5fYly2TAsc2/6gqb0m7psmJg+LL\nejkvHqglOLC6m3HkUgVYQtrKzxxGKOyNxjvKN5WMr4vqFDigKl3Xc2jlrS1W\ndqS9mNAK8XPyq3WAAs8z8ZOibTOaygpaaasfiF4l/0TnhbQ32Tptr0ud2wJH\nz6sRajl/qO4SmUZ6KkZ3YV2xe8R8ZcZXA6qYH4etLpYQq3rNrx8Mo2vN7rME\np2igTR7dsgdcWMp0uxsfQO8OYp3B+GGPcN3+kVva80gT9jFp6UrAgLDAnN+m\nvdWeCX4fOLEKKc7RVE2/RbrLV+6/23/b166Ftx+IUrWUzlMjYq6ntxq7R6wG\nvsOt6QZjz66P62ujGiwE87hd7Ndcg6UwQS6AdV7tC15nH5aUbaMc8GhjUkwr\nvILm\r\n=vNn0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a962a994179f561ec8862abed747b18958dbf6ba","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.16.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"web3":"1.2.2","ethers":"^4.0.0-beta.1","web3-utils":"1.2.2","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.2","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.2","@truffle/contract-schema":"^3.0.19","@truffle/blockchain-utils":"^0.0.15","@truffle/interface-adapter":"^0.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.12"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.0_1573573220852_0.649804097164981","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"@truffle/contract","version":"4.1.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"af611aca83a01f3566d0b9389e0f0c8e59bfa358","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.1.tgz","fileCount":42,"integrity":"sha512-jze+xqFkiFYlFles6aLGjlgKkqyRFMH7GYyEetmtzst4zbyA6pIJ1+gqlo+q39qsKtdppMe1wehvlray3J3CEg==","signatures":[{"sig":"MEUCIBx8c62pMqGZ9AI70Ajo/JPwHoRoxU/PkY5rGlVeeskzAiEAjGLPJFxPVBbzVKii5eF3Pv5mG8fQUlkHe4tsVaR/icA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7964306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2GZdCRA9TVsSAnZWagAAyZwP/3OUfgkWHIwX1mPhJt+k\n8EzW2Aorvyy3yeBs5yVjZza0SKlYN1Iy8FF+JpJO5ZApeI7yRyxezLeRvmvV\ngkL3kSTOLsMgtHYQp1zt75mEUsObikB8rFoIUOOx9HcKshPy9ymgY1bBtfUW\nYB98Hg4Gb5fzBgANGkdjyc2d8Wd8rhaNe0MVlu6BE1MQr/Oe16S1nVZwn37f\ncTM3/TUz5TONwQaSpvIWAwiTVT9vSklt4ho7FnPPAb+nw+NUO3p5gt9n2BOd\n8wHqKqUinzUZNFwR45XLLS0DfseIN27RPlnRwoOgZErpj7tuJ9Ovld5JRyhz\n3MVxxAue8xCgXUmBPPHdqgKb8oFe4rkjsA0X1ReM3PKErBXb4faZZogJEWlV\nrjd3qgdDPTkEwXCo/LxF4Yut/sxGhrCa4VyOWvd643zWJmT0qRtLUEOTglxd\n8e8G/zCpt9ptUwXgxlq1yWTW+UzMDPvhGikYzyUq0ZsZyL/Nc55tpE7f/Jtj\nRumtgW/EDhvxLzSPZPne5E2c/3tfiAhiMiKmSjO7noRnbReVm8ai2g2RsBOZ\nkX0mqdoLw3Qr99OfwhRDnFnVF/eXE/alS4IhFneT2J3okdKNiwB24QLAiw+Z\n/oz3tOB3J5IIV6OPNAIMemJi3EFXIhoxEto56qfMTUAT2PwVRg8kQ38FzGZP\n7hy3\r\n=W0Ht\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"9245df7a1d341efc947c20fb45a183712de6c731","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.2","ethers":"^4.0.0-beta.1","web3-utils":"1.2.2","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.2","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.2","@truffle/contract-schema":"^3.0.19","@truffle/blockchain-utils":"^0.0.16","@truffle/interface-adapter":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.13"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.1_1574463069420_0.7314399237405089","host":"s3://npm-registry-packages"}},"4.2.0-truffleLogger.0":{"name":"@truffle/contract","version":"4.2.0-truffleLogger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0-truffleLogger.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"94d20e5c90ba51b51fd1fc367ccf390bc26f51c2","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0-truffleLogger.0.tgz","fileCount":42,"integrity":"sha512-n+MnwjBr87niK3E9nnqHb1zV1Y7iIIUSkU1Z04P2vMsOUEWkH+58wf11hVuNDytSd81vyBExH/RYBa9v36nr/w==","signatures":[{"sig":"MEUCIEyrwVXif68DSIVO0Yi145zrFB5oLvioYnm2j4aobbKWAiEA6WAEN8jzqBk2xNYksntBuYBDBm8/nnuKCqH2J00+9jI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7966206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5uHkCRA9TVsSAnZWagAAI0EP/2+AnmI5Wq8dqs64y4f/\nNrbWoNEQNc8fmAxcu8QauF+R2oLhSh+lZnMnn8ntXtqB2r3uQFi4cm0m1R8E\neM3Yz2vUeBIKywMFDlLg2YJLzalPYbNxVXKjErb0IgL/PJDf6ijHwnXoeHkp\nX/UbKu/BCqLC54NW6WYLccHae4/9z6PZigogpJV/HbccBNF9IYwM6QwUqrvL\nwy06nAfAl65FEdo2U/SG8uLbSHI1vp1s1MvvqsmO9HFe4lVTamQsArVz72ju\nsUgFHo3E8YWd2bar1Tg1kWhwSKZmOgrbFHbGCQqiQ0H6d+lP2XkuuQNuQJip\noziSYF/+LubFGJI9Ti+k0RIKBw+MHiHxKUH46rBPRzsoMDzGWaEnA+SlGxxW\nt1OxfYXxXMGJ0rlHFNKq8+iXAz8zQQAVLfdtQOsHHnQYhxEerMUMjx+egdTH\n9AiUKjLmxhErKIzVbAFO8B9vjA0luSsM6Gs9rKlmBms8nPecv0V+gIVnWxAo\no3yv+pfhvR7bOkZGLPy5K55hMz2yLS/wTrGJZ9lRj637/7Youu0ewwCP+ers\nDTXdkR1KdjzVnjbh0rPQmWvo3R/U/PJWVtHPRgzs7BJl/NZ9j0Ah5ii8PPgE\ne4u0g7xhmMmufIWL7MZNqsKyyduEc7pyJPF3oLH+7TFh2CHd+03QedYaeqAE\n87Co\r\n=Vucy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"124b3803430e09ae83a4a2a2697b985939d21d7c","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.2","ethers":"^4.0.0-beta.1","web3-utils":"1.2.2","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.2","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.2","@truffle/contract-schema":"^3.0.19","@truffle/blockchain-utils":"^0.0.15","@truffle/interface-adapter":"^0.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","async":"2.6.1","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.13-truffleLogger.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0-truffleLogger.0_1575412196336_0.7303012266680389","host":"s3://npm-registry-packages"}},"4.1.2-alphaTez.0":{"name":"@truffle/contract","version":"4.1.2-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.2-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e4dd5158755c7f3a6670fbf6f234c8d26ffdf382","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.2-alphaTez.0.tgz","fileCount":42,"integrity":"sha512-BL1HjlGl7FWhdtn/ZYO7uCtjgDYQmaLcGgAovcid7HrDSWA+NH7HqoIhr0qQjsE9gpX/X6k+lWttbZ9kST6+eA==","signatures":[{"sig":"MEUCIQC4O8v1KaIFbYawnrStPliSv0AIhATR+XiVz7qFd5Q5OQIgG6Iuho+h0Sw4Hpp9Hhpprgfuj3VjBUjtnz5ZhVkbm9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10954798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8YRrCRA9TVsSAnZWagAAcBAP/Rpa5WQhRaCxbREWflWE\nngLUljsF0qkd5qAetc0hVAg5bQE/EjLaqtvJyzCaxqWAPp7Zlqz2i5K+WCW+\nv1Oets0zblEzsjBLF8KV3cN3QJBEAl2zN6mPksYcF1YHTRJvIEeFaJ68JXiz\nThBKZ5jEl6S2OFcqKidxrZH09AHxtE1ITvzFC2dUclZ+vy9eErg6CYRZOWIg\nopraN8TXvNzVgj7iWyqyOkQRHH8fbUrFacaF6/0blAUBrQ3ZYctVEekcOWhZ\nWSGbbOi+bdZd2f7HJMn5nX/IHmZQV643Ssd8bQrLy/PbAB9Myzl3HKCA34tr\nW4ibhE5RXko8G/jaWAvoGaQqVR+l1q1bQ3OFlznwYSIKok0kw74FLJheOS2r\nOWVLcN5KLl8Dqs8U/Ct8P96TXRlykdFnMBjZ14xSHyTOk9jG1BaVpFj5C9wj\n3cJ9xp5Em54etzWsFFWWNW1EeeYjKfri54m0mFAeJCVNowlz2XUin8cmXshC\n+eA9ExOg61+XDqJ13jW0tHhtAHkiiMqxMsjN1uKPcjxgBs7vkZNr8AoojwaV\nWurmNjGP8YXmeNyRVZ+F0p0WWMf4vJBYZStmkp+ie0RyuUq17s1zIEyvWn6h\nZec7Yc4FLBXJyqvYOQjfDUpTXfMV3OCx6sKctXoF07W0l7MBygREguBQCHc2\n2Ize\r\n=Tk9Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"f3a5706949563228f5e04445061569007bc3f792","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.2","ethers":"^4.0.0-beta.1","web3-utils":"1.2.2","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.2","@truffle/error":"^0.0.11-alphaTez.0","web3-core-promievent":"1.2.2","@truffle/contract-schema":"^3.1.2-alphaTez.0","@truffle/blockchain-utils":"^0.0.17-alphaTez.0","@truffle/interface-adapter":"^0.4.1-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.14-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.2-alphaTez.0_1576109163294_0.39846809486517354","host":"s3://npm-registry-packages"}},"4.1.3-alphaTez.0":{"name":"@truffle/contract","version":"4.1.3-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.3-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b5745fc47b450681ccdf4de0fd1111a1f2ccff55","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.3-alphaTez.0.tgz","fileCount":42,"integrity":"sha512-J/JLTvdR9zFwpZHharPTeiC26h7Jl0stbMz9w7NeE6UKD8yOqcLQAvqpkIrUJigIkReztHzhYUrOntWxN28QWQ==","signatures":[{"sig":"MEUCIQCG9aXq+xudrmtL5/XEMIpxGmnROcVLeRwUwbxShgUNEQIgbKCijLO/cD942fQbXPbM7dNivK2K/HDEG7yUZLvLoPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10944318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8ZCnCRA9TVsSAnZWagAAdUYP/R3qBifNhNchCdOG6fzl\nN8nQ+/1i2FHEj9ZRKtqoqS8JR219dUS87gAUmYl5ho7AFM01whThr0UWlMwy\ncoqXJIeCPzWyXoeJUhvjxYUBUnM83Vq19VmVEpoN6M71fNI4LQwsMAHSGwWP\nligu4xLvJX8tlHvhayLrd5svxnnxGYz6u8NSUUmHMyf74pNqp9iNwpYJI4g/\n1QitGF/G77AZf1ykfsq0/OgVhQ2qadBqVVqSFePx52khaV+GFfQ3cCddznhU\ntAO3XUNRG7iZWS1W3f4Ve+weUA54xf5UR2B8mqA4wgUliVrha+ILKO8uQK8i\nS4ZI/etQDtyUjkOToQBvEytiPKOLXG3Zw96hlfFwMs9QXj1WLH35azfLl8J6\nRovLtZJnwjg/RPsHA+dbB5vCJ8gds2W0jzKhyu3rJnztDY6cCrAg303Jyqtf\nD0ja7X+fdZ+Y87cChH12ASDWyBg8h1dcuya28U7qOqOuuiifqrUgL9NBl1N3\n9Ac8hgwvCqzlj4QgfYzfn8jDtrmzss6LdvSO/Oz3cONlpyI2cnO9mzXFu/hz\nQOyQvW5z6ZN9k/+2zcpQiUoL6QqqX6M12qSOs1IEf6RwVemxOgFFFvq2D8Qv\n6i7wbsQSSMSeAkjwfqFwwTm+w1wH+T/4hhT2ZCsqV9lhp9IRG3mN7a1kqjIs\nXWRC\r\n=OG6D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"dc395c9986d0475faa6da142e87682e70e52955e","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.12-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.3-alphaTez.0","@truffle/blockchain-utils":"^0.0.18-alphaTez.0","@truffle/interface-adapter":"^0.4.2-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.15-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.3-alphaTez.0_1576112294968_0.785744036769429","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"@truffle/contract","version":"4.1.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.2","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b7470eddfacc827cf59a0f58b2e387d51e185f6b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.2.tgz","fileCount":42,"integrity":"sha512-VQRpLpCYseX6EP4xMa6gE/kJ3hjQ/H0WnQkPRfz2Kn6HKjryZNT4/tWuVl4neZ+HDGjgK9tc5M4G8R8pN4mW4A==","signatures":[{"sig":"MEUCIQD1M3oMA0vzNa6DvEqoPTrn8n1oZxU7l68m06n/zo0kHQIgW29i2y9J34JdfGU3sedI43LmICgEf0dyhqfJetdvfJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5510957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd89NMCRA9TVsSAnZWagAAV64P/Aksi5cIznR9HAQt4ZKO\n1O1TUYtCdnw2BcQPFWCvwTJJ1VDqyR2ySIrZXNtG7AxkAEV6mMgEGod9PCGV\nQFU7xg7K6jXjciUEEzQsOF9E480LsKHUPp/AS9e7dneWm6gf8cAKkJS6TLu8\nuxIoXUVdKTene+SVFu5mz/ZRA2deLpxXoKCoGlGMoLCMuA7SP0ysnl/7HTSS\nOhZtQjDylR6kVdVGMdupBT7Tc22S3u0JIUTQ8zII1tuBZU8SCT5f9cjE9M3m\nd2KsSOkK4pUAIjwXwwYu0RXCULw8JSSwz4e3y8jMaL6I40UQ7CbrZoYyqCWX\nS7yCzyNRFQhwFgRgt+zuuPX9xx9BlcxghSZdHTlvpTGsgvKZYYql5HcQWSTV\nWmTeAk63Kj2tiIVrIAc/o4t7BGPQwkUM+gYgfJBemGm47HBd0yD7wdaH4iJF\n2NPEFAmZN3qKT2C5uAzS9SYWS8GCgZnn3fx23mufHMXFhlpZ1Ezn2OY4UE+9\nHASavz3yKKn3bUSUMmSeRS3/fN89LvuUmt/1Ph/adh2gy/HlHs3lhpzkcSxj\nV+Q2IGqM05T9Mcsl+YyDi0vp5ZYt00kKCXmaues+BvTCTOsgQfwK1knzxzqi\n0TYk/9oUBXlYfxKvEizrmKJKvzIcY5Egyt9Ys1Acj8weN7B7QgKaXRMhRqvf\nhtHk\r\n=rCxj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"6829f4a137d648efb1cdcad81c50174146e3b8ae","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v8.15.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.15.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.19","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.14"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.2_1576260428188_0.47430069388192986","host":"s3://npm-registry-packages"}},"4.2.0-alphaTez.0":{"name":"@truffle/contract","version":"4.2.0-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2b3da5ce94b90f830286a260aa46b7c45aa64239","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0-alphaTez.0.tgz","fileCount":42,"integrity":"sha512-NPQq3PeX2u8KD5HqY9PTpPxBE7FoSrpFtKMYl6MeMEBfi2dLyanPdGat/7lRIIFcnt1WXA7DHeHckNsfDnM1Ug==","signatures":[{"sig":"MEQCIFGdmlbqs5Kj5SSrmoXZtGq33ECPh5LItbQ9K92YboD1AiB+ejjBa1yOh7Ed9lqiLrDJnfY+xFlWYmXaxpofA+KUXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8145800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+oc+CRA9TVsSAnZWagAARsUQAI5PBzSBK2VdmvYs8CAa\nK1xLMRutUsVBTPN2qkHnBnG0FpTO9yo5OzteMbbyIN9fHOcLPwBJijOLLl40\n5mT5NvH6kSM+kSpwzPedCk38sCrfVeLXPyhc6WzMaVTf0TeoBxETjDS6Bwjo\n3fhJ9kJlR6NdhN/yNe13EyhjAqzzLnarCKx7VTTUycf3tloRuC4IPZJAiIyR\nw5ZgGuW0qibCB0ZUyPvCa9wAtKLVzeBr7r4OVfON1CTXiJB57i7ksorws8rp\nX2Hdq0RqVdLMKZcKm32rPdvtGqAnfR6EPZJgY7I+7K8MKhEVOIWEAQe9IBhz\nav0JiOc6pl+gjkSeDvWKCAT1MB9UvWEN24fj/3L7WPlIK04qwt3iF2wacBP2\nWsGPKtdhIMheX2EOzqv4aJRUmqkm1zGZdG+sTIWmuCul/HQgoVmuZR2AQQnK\nSUrdKJmYBD+/4VYAclCsUhWDaqwb2q/a1fl0lGcjxIpfahMvNV0U7YNdbLzv\nsEemBVaj49XNkod/zL+co9n29DQkFl9pLuXzYmKeyiNd0tykdm4XyjS0kvoC\nCy6Ch2w7MC44yUETemjUQSgOB/XfSZw7gdbpCL4F66sRAdPAGdI7zzrbcb1z\nh9HcaGh3AqDuQ8gNM7aVQfv1i5qC8egJ/GWNo0Ual37BvTJpSF/vCCLp0wLP\ntVA0\r\n=M5Ev\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"9c106f4529dc4e3a2e88e722aea53a40eea5e4de","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.13-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/tezos-contract":"^0.4.0-alphaTez.0","@truffle/contract-schema":"^3.1.4-alphaTez.0","@truffle/blockchain-utils":"^0.0.19-alphaTez.0","@truffle/interface-adapter":"^0.5.0-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.16-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0-alphaTez.0_1576699709954_0.833668038393053","host":"s3://npm-registry-packages"}},"4.1.3-truffleLogger.0":{"name":"@truffle/contract","version":"4.1.3-truffleLogger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.3-truffleLogger.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"80584f1a767884fea0d4e2ac03062820da77f048","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.3-truffleLogger.0.tgz","fileCount":42,"integrity":"sha512-dZfs7R3JfTfqMITvp9oDX32oOfSnH9mmv2fDlkADG4Lr/FfqOLViBHQPp8icVv3+V05IH79qmsyo/fNXw52LeA==","signatures":[{"sig":"MEQCIF7dyH9UIIDBEkCIwkyv+WhWbab4b39IYuQhKUgE9sU0AiAB/Bc50fTwfvZOy9RkH4+j/Gc9vr1o2ZeZym8yui4ThQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+7Y6CRA9TVsSAnZWagAAW1AP/0p3Br5rCBYG/m9npLhj\n7qH4parFPK7h/mxCtIdpOFIWEm+Vb6KBfowq7w1Otz7H3pXM1jllekiKZhUf\n7v+e4Xadr8ir9n8CNgWIh/S4JlThQ6E4dqoSMnKU1URUrtjwCTaFANPKMPqA\nUWpNfqcd/5LGHubZqY1ca3SzV6Aqasfzs4+P2Mjb0pB2D3BztKS4Ny193yFj\nW5wskAvmduNwIZygR761IJOjW09K6IvYXGge3vKYMram/x79Lzb6dPwEfhSf\nfA7QG0BwIvA1b3/kGQJsSai1e/OILM+PvbrCWmZhsRST8JyH451DbJ4qBkE6\n2hAj9qEEjgAz5gPkZcxkxKEyg4SRghBovDGIUCT519bLMiLW50qIc+UiablC\nrA6DBjkKR5VctyaW4NN88uRA4sJdcFqiH1Doca70KB2/fi2CqjekajVpoh97\nBmlMHRJ1jRcrUfpDGdKYNC4SZLf391s2mOUElmG6zCWL4fLO/ewCn2SMk8bx\n8Zw9aO67iFtGYGBbXEPhRKLltej3BBCDXkcMwGwGUkHM2+Dmp+gVaPTo7FwK\nNqc9KMuc8GwlESUoftNMxDbMWf3t2TavSvmgWPTNQ7Sf03UKjC6et86VOLC3\nfGtC30Fim/+Rxn1beUyCEmxvv5Z9B4e1hAyPV5EOi5wS8TWZwuPUJoL4IL2/\n60/W\r\n=3L/j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"98996329441358f44a678c2b9887e89579fb71dc","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.20-truffleLogger.0","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.2-truffleLogger.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.15-truffleLogger.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.3-truffleLogger.0_1576777273771_0.7327652879306934","host":"s3://npm-registry-packages"}},"4.1.4-truffleLogger.0":{"name":"@truffle/contract","version":"4.1.4-truffleLogger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.4-truffleLogger.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b77f2483d6e4fb40e2d0ed4bea6467617ea8646c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.4-truffleLogger.0.tgz","fileCount":42,"integrity":"sha512-q3O+monJY6osQrMx2VUY0LBXNhrtXrG4ejloOg4CIeNvt5vCV1heGWviWhy7CDeTjjr0r6qY75Z3tjfSs0FmrA==","signatures":[{"sig":"MEUCIGihoYWbK/jqdFgtPxLa0rpO7Co8qPefL0QLmy/EFEOqAiEA4ABQMNkFByn5rLJoQ7NB8hOaWIhPvRefGxm0RB8uG6A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+7bpCRA9TVsSAnZWagAAjw8P/3RlP2k9xJfJfed2W0xR\nNR+WNj8D2oRGQJeVKMOpNtHC41sEHNJqBEbJAPeRUDilWHem6T9JLMwQ2hFt\nhfDMR2gF4/i/UVgJHd8K1U65Kr4ISYvdXVnjXV5p/xrKsYjlW1jO9t53OP4Q\n6Kmuf1unhiTZZvPIDiBQPsZRV1rafZ2MY4z/KH61SfEFij2qaKUV7DGw8agZ\nit3R3RhIfKg+NKm7CkSwo7tt64LwjnSoYYgt9NKB4qmHmLKkBYfWRnsCY+Ci\nYpICBy6+E5nnDk2JCcqn11q7cFLVBITnKMaTAxnile2uJaATsPKQ0BU1jPj3\nLXb9klxWnJmFyi22ByGZKu6iElu3FM/gno3jbPgxRA/rEc+3PpzY9axuLE8I\no41+liXAEQHqd+pJc8x+HTfGOO7+V1sZlPkCOWULLAu1UI5n3ffoKHx6lsTb\n1vWtmucaIg/GcxGWs9wuvOBs67yGOnJWfZrSO85IlhS3Vf6yBzyg+4FQ6M02\n/W19/UlyDzPaDXj2WUYb1j8iNYF6qnTY6QmRJMKNXVN0OhXysO36k1YDERWF\n38ffJ+Z+nTcJGRcdwI3QkqNcjylrlhYpUsCo3BRzv4FpgiYoKFk16pJLCAIX\nd/44x+Q3hHi4hXNUJi770nbAMMofcsMbzOgt60iFTLHWSDhEz6ZdFLszz+WC\nKmEw\r\n=iXp0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"09713d47c696830472807bcd5d1b9d8a8dec3417","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.21-truffleLogger.0","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.3-truffleLogger.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.16-truffleLogger.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.4-truffleLogger.0_1576777448985_0.227239839819122","host":"s3://npm-registry-packages"}},"4.1.3":{"name":"@truffle/contract","version":"4.1.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2a1a5197158b1e40874aa237d49d2e6c73e7b641","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.3.tgz","fileCount":42,"integrity":"sha512-F/XnKX33NaRW+EDycawbYrsGL9Kn1bFrWvfQUZPNBShqd3d1eFLC6ZPFRnMScqj0J68nYDMSi1gHKcHgUYJRiA==","signatures":[{"sig":"MEYCIQDZkYkxdG/f0IqJy1ptdrr6SzThCMXcoDndMq9JovG6SwIhAJ3R1HbEqWDstlbJ6lpqGp/bCTmqhjMAFr9G2pAdFWyg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5699681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/CGzCRA9TVsSAnZWagAAsZ0P+wWFxmo82WWGwb/My0KV\ntm00Ysk//aFa0lWU1NN0T+2hJHNH48rdTRrWu8sGqm8e6nJs6Hw9e+breivs\n2VySdVwihxSEhvpH2NuC7dFT5YTBzLEKJsBfsRmt8ia3XBzXf+Ixf2KBLy3z\nLc06atlTvn+/OzmetMlw13tIaaeyOJY38nJ1Pep45mEpwAN5L5X7fGMtZeAB\nVGw0krq9RL82cxkjDNCIxF50Pc8tfcBmtZMsKm8dPwbRQhtM89t9yBhNkPqD\noboeO1va+FJQlTWxWugLRV8I34ntGjsaaJWDX7U+XSkLlxtYfMwDEtmptNRw\njrJxHLtqhkJbz3y9XiBCasRcbyaslifyQrGKJCB5LVQkjcHNm6zyuciYBT7o\nR0CV0GbvOQy2n+lehektCt0oCvLR5fol+G81nL6J4XaLiSdf3B5FD4m56JeC\nssa986SHv5JE0GCGXimfqzKsS9UNyR/tXAcCcpocih5s6cjJZM1Z3OV6V/TI\n6MgM7C73z14nqZb1y9HcCxAGqlhb0aCXxQi3fvmis6xz2DO6UuUiPTYE1nDn\nfryCJw04LemTz+Sgv5kPVBM5VwqQLa0qMkFvlZu3UeqscidAnJB2gU3HTYO1\nRwzYColmQ3kWajJAw4CBh9wDLJ20tcox03PKvMNRXPYRMZUlZvkhZAuvbVCp\nQmog\r\n=au7l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"0bdccebb19c625d8fdaf16fcce57ae766583e685","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v8.16.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.16.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.20","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.15"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.3_1576804787253_0.0794773793165553","host":"s3://npm-registry-packages"}},"4.2.1-alphaTez.0":{"name":"@truffle/contract","version":"4.2.1-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.1-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"fee34363a0b4f7d85b8248beb799f3e34dab64e4","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.1-alphaTez.0.tgz","fileCount":42,"integrity":"sha512-xnnxFjmzJfAaoENo9k4euRxjIHfbQxa9Su9VSkD4pBF9e0YGpKqMiehj36GdJNsOu9l/TqbocfKFKmBBbiwoKw==","signatures":[{"sig":"MEUCIAHrsFItOYluqQiAusoWmS9ijZRlDUkR25IlnDcFBeVvAiEApOMPpJwE2BTrOR/OCPpFFAeOgeUWCJj1K2uNtw6JpXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8145706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE9GwCRA9TVsSAnZWagAAYBMQAJCe0/If38Ad8f5y4lty\nDKoh9gSgKg+AvMm074JuPs6LQV4OKwwaFc6hqSJzcRscmvfknP56tEnUx9Rp\n+DLuhhPTpnpCQsyImj3bxbPD7Mxx/RStubKe5Yz8h1SFFpR8Oy0z5x3SoJRD\n1Q0A040M5+jGqVI+Q+yoQ74V7JcwmTPAFGUtpf/R24T3mjD7b18OS1nn8inL\nLwOzqig2HuMUVyl+4pYXtgOyvmCtK5ypNPFR4GHzVl89HZy4XiBwxWn04AL/\nnvCHJxEfUKRDCxpbIz2+2wnLc8t3zsycnALT+QzyFerOw9R72QIadP9HSVrR\nOyFg5dpVV1ankwwWNuQlNZWg/3+t6L21heGQjL9jwxpo8rO829pRArXPpmB/\nEoeD2BvL16yYaaasm6DMXQpek4V9NKiIY4ks5yblcEK7KGtUMyGeYtmDFJe1\ndvDWxtPx394HsrdqKSR/7ph3F00AyIrgJYnIHXeE2cleLjC0Fl3fMnvpMMb4\nkojd7ytOXm7HOlmrntf8Qum8vMOUSb6bV3pMCivaDcyz7Ufj6bfyAfxogzrC\nqpXnkxitinL1sBuoGeR30hmmINXfGXBv9MNRjbuhil9NeJ/Qnib0Qjjd6byf\n9W/BxHg57+l3Ov/DtNsMxrLTMiSSE3SLcxwWd8LD9mq3tJO9+vj5+EIWdfag\n3YEn\r\n=uH2Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"8feaf6fb72539e93f1ae51407fbeaa6f66c73317","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.14-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/tezos-contract":"^0.4.1-alphaTez.0","@truffle/contract-schema":"^3.1.5-alphaTez.0","@truffle/blockchain-utils":"^0.0.20-alphaTez.0","@truffle/interface-adapter":"^0.5.1-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.17-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.1-alphaTez.0_1578357167579_0.5722285067643722","host":"s3://npm-registry-packages"}},"4.2.2-alphaTez.0":{"name":"@truffle/contract","version":"4.2.2-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.2-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2fda2979dad93a88e1e152b4da684319bb5100bf","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.2-alphaTez.0.tgz","fileCount":42,"integrity":"sha512-MwLZ6VCAeflHxEXa42EhGlRKdw6SNp9Hx/ngKmq4cs/ymq4YeMNoAdpsY99QMPS9aQsb88MaI5Zz20yi4lhXRQ==","signatures":[{"sig":"MEUCIHHn9Qx8DIOKcqVqjK3ee+I1RCkHvN/mP/cmWAFFoQu7AiEAlERcImhecFqkldCo73A72L1PRvoFX4Acka2OUhqTFgw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8145480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFO5vCRA9TVsSAnZWagAAFhIP/0CHPOay94BxOvGMzy5p\nv7pLCIt9kVtHig5ZcGQE2LEsEoC2vHlYpwgXrtgxYiCqCOjbEfGQlV0BgFJq\nuTvnQYDQ499vRa5K+H7eCX7jwjt981aqEuflg5uRq+laTJHUdhXIyhopoiOo\nzRHdoGb1IgBL/IyxBDr3RPnfvuDE1RZasrdXbNWwcrzQ2VX0xkzUcrJBrBHs\n/Iy6QIgY+iyhX5NQQSNaeoqoifvzI93iFKaxfvdVP41waCc3bt0C7nhYq0mI\n0EOyjd1M4R6KsQCJ410058LsG8WnzLOE5ALGm62q6Wu1KOF7zNJShWxBgG1z\nn89fAFjOUBuw7hy+jK0GCoKw9NB9c8svEKXI5dihdjeRHIJRxmNzR1FYG+IT\np53XBy81s5sUn0e+y3bBMZm5TF2xfEu7v3Kc3qhDgttJGK2lqYEdHzDA/9QH\nUOJAu6WV5hm6YI40K5Y2wORAeJnhcrM+BAWm7F3mBQfyicm+ZVcTBgTJ7XZv\nPOs9t4TPjLI1rI3Y+j3/xk/k1/mtbzjTfPLFkogKGDDnaNRlATAR3pz3ifj1\nlCfnyX8VbOQr3O9sFrm5pcTvZ9l+DWduiEPT0xyN/wRiFSq5M0hERXs4jMF0\nDxmI8R/tPNoCjPrQ4KpOPwcn3gkt7FD6lvT/xJGj213s0WEDsU3on7JyWrOT\nXSTy\r\n=ASWw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"a960cdc714cc48537460a32738c06222d757f23a","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.15-alphaTez.0","web3-core-promievent":"1.2.1","@truffle/tezos-contract":"^0.4.2-alphaTez.0","@truffle/contract-schema":"^3.1.6-alphaTez.0","@truffle/blockchain-utils":"^0.0.21-alphaTez.0","@truffle/interface-adapter":"^0.5.2-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.18-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.2-alphaTez.0_1578430062802_0.3559260648112026","host":"s3://npm-registry-packages"}},"4.2.2-alphaTez.1":{"name":"@truffle/contract","version":"4.2.2-alphaTez.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.2-alphaTez.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1438d3109ee3af1f9870ee00166af3f17eb69abb","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.2-alphaTez.1.tgz","fileCount":42,"integrity":"sha512-0oK9XtHabX6xzYf/DbzODWHRr6UAnHOgX3IVmucNxQbtl2Sk4hQYhLnkFPN+azjcRzZWVCpDKt9hSrDpoJXz0A==","signatures":[{"sig":"MEQCIEd3rnX2OeyihQ1G7p+ZuOulkgZ+KVwILzteiGHMi2/3AiAO5nxq72gOoYHLKyJUg5LAOLP1HKoaNB2K4SQjcTKIWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8146285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFlBCCRA9TVsSAnZWagAA2jcP/AkinSxilszOloBJJaQd\n9EDrXnIHo6aDsWqpyYZoxkJYAZA170Kd7KlbabEEm2lJ84qBYwvXd45Ysy49\n8BBZ4J2RiidmlxQwAw2+/zOFCccEw9nQXlq2n3qDrKQB5fN3Sux1xFAVathW\nKGnmgI0UIICjIvOYJ4N9Vma+nQLZxR3E54d1n20ZdMoKFQGka46gljBjXnQJ\nCTMFgHridI6i2pVDE/0FR/wTwodt/L8T70wtyzphpunOrnZW3jHniJiTlgaE\n4Z+RSNtslrawJXSEsbqYHzcsedy6RZhqZcQXo59cc56xAxJDNyNpbeZ3usDT\nfsNK8ZBdodXPYDKyee9gLzHd/1RC0tziLUFqRg35y3ZA2c57x/vOC3q3WFUE\n2aybHN91XreS/FAY8GpqrhGfVelKJmQ6iK6iS9ot4FmWSqva0GQi/VewIzpy\nAoW9LO+x5EMrlTS0UE2l7s2SmVBejBMrtSo6O6TPpbXX3pVUTddqyqtW7t/y\nTLimovJynJjl9abLrrwoCd3tc6R9TWBgiGhRfonA2l5oiTLgFK28xuYa2Jtm\nj4p1yhtWz1o/Bl0RU9Z3kN2XkpYwd1vuCKuajKfp7SSxqt1szm5I2X+cD4ET\nDehvXGZiwNKvJzRDiqNfhM/V3Ngd25qCG6jKRxBVvbuMunQRwAGAMar7ORzb\n3a91\r\n=lLIv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"b17faa2e241cc504df4244a97e2869f55d31ba58","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.18.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.15-alphaTez.1","web3-core-promievent":"1.2.1","@truffle/tezos-contract":"^0.4.2-alphaTez.1","@truffle/contract-schema":"^3.1.6-alphaTez.1","@truffle/blockchain-utils":"^0.0.21-alphaTez.1","@truffle/interface-adapter":"^0.5.2-alphaTez.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.18-alphaTez.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.2-alphaTez.1_1578520642034_0.5645623765089354","host":"s3://npm-registry-packages"}},"4.1.4":{"name":"@truffle/contract","version":"4.1.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.4","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7c839edd282e1e000225a7e49e8251193c5e3087","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.4.tgz","fileCount":42,"integrity":"sha512-pBwf7pYNC5ikx0XveO6ogNmAqVpjLMv7sNGme1i91a/l7zDM2jYshjd4XhS5nUVX84+VU9zcplXe0ehgCEiVWQ==","signatures":[{"sig":"MEYCIQD2ahXCEnd/G6mlR7wQtVm098l/sxS8xhblpRxe/F6PVgIhAPDu62I94aXbZXPFFnJjPo5IbkBHIaHDL8fOTl2GUg6z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5699573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGMK2CRA9TVsSAnZWagAAKVoQAIwptkyGLl7FR4wLoAzt\nIH7WMYY+khr0it7NHcWhNwnohgc6DVXhdMDJfGCTx+3M50VFt2W+DzNznwA4\nvFFXOVwXpN+xaC9z6X+IbgYnjT6VGfzavQtNjDeC1vCE//ubmlQ2BC1c8aEC\n6a1vQra+K5O5fiaoGObRMzS0rw5GcS/ub36r2Y+vXjDZqxdKyeqF5zVcse63\n7dNO1QnsPRXfmyFV2kV474k3zfKbaDFUgt1XJlcOhTUSCxhiuzS0XxE9UuEL\n6uHXCwuv6mMfQg/ah9PfDzXuuu0D42MbUztczY31p++6nV/0C5fC31jPlBgL\nIvrISgR8bNUW49Ir/0TtPG7MSjt+/H91ecuOOup8flqgS5l7MY0TcA2Kp7T9\n7l7nMDF2aYb4Xzce48WaIhVkA/Fr+jNeO3mfRGdrUoxQgaN0TBDTqHgtbFzG\n4ruSzz2AAWrucMyqhP1ayomg0pDy10Pd5pddqoCJGobuOe6jYE7sfZ+ghjaC\nrXHOUXiXrmJZjNSHxHEe2ninVN4Oxhc3Ng+6QmKigAoBWvlUTT4tEBbKAzMz\nuvpu6qTK62DhBHegoRzO7FnoDZyoN4bNwz1Wb4TzqL+p8CHAykvrqSvZxap8\n/dmZUG/YUAOJ3H1+9GznDRaoIhWmcSQjQxLAkHgl9Bml0/3CHULb4WK+svg1\nvhYW\r\n=ZUEt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8a599cf0ae6717bc06b6f2561c62a84594c2cebb","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.20","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.16"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.4_1578681014207_0.901028050017255","host":"s3://npm-registry-packages"}},"4.2.2-alphaTez.2":{"name":"@truffle/contract","version":"4.2.2-alphaTez.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.2-alphaTez.2","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1468b11026aef0261d2784a262fd2dcfed4fd191","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.2-alphaTez.2.tgz","fileCount":44,"integrity":"sha512-Iqgi8SiHHQbuH/3Pgf6XnyXzsX7gtvSTIKP6gu/gNzknkPaILNmCKlvdCcdlfSmCpyURPIq6ckkuuo8qxOELyg==","signatures":[{"sig":"MEYCIQCLUm5aFMbm1Qvnvthfj4kAl5M7acEDMW8OxOvqVhH+jgIhAI31FKC7bWa07rMdMM47JYOIjyWZ+hPCBJ34IuL5IUwd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8661803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHkm8CRA9TVsSAnZWagAAmTgP/jqaISYj6u1WXn+Kx5gY\nLwXqtjwYzfD2c0WrnSw9P4wnLMWvuJmAnuzTAKfrEb+h/a8EIPFi3dzQyypY\nEZyTPXjYUsLonli59sGym0dkNbM5pijlFxlCVwseAFTRbxUpmt0c4nORbNJ8\nFrD1ZTC4eM8YvKaTKek2sCEFFtEc2zaO3FEim3OAZuNlKpRJBI8mG1wfg5UA\nx9abNXopau4fri9ZsJYL5dZf7faORz07JP4sX0gPkdmvwGfCMA7u5PTap9nN\nrEswoo1FCRqKPb3PmJ7G25yR6GHb5oB8e8nT7qLLynZdYFS6wACWoyf6u7S6\nhQkcDox0Hb0CfZbTCm9NtZU1+zit1Il4QHJMSWe56c3tbQMYkL4MVhWaU9rA\n0aW+j7yTbw+b6VQSuUAjCh0Q3pOfDQa/WP7yTonlRwzrqXtz8W5TPgLIrRAg\ndvr7zDJCKwRG+fF+5zpORZo1sudTqojRs4EOa4NiT+p4UXoPfIjLZMdi3rYa\n6aWezOFOELatngoh2Y7I6tAjc+KkWBeKP2cwikVhwnZ58bBnxLnl79CTFkAy\nmFTgDxWvO0dBrj8R66/1cxKrVMHf1lDB8L1rqbPvugw+ZiHFMEUtmqtmFIsx\nMNiUNAKTogpT6xM/24lERoyoFRWO9OYsfhPmFyIQndGGKSEXjT9zYLCfHdkG\nif+t\r\n=y+Ui\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"f2be8e62d3f20d1e8d731cac4353d8ffeb233fd5","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.15-alphaTez.2","@taquito/taquito":"5.2.0-beta.1","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.6-alphaTez.2","@truffle/blockchain-utils":"^0.0.21-alphaTez.2","@truffle/interface-adapter":"^0.5.2-alphaTez.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.18-alphaTez.2"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.2-alphaTez.2_1579043258990_0.0655324614788555","host":"s3://npm-registry-packages"}},"4.2.0-truffleLogger.1":{"name":"@truffle/contract","version":"4.2.0-truffleLogger.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0-truffleLogger.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"cd262aea0a7c3932d535bc6dbde2587b3a1ea75d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0-truffleLogger.1.tgz","fileCount":42,"integrity":"sha512-z4ku3f4cdn77wX8u6x8OdhUTbC/pSNEAmjnIBzPT5pDcVVcDjOBRy/aDRIBEP20Unw3eeEBVEyazfNJ3r4lTtg==","signatures":[{"sig":"MEYCIQDVJ7Tu957DFPAgmiYfkfXiRmLGjRxCx7ENtCVtWZMO8AIhAMgFyxKGyWASTQgSyd9X7iDIbfrubaOlWG07YEcZlBCp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5704023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIJfbCRA9TVsSAnZWagAA4i8P/R1OfXjeMqXr7oTL+bKo\nRyIL7W2d2vmxOfJOC9dFi5MGMhUMxmlfkKxp0BkEpkTo55Fg/96LcJrZi/jP\nnzVq3qupqALjBQsXLnSjNTfe5oCJClWSZUP9f8veM4+LrTAWafAWyP0bm03d\nCbV2sBOPnpSswX9i8CwKBGYHSOoR0BthCZaYFwwwJHiQn23n+pnLJkU8k5U9\n3Sfh9fuwgX30KjvlAhtJJ/DZ9xKzOq0O5Xx+2iVnfIgkxy4OFGcyf0GdWa/E\nJ4cjhmXcQGNE1p5C10fjpL5tDYf1t5+0TOX9eY1e9DUjKbfE1IyJN+S/NB30\n9rK59eMbx2aP+eTlx2Va5l7xNVD4m/hEGV4MzpduNOEEYL2S1QoJy/2O+9wy\nfAMgNeLtikd6hpzCMnFBaezBdiQ5ZdTBgf3BdigCa6Qq4ryCwpb4kpQuytnO\ngGtEnC3NJ/c1uB7WGHD12x0VJk/4CB0xSKmnH+hKC4l2ddpZldbBQY7T5aoG\nm3YOigfSdv5vR8dxdiWX9/3iG4X4WDqb95iTl0UzAYtu/3kSp9/S/Pz0leYe\ngdKArp2jB9DenW3DAryZm4Lo6+miqhWXnrlZdXrzP1nL55dz8qDBUz3T8qnK\nBPaPJLSohC34A2yPMn5VY6R1en6myhlSm+977YuXU4QoewytLhKejkf79c4t\nohIW\r\n=N+vC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"7bbf50aa51d495cc3095882bc16c74efa4b4f20d","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.22-truffleLogger.1","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.4-truffleLogger.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.17-truffleLogger.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0-truffleLogger.1_1579194330660_0.49376597782503695","host":"s3://npm-registry-packages"}},"4.2.2-alphaTez.3":{"name":"@truffle/contract","version":"4.2.2-alphaTez.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.2-alphaTez.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"64b1af479c22aab0403fe7c22601c6ed79396e8a","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.2-alphaTez.3.tgz","fileCount":44,"integrity":"sha512-5RGiI1KH3aGGfafR6SyTrA66zzVhpKZgq4P9IBt/fZ0eZPkWUbDD4fivzEnTcCCq/BL25ZIJda8yji24nLnsVw==","signatures":[{"sig":"MEQCIH4OQ0sBj6VEaUeXjbaM2cQECHm4rwz4IqWmMtu2Ph0MAiA6gjzLcxl8/guuqcArmGWERqMJoJDoZHhfU9ocsVv28A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8662983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIMGhCRA9TVsSAnZWagAAx68P/if7VwPGwbsoEJNv2BVy\nEuLXUTSCfr9qE5kzP9dxvM7YmPuhKyxUzPN55VS1So29my9kqEW95d7S+7FX\nfJWAmwyckTMNc9geo0ZRTqfPN2b1V0Z/+Ysyk/Xp9tu5uQyBw8AxrhmNrlCI\nF1upM2WCtyN6xHzD781CBV+4PfEDg5RG+A/fxED7i9DQC+DEm3cNUvdtXh4l\nmhPj8vnB/vIM319EHtkYTHVthUipqNsip3PDPzcLZfDJMBbMWRpC1ExZAxtT\nDs0rgBAjysttBrrh/aQmOSpn3MZPFmJybRMGCAO2eRYq5HCjaXrRZzCWG+T9\nV+6kLJyJkqEYsibSWOkhkZPtovFvghgrgJKYgliDMmNjNhJUQCHTN4qT0qB7\neH6PRjZ67Z9DaUquavPRFRmK63XxdA06/acgOuPHJ4uSRK0b6D/wgcyV5SXh\nDyl+ia79ON0n0I9fj58wBbW0+HAhhF7zlk5KWR733uU1a47LmiV+A2/HC2o2\nUbECBgz6I1g3yKHtmXWn7OUo6OZT7fqLG1x2AnVMGZ9beHmNu3Jv5P09Rilf\nyBUp5s1HuH+j04OpAbrjT9Cb2IrxbP880/JiYaNgbKMH/lM3S2lIBKQVW32a\nNxuZH8U1GWnlltRkYbrf3OxTVFkXfErmMITnQEFjdAYsCIMqydKiVHFercEH\n33/u\r\n=TL96\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"d29ebd9d610cf07fbd046b0a19bd6113916f7ad3","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.15-alphaTez.3","@taquito/taquito":"5.2.0-beta.1","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.6-alphaTez.3","@truffle/blockchain-utils":"^0.0.21-alphaTez.3","@truffle/interface-adapter":"^0.5.2-alphaTez.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.8.0","@truffle/compile-solidity":"^4.2.18-alphaTez.3"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.2-alphaTez.3_1579205024900_0.2875550333033634","host":"s3://npm-registry-packages"}},"4.1.5":{"name":"@truffle/contract","version":"4.1.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.5","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c0fd43f770bf28fb9034f7bb7992580db474267c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.5.tgz","fileCount":42,"integrity":"sha512-aHEXDHoRqSvqMOCGLp5p9PxO10KuxFpqeYJFcJ76c3P4pjGRNP9pPDoLGVsK9yCveHFvxY7tw5JwTd8PJKyMhg==","signatures":[{"sig":"MEUCIQDlPIMcrtHas49R2oQZLiRVMPV4ppijXBg49oVN+RX55AIgQCh5s5omwU/+IcZMKmS+ckMwK3VbpLiorPZRyO7t0/8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5699681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIgSoCRA9TVsSAnZWagAAg8IP/1MiFKYmkKU113+dT+ks\nzNCFTHBzMIupaavOHVzTAKEXqTVWSOshOC3ggioy3uI4QVNTcmjvJGjONtX9\n+puijF9cBbMNHnUrpGo/fWpJcJWvbwuxGxvUp3yVQGplCDagfhVSJ+7MIHJB\nuAeVAVyaW6lFXBJvUrpWJgbgMMo42MP3CpqEJ+FMZ6Nnym01XULXnjjkRc3M\nfzomTq9edrqWa2hPIUOe25U3t9k7gIb8GyS0Txr6uJsZUXyVTN8Fq4BXi9/n\nu7yIolrmqK7lIjAb2oF8z/IEV64+lVLIQk1KFyCsSOYC6b9XJgkfpwQJlyeh\nIHNAlbwGXjDmwv0oxnGDSt2fjaFwm8OW3pBhhnbSdRV8cydSzPgrLgyD094r\nXhf8zK/MMBNetfFJaLL1t1xkXYQbkjo0r1/sCYyOEmHKcnpvYhO+4I3Gk8p+\nKi9/FCdKZRAwQfuxQsQoqgWpZOmkKWYIt1jJyaxXqjxXgCR1XkZzv4oD4a/+\nDxhMyAAS6hVki+AyetdTepxMsgo2liJNH0/l8kn7yCUQzksqVMVzDb6W4ZJ8\n1+FOI0mkBF4FkNB1NyZO6c1uEkNxKxtjLR8X+DvHIky0wnEmxkV/n1bxwEWw\nRLHvKgvAxM9bCyGdhW7OADsLslHqNlhlo253v4E/oww+zbeu90h84XcZnhys\n3BOf\r\n=GUTp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7c19713c22a512b6a7f936a6927ddb553836d56e","scripts":{"test":"./scripts/test.sh","compile":"mkdir -p dist && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.21","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.9.2","@truffle/compile-solidity":"^4.2.17"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.5_1579287720098_0.9233432463326208","host":"s3://npm-registry-packages"}},"4.1.6":{"name":"@truffle/contract","version":"4.1.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.6","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3fedfccc8cfc5e19440ea336301fddd86db2c077","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.6.tgz","fileCount":42,"integrity":"sha512-yu7+pOXdknugOQ0Jr3vSVn0JDwOujHo+5kedg64z7b2bJ2DgY+0c7vT7xdwMoa8kFIKWVsggKiUOuZ/zyudOZA==","signatures":[{"sig":"MEQCIH1J0iGAJ0cL4G/CN/Dbp03TqLXelA6uPAf67hmWaAt/AiBopDz1VLgSUknb8W34EUm8NCCckVVii46/rlk17UMeSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5700018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeK9fsCRA9TVsSAnZWagAAuZoP/2y28/cEw/UEztq4T/hH\nFsD9ZkQFbBWkVkTx8BeGg4gvgURkitdbjU1XDumHmjlppGocNDE7TorM3N9Q\niuEJ8r+j3b8QrS2hY+zDXJvk/5RB0LUfTVr7jjsIN/0AWMFn7WejeyJ4+mfP\n0DXO7uW28QkDgOQ/oUCoyjX4PJvJLxb15SIk1c7MvnjuaeOBEGpsQYRICvw0\nUvYRGcShvebFzyYeG2KjTtaSjpf+W/ZkfbU8v3vImrWQROuRiFoXNdK1u/Mu\nz0R5XdiS6h793j7S35B0Lepk2Ipe35k3653qTMgtbe3A0YgRnUpC3d9Dj9yx\nI/wYRRyPgXz74KYfMKDlM5TJPsQVYGO427ixwG+CHtEvJ/HESaDDguIheZCw\nj8dR4cMzSUBWhKopyRQfvTxse54Dh70vRGspZ7wcMhgu5ZfHJAQWLHxcFWQl\ndlslVH5lwfZk+5HgkIffgO3mJWfxlvQl5Pw8I4s86ZSB7fwH9wo90XQqHHA1\n1WQx4SQzpIqavphc8A88q28Jnsr3V35vX9WJCpfqrLugQO7eaPd4t80LUATo\n/wtn9Rs4i0cu6rIj0YZvhix7jA7mILsIGM13p25TwnUyZM3XHzs4ZK1WF+Yd\nw8PWUvutnkuRdXxSkIZOcBzmh79P30lIGKugBez0lL49X9Mv42vEE8hsiowi\n1JOK\r\n=VWok\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"3966d6cfb0ac00acc8a062e9f72152cd7f8c0352","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.22","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.9.2","@truffle/compile-solidity":"^4.2.18"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.6_1579931628142_0.44644665055161714","host":"s3://npm-registry-packages"}},"4.1.7-alphaTez.0":{"name":"@truffle/contract","version":"4.1.7-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.7-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ad44eb4ddd2cc6f22bc70eca5a1a07dfe75e785e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.7-alphaTez.0.tgz","fileCount":44,"integrity":"sha512-44hxPj8hmbtddXiUqH2Lt4MOywJqw6xsyVof1TMhBVsIJ2mB4iABEM9sMsV/fmEbMb4ZUzR2+A3MUGkAQANXSg==","signatures":[{"sig":"MEYCIQC4iSsAQDBXZvpksTjGemCv9uMs09rXO8Yh0Kp0El5RSAIhALE4v+fhoLeRzW1oEJBM0f+QY1YUu6PO72PIl1LWFlw2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8721112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeL64+CRA9TVsSAnZWagAAq9cP/icqOu1gdRPYNDB0/qXm\npkPOgaYifSb9hcJPHG7/t4G89L7Uyt7aq/QIdYTG25/Wp94GNKMDXbNPK6+C\n1yFtTSQRNmHgOf9Di9QdfB9nQh85SuwL2NkeF2TjZQrC3Od6fOJbaJL/nTHy\nj9dctQqInhprt+QyGjRpcjYHzVinxiAwmLmWA91LD+u+9FnMVJ2I+16M5Moi\nlY6trJh0OnD113yG1/HtWfYrlPRuEa2t3KT2PGpMHvKuXrf8diNkuhIH1Myv\npqJO3cT3YVScbPwTz1cpr59c/VoyoRpsAlJ+ZM14zwY5b3WfO/6QfI0Dl+FX\nVP8eystDsPhSpMA1orBNHTXtk9Iv+slJLYbgIBCHYT2mnmRHj3yetAxcCWFN\nxbNt1o2RRH/EV1g3v7OCMpVbkBJJ3wOm0uxdhPH7qMV8IgYlfMtzmaylyxrW\nR+go96MIel2iT7FqWjGVBvtbDOTQxHqTdmIcI+y5uVwlRUZbc+rRisaZYxLG\nx/aNbY6c6aSBh5Yb15NTCyae7XCwcb60fsiF9UFw2JtVNRN1jcg4qGnAtDrn\nlferB6PIIEAkSOOalT9/Eh+TfDZUdy893kV4Oi0gX4fykGDtRujTY9g2IQ2r\nlClyWkVs+nCsWP0w4q+NCpnd8B2ozu5LiCo+NDd0cECY9bLjMBaTa6rcYMr+\nYi9H\r\n=jj63\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"b6072967c1d19e8fcba879e2a55607e704f64273","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.7.7","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.0","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23-alphaTez.0","@truffle/blockchain-utils":"^0.0.18-alphaTez.0","@truffle/interface-adapter":"^0.4.4-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.9.2","@truffle/compile-solidity":"^4.2.19-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.7-alphaTez.0_1580183101584_0.8008308715351002","host":"s3://npm-registry-packages"}},"4.1.7":{"name":"@truffle/contract","version":"4.1.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.7","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e290a898022cc3e0badd6ffb3b445d2f69845e43","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.7.tgz","fileCount":42,"integrity":"sha512-FJyhj9IrDqA948ZiDw5ItIUxkH66hypDgpZOkAQxJV608JOwlW3rckfQiBkeWLZDoiuA/qJ2m4VQrD16MAzgwg==","signatures":[{"sig":"MEUCIQDbLIWjT9vHIQQQHvvgrOs3AgX08/QuanLXh2A+3RGKAgIgCCPmnar123vpZz+jJ4bs4Eyf5OhgTsXMaEjAMuTqU/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeM0+kCRA9TVsSAnZWagAAvS8P/2NhlsOqAm9lkzcedsY4\n3zVhhmpq0RJM/UQnu6E9noR2N5i6vBdMGZMvnmxtABCM08DXcAErN+YstlB6\naLgsg2ljTtBFHgaI8wtsilzhIe2MnCZPqjp0UvgJ5dxpe0nu/8jtAHroIZs8\n0KcFxaq5jlulrt/bsUJx7QvW8f+czusiivTl8x6ROxm28iPkXC9ONUhg4g5r\nK9sPufsr5Ch0ngw037Jhg5AnI3Ym6dOEVJnMQuivDd9sORSaQnfl6JtQqu8t\n6sg4367ineZAe3LzawMt4D5myChZ0lnMGMz9OZ+2djHW8U8/vPXMM6glX49Q\nsm31JXM4Ya23+jJME5Z6KIPT5EUGaH+0Igtsbmu/n5prOIalpz9oC+YWOcAn\n6fgpUqf7+hNOO4HO8ELtuTZVvlmZBJiK+7gGa4wmgr16KpQxApaeZ5hAeNdr\nYgsGmbcFPdSq6wqT2sWpR4KitDJiZal65xS9GNYHStwYRgGEVY5R55VIH198\nU4mNJQm83qkPmZaDCPh1EaC6j5T6qyrZ1lMWoFlA7dIegknxGtigwaG+RZFv\nUv7C+Cm4Ii8S0l2h7EdcxwrIzOTiApeZbRk+bWyxy4i2qA+eR5XZsKtUa91j\npmiVBHvxDxQVPJe3XIJq9Sxjn/MJVHM7LDU/QP6vnLOjejjYwvAp43nJuT/b\nS4AT\r\n=HZUj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"1bc5b0427a19dc43aba335f87db25c7a928f3768","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.19"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.7_1580421028343_0.2495348852243171","host":"s3://npm-registry-packages"}},"4.1.8-alphaTez.0":{"name":"@truffle/contract","version":"4.1.8-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.8-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"623e61c76849e5f2311ca0c6dd8cbed098d6e4b8","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.8-alphaTez.0.tgz","fileCount":44,"integrity":"sha512-yo/bgPh9Pwv/Wy3CL7LBqp7pEjYj3U4n0E9/WSiIS1BKeerGZMm27r0s6L98SMOPvCl/OkeSZfjPuft1YOoVNg==","signatures":[{"sig":"MEUCIEl8MRynIrU8EOQmc6yvCQh5atYRDJ2rEr5yBXFRbOmaAiEA0ly52Wh7LiKi2FjL0nhEfiNFeG405Id019QcPEnCXFE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8723760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeM2xtCRA9TVsSAnZWagAAANcP/jMNmibCwyAgtT4ZMwnP\nxatDlMHj3zokpEuXzpxkBSSN6JknVf7cg1yWOWpGpfErge7WmBPGYE02bFXY\nQNf1FeSbDX3jsHj25w3IVI23+XjBpb56V/Qqd+USRv1nP/SCcgcwQlD2Xy91\nmmbk8DHJ/6j4Ydbcz1QlT2XyFb0aq3WVTZFBPRQMLOcXPxqlRs4tpbWf118o\nQX9TfKIwNt7cW8wZdT90gGGElf0nj8+rdakLTmwH3aPRcLc068DGNFeo/ZrE\nxL4BfM+wRsrrcRxK8gFvCPAc0wTIoZIe95B13yR5S3W/87MNbWI+FMQ2TMEr\nQ9WAmApqsGsygWU+qP2gxgBli4h+Ep/RPsifrajbG2vZXMsZr5akEKwrc+RM\nM5v4PWXlwD3QAwl+leCzmODckvZIa20j2SIsXI7eEn8ZqOneV+jzIZMv5D8L\nHBL9V2LKCtu8vlTe+grAXyII3o+dIghF9V1Lh49LdAig40/lnrZwTRyv1DDQ\nedvYSo6gmqYRMcHGCStOUUVxmcJUzCO7rIw6iJdnelBfgaMoaQeJ1cOPFVxn\nqpp0Wn7AEvO7O/v/Dox7OdvbvDxbPRAIhmECu1/TPM3iJzv0n7ZUZigHXX93\nRR5trY53B0zkNbVHon/nIhPwf+f7MCkC+NJdq8S8hwHpOimlm6m4gTP8qYc8\nzUBy\r\n=FFSH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"9b77ea1f1400960dfb6735c1310646f612b536b2","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.0","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.0","@truffle/blockchain-utils":"^0.0.18-alphaTez.0","@truffle/interface-adapter":"^0.4.5-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.20-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.8-alphaTez.0_1580428396555_0.35529721971750594","host":"s3://npm-registry-packages"}},"4.1.8-alphaTez.1":{"name":"@truffle/contract","version":"4.1.8-alphaTez.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.8-alphaTez.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ee9c12daeb03e7d3243d989242627189540d7ab7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.8-alphaTez.1.tgz","fileCount":44,"integrity":"sha512-R8Dp4PiWetfoB5WpJmsHTGr8POH5Nu3HbF1Ql40kYlqXQEswsFHHwSpEk/4qzWmclHIjWxf8IDHovrPeFHiYig==","signatures":[{"sig":"MEUCIQDA1v5bdPGB6c5S8RxFRKSTDqpZL96aSxEjN/Ll9sJi0AIgNRm6dFm/Rb6UBqgZJFSb5oT6mHIa6UsDCB41zYtdOhw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8723760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOMy+CRA9TVsSAnZWagAACNYP+QBlCxAvT9JAHT+GU7V8\nduCBbqDrYtBMetqmQ1aPTh5Xm9GnyrUmcWaTzQisJ5CI23t9r3224Fd1Z8UL\nw4lUAhzZUHRP8jK5Ziwq2VXMxqS9Db82l70K3VOSFBj/WD1HIbSm+Z2t3roe\nwvLa0wJXZsEyiivYBB5cQ9gUxxG+QL2xTzZU7MgDM4EqkC00DOFolinL/q4l\nWX1h9FairjvRK3ID9IeSSzyu1Elm7RuTW/r4XhRq/Jo657EmGFtPAt4FNi8N\nrGIGljKlsJp9MVZtnVWOYZVSWgIAuQ5Hce5UD2PAVsUQhOnP0Oj/ob5AnxZz\n1f2zE0AxLIdOb6X+QRZjBJMYiqYawLg4FBHrj5UnihLPlOqGY0XXfh3kdOic\n+K/XUFwvBCNCpLa8RqSchjklPCF/8hCyXCo3MWJDlALNanuC9qkWijbCZ36P\nZYeqjJe7/wB0kl6cy76gmVcXGkViOo9pcxKfEJjjynDJEx718MwUVp06DEsM\n7wCMc0zBdTDI+skT0/n/BOzCtckNSeHmtWBWxqPidKlXO3arsPaKoPrImp+P\niz0rTD4A45WQqN/TMntnNksugukLfe07gNfrNdgx2LodwxrCxQR6xgYradCk\n00I0dyRJouLDvKwczMKMLv6SdoI4WGT8awGRuqsob1xXILl1KZkKE2Jfy5T9\nNgle\r\n=jlJV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"b739ef1e13403d03abe8a6e39398f059eaa318bd","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.1","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.1","@truffle/blockchain-utils":"^0.0.18-alphaTez.1","@truffle/interface-adapter":"^0.4.5-alphaTez.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.20-alphaTez.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.8-alphaTez.1_1580780733715_0.5815993557613504","host":"s3://npm-registry-packages"}},"4.1.8":{"name":"@truffle/contract","version":"4.1.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.8","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7b3a90c086ce232ca9ef2e6e1b110a28141990ac","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.8.tgz","fileCount":42,"integrity":"sha512-BPDcmvzr8Y6kkcvubj8YJyVwCHr2gvhGkrRA/7YwrBGT9D86AaHd0RyJBqJPau1iyXe3d2OiTV91iywLkT3gQA==","signatures":[{"sig":"MEYCIQD5cCtUqmjRIFnvXNSJh2eymy5KBWdZu3Fk3DG9l3wmhwIhALAuhBpFxPx1ccZL4LvXc6W+pCq2mlWK3IgAPYQndWZm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePH9+CRA9TVsSAnZWagAARN4P/i0q9qAADrV+9RdUBl7V\nT6NVjqrLd5N7cG/jMCBq4Xv2L1xZFp59It0mqC+LjWYuwtB+d5kuHPdOXbhr\nKtsJ0LPyBxtGfzPFWOc3uQwKpicImxBb4eHM3KkTp+qdrJqPqXsFfNKcfto3\nugnMyfHiJ4ZscuYpMUeoIjN/AtAufG7iFXuL6JSiOcCuSp7HbgG3pS9qd4vN\nPXMpgCfUTx8jFvt6hXZkhlgQvZdxKLU2vnVTCVM7GOmHhS5ewBRlVaIywk0b\niX4OExGjiixH04BnysJHBri3MqSClZUymHimUZIQp9FQkgz23mvZ7XFlcBED\n9lp9Q56ViecyEMnuzr3cisnigwJzQtL+O36ZAMlIbwiGESdfEZLucHwVoZeU\nsZDFczBf+SkNBNssIGbykjDQP4B+DKZ3hXEvAvoQ/Yx3UC1miyagA1G6nFjh\njgyBKTZbb+LGcEdP2qqDLH6oQ/qZznsf22l2mCIbHhwmlUXkheQk2EWE/r0c\n6RMa8qHyCK9TM+QEVdh0+riRIjDgB6VMCyfB8YKt1/4iaMOfWhlhJPv5RNIt\ndpSE2YTF88fJHfEdF2XmIP2ZQ1bymaP8QQbfHzJMAAXj82/+TmiyF3fW+yXE\n2gs+VevlFin93pKKyXBC45dX2SHL+/kwUgsdqAWgJuV88/8KPsRJiZuGVOjv\nKOz/\r\n=Qmfn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"e6e67cf5bec776bfe3a401519ea4a3883cd65571","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.20"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.8_1581023101824_0.0021950421818242027","host":"s3://npm-registry-packages"}},"4.1.9-truffleLogger.0":{"name":"@truffle/contract","version":"4.1.9-truffleLogger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-truffleLogger.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3165928c6e0bed3d28c1f27269c7a261854c70fe","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-truffleLogger.0.tgz","fileCount":42,"integrity":"sha512-0oRpxpSP4+40xN0e1AjhbmTtCh1NDy6Sj4Wd8KnKnV0mVB/TnU24hGi9e4OobBHkj1A2LOK58xa4cj3zFFcS9A==","signatures":[{"sig":"MEUCIQCnL/0NJziGJioN7pC2UDFcVpGGeay3kpt7hnBW/O6fegIgX3CGbn6JweClq4P5T5WKgYnvsLIeMOtuAPJ1rNWkb0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5705912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePKjvCRA9TVsSAnZWagAA60wP/iQWD5nKwGI4nsZ7CuU7\n9m1S1EQiY8wdmmaUF50hje9vta1SsxbKEpCYUwbtJO3FwbzHOqe1U70vs1AI\nuhJ8T8kchw1YvCWnPN0N/ccepzlULkiYiCKefYNsvYnyDLCH02yWVNDbZnBP\nDr+Abu3VPXxR5QNjGDDNrc02GR5WLHWsFXqtf3dtQ5RoHjPIinZ9Gpz/X0l6\nrPcMqdEvWiD3kXIJDlyesEOEe/I3rnWKQ54E9kf6C+I8BLWwKOaN6BP+/h0E\nVGD8QfX1QxMJ4vcONYpWuSxrX2VPi7XsyFdV/G3Qnf8TakzTPwLvnf1vq2nc\noDcZIGcBqmNZe9+rzGnq9L/pV4va7HaCqXvGhMhMzUA+42q8rAIFmiG0mCcc\n5D5GYikd6/5BvJi/CH32B9SrnjJ/36EG6AvwjNp2TZTT+9YtqUHRir+jZkc5\nER2NXgFb1UBOX2mqjOB4ipbBOHmBo1xSOe6IcQOtifAqwhTzlVwTOfkMtFlH\nc+9IGnsPSHT8aqV2OrIvjXgWjC5P2qTNmT6BTMC1sHH/YXvbx95X72pO/XU9\nHxJIHx6f1dBWv1Xt8dfyairpD8+prdw7AidWM9Hzl+Jgd4inRmEPrG2ZA/Iz\nAryQwPTo3kU5Th6M/AJOByxscPO8O1NMrP+2Slr9bzhpkp5QV2MGHdS4SvhT\njRj2\r\n=m7z9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"09b67bd1b2431e2805ac546b566a77f18cbfe1be","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-truffleLogger.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-truffleLogger.0_1581033710639_0.9507479245531201","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.0":{"name":"@truffle/contract","version":"4.1.9-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"d03e281b9af2521aa1aea8b4b21e1667a89fa75d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.0.tgz","fileCount":44,"integrity":"sha512-MZS1l92gHxEFQGyHcKO4dq5jSNo3YNDJz0OSbPh0+zMOJLlKYDwZoM7C08xbRV9W54ob52ZQI5+gCXdAYAXc8Q==","signatures":[{"sig":"MEYCIQDGc5+eHvID0I+cd1XQb2pSJPN/hlOH8nCq0feVbl8UZgIhAPZvDUNS8MudDsqXk21af3JTpnvGg3wE8gAyQzjKQquP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8723962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQgdSCRA9TVsSAnZWagAAjXsP/0vavkdm08fjMyDWnliC\nzDNwXAhXyroDuvwxjHncKHEkjEvdcQdfC4IbKN3dWFdZgNZ9obWA+ydxJxxR\ngE0KN2wpqwcXFXqZozLbdMGfuiGNrAY2HLo1epy7C4GW96vxRLLvK68rxfzV\ng4PdJajoc6F0vRdbXnD294HN96FFPzIakZZzf1iyemIZQQgeIchOG2qKdmlq\nNTlEpXK7AfVTU8yAlJyk1SjIeLRtlx3fEq4/dDNC0RxPHRenqBDxhxRZnRUQ\nfyBF2JQKNFRzG4j9XW8FDU9gr8aJouI89PXnta8jsRjl+nMAILloPvhSyrMz\nO7uC0OtbZCwzY5NFw0wb6uCn95MAi6e+TBo7asFPWYbllNxWrfXZNxeTwmmF\nZnOx2hqXp9FrjNHf4o+9q83evC/D0vsVpttAD2OkG3OvV+Ydx2nzN0LKrjcb\n5LmnuTnbxLn/V5/qPT3mD8qVII8lY3ul/+zHgVggB2w9uPErkP0dXTPBmV/J\nvMBPDhZgxY8+Gjh/6h5loCs6c8HLpoPZUWvrpHj60cwjtH1nz/kSH97Kq8LV\nZIKKrt28ankHu5QTudggupfmUhdrq8oy00COZ+nB5xTkq+geP3gS1nKwJbBG\nmrQHaXxq5h625yZGH97hLHdYZ45/6j+qgbNyk3ZUrRX0D0DjaxPCfoYodjbh\n6nHG\r\n=WaFE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"353337f231ab9b59a16fe0fef2d367b8d352f85d","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.0","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.0","@truffle/blockchain-utils":"^0.0.18-alphaTez.0","@truffle/interface-adapter":"^0.4.5-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.0_1581385554372_0.9658179755400038","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.1":{"name":"@truffle/contract","version":"4.1.9-alphaTez.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"a19f22e607acb9aebd024e2262e8fd8ba623c289","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.1.tgz","fileCount":44,"integrity":"sha512-AdBU5hS8fRW+0e/7beQvd1GQUHWFLIGK6pOtCQwG0OskCmQ3HliyJ1ul74w8kz96R9IJUhZOsD9OhAbB9g0dGw==","signatures":[{"sig":"MEUCIQCGDMRkbTv7510jjLuZrieWHSZVoB9Mv2hAZHNuXzo8DQIgKga0ygOX54pfbgb5K5+KNTbUb4KV9NVnopNbAtKBAjs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8723962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQhzoCRA9TVsSAnZWagAA5GEP/iziKG48+yUimVw1Hjyh\n7MXYtRl9DPX05xfhaaXLEFSk2eo/9NymayennbmHHaPUjJITYb/QRLtCJXoh\nxfgOfCAjRK+ArlhEZ9PK9rcbzriK12/Ma8RdUGL29ckVpzbKL6BD+/t7WktE\nhr0cm2ws/1okQ6JYBtie5j4t6dIu/R1sv4qovGjYix0Fb7tCNoov9Q5RZrAt\nE2NRpdeLxusuSHU7YejcW3JvDOXAJ6Y71rKIa3LijOQIxAO7RRCGm2hxve1Q\nM2hR4xcKrL1XGcX4Ah3GVZMjMFaOXOohQ8FDHlo1lNd81j81FdwnnSM3QWf7\nbiwSHazx/E7XSp3Y7CxnUOQhqsG1gQVQuIWSzIY6WfK+lX4cHRlqLvgS9bDp\naRi4v7f37njanVlPdiorr9ZRVp1x3k3piom8D/nD71944JLAndw6VS1eZvTJ\nqX/72h5UEhLbaDweKx9bnjluYItiVoWSDDCdJ7JDA/SADpIdyaP9foITxJfZ\nIXnDhBEnc9/3llQBpiq5rxNyaXVHa30xKZkbNZGcM9SB2UBK9z1dd+wwpfQY\nlyFNnYNSwY8iSyCMMmmxX2V9o3vx47I/pQAAou27bzP35nPNO8Nm6CZ3c/x6\nRVgkcGaGVKGYeRHKWVCv2Y4lcPyIe4bRXEWuR3AUi27JVLHEh+M7wiXymVGy\nFjY+\r\n=7G4k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"8262128a6eaa7d5a6c229f674eff219bf373ec98","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.1","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.1","@truffle/blockchain-utils":"^0.0.18-alphaTez.1","@truffle/interface-adapter":"^0.4.5-alphaTez.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.1_1581391079535_0.040464010232160064","host":"s3://npm-registry-packages"}},"4.1.9-chmod.0":{"name":"@truffle/contract","version":"4.1.9-chmod.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-chmod.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e1c728b8a56effc6f790d8026afb2ef6ae37b52c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-chmod.0.tgz","fileCount":42,"integrity":"sha512-ftrRfrYWdRypoAccz8ngKAnL8PGJeOcBSUMiDDzLsGrdrHqEmWIE+87gROGaiAcj3UEkB48QVjN4C2ad94tBMQ==","signatures":[{"sig":"MEUCIQDsoZJNEpbmgLBn2ZonnOfrYsNd1mxGWwCAQ27Gf8/b5gIgAne6ylqTYfLG2fwSojfkeqpqdMCCXWQtGIPXs4CbVeA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQvjuCRA9TVsSAnZWagAA/AIP/jZljYrP1UD7JNjkesDB\nOFf9PaKeyB8kGs7YoJN95Fal9vUccW1UbVxLE0cVyVbCfdWbNPVcllzHj9FT\nr3LEDblJiXfBwEiScjEUqBbEfPmWvQjtqttzsSGhZ60XTVQJFVQTpq1+4gia\nSOmHCgWVlbo1lAKn2xgvBOICgk/gdf+EYk0z1VegRtXO03t083u/bISZPe5I\nv2iCrtVk7W9TK9p0g1/T06tEuvcxczyErc1o8IQ6S0pZV2Pb2ItuTMeg3L3U\ngbBgUJnMZ9J98vAHOhPk9RCZQZQvue4jazwbJtniOF/UvjApK8jaZLLJMWfi\n3QRH4UnQd32R0GofpkNNnX5qSN5FSUrkqAvGWrg0zo5/CaI/H+qxCkm38gWY\nwftaZqAOS954HKBM28TYSDTPQL4aY/ob/8/kIq6SdHGQF1XOYuvKSPgmxM0D\nSgjQNm17JoDIYAeKG1Q+ddeq9d/KjLGOJlaSPTsrcpkikos3jAblDmQZ0Klr\nT/m70B8TZQWHwTZSCaUsX7CIGmsBb1aQiQN25NgPpUyWWE5txm46fpurm9xG\n/rpI6ivKm7Eommi/4aBU5gNV9PAamJF8GY6S99h2S2x9a6RKrcnqHCMP4hg+\nMo2vb2y1QFg+z3qULAdTnstO06mo4nPOXuVBsHsj2ysoC1w5waHV848uU7vp\nTKK9\r\n=CswI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"3b54473deb02967159b64028f03ca3e60e060002","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-chmod.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-chmod.0_1581447406325_0.6075367339538384","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.2":{"name":"@truffle/contract","version":"4.1.9-alphaTez.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.2","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9133c658f8484a5f5496e1d926d72813c5343809","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.2.tgz","fileCount":44,"integrity":"sha512-9oT6kdQ4yc11i0zzc4/7mwN70FfEsbngMCaefdZrYWp5WYoQI6hgJrOkX98aNp4Okv21H07t2f3I6WRaXiBirw==","signatures":[{"sig":"MEUCIQCRmo7EHgQWanu/HiqSAsGg40BtkB8SbALH9BfinRPSTwIgZJB69G1Q3hvflPuZO0S8zIP/0FPM032Esb4E+z+bIw4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQyYZCRA9TVsSAnZWagAAW5wP/iLSVBJDOXJXqKQ5WJNa\ndB8E39MxoX7HjVfqHZY6EIFV9+JLOo60PQ0WZuy6dMgjq7t+bKtrm6PJ9vHg\n+Xm+rGnog4/nmrPyqHKVzsoLSNXsiNblvsS6CFP2NPA48wMsmn5Y+ybMOamy\nUhzUKghUt/etGGa1+Q6f/5zvfPrTzu0umhQQo8MtHozEnCcas0usVPEJpicA\nmzv5vTaxkkH8lkn8r9CexopmXSYQ3gma92QxXwVD4WV8zEjKnVSL2mX6ApA6\n4xZy2m/Udl5mCRioJrUFNssAVObsolAAUwGkn3cSb1Z4wgEsgtw4i1CFPH5Q\n5su3W3MezoDWZWEghcqfFuy6clSq3X5zpXM9T1hvjJXnwgRDBGoPfu5xanez\nN1XOOrN6BbmFka4i1bCOaMr1cE88eDUvFwxWcd3KCXw8ekYS2GLSSeZo7dyJ\n9NKCeE5utgHWFrYjDlQgLkMFVgFSWstgqIWQa4/+VHLu4k4aRBM3m03MO/Xz\nguopKQIXzbj9nDLzKQcyoN8mJ/2eJurwbHAycSCHoFC0/mY5EIIOi3f1FeuR\niIbSa4DIzej8iMMS1u3xoG9BC6fBfb/96Iuc2uFggDWz4hU4StJn4ywhNfJR\ny7b1nVVsxqEIEg9THphqMeGwtheKx+3js+CBW0FXeV3b/lCPqIAYJuC6Zh9G\nBG9T\r\n=lFvj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"041ced30c8c9af6d790eaf3a9fcd093141a8835b","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.2","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.2","@truffle/blockchain-utils":"^0.0.18-alphaTez.2","@truffle/interface-adapter":"^0.4.5-alphaTez.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.2"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.2_1581458969301_0.7299899057363903","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.3":{"name":"@truffle/contract","version":"4.1.9-alphaTez.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"71ce1a868b69945b4dbf1b92a4856ca386afef95","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.3.tgz","fileCount":44,"integrity":"sha512-fJMbbi1uJJ4xPUbYigmH3+ddMglm6psCS9GEe9IdR5kRMRiMD0jTOB0+furGkS1A3mz0leil8miCF0EK0nMAgQ==","signatures":[{"sig":"MEQCIHq+yQRXwBhdFW753qCKYZ2y9/y2p9Kc6NfXfnucr4JdAiB5WkwTUHj30RfcHVJMOhdhWC2VonAJY5gI90HwzVX+Tg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQzMaCRA9TVsSAnZWagAAoFoQAIuqifYHG3T2bGNOlBmg\nbyfbnRAmbE5gd2/wxLS42ZK/3bnF6Bw7E2Q/LIWibXKGsqxFrKtfHXDh6jd5\n39vzNXVeASplyC7O78BkpK4xa3DwEKCxnMM4jKm9QOL2jDxPYL6Dk3CQnjU6\n93aJNyKfcA2hz6u7ggflN5+p3pkTaloduV3QPfF/PhM01+so0fLAE2Lg2PZd\nCrvUtUOi0ayjOnlH0vB6cNyIf2ZVMGpgftMyCC6lmnVnE2RYjfKuUZ71f31d\nVZFS5BgUoafGSpzAaRrEpIJ6O/dWGy0L4U1wJWVxt++X918bqjniCtFadVff\n46H1bjHFle3KCcQke6NfBZUktRP3MqtuBUqePsrpimfrG5BVMdS3PIkk7gCe\nrDHn6ja7o5K9vb4LGlSJxV1Rsl8J6/SZPPOnONWGrXDw3EuaKN2ZTCTVU9xg\nv3Rgs+uRStEHnyqfxoTns+A45r7LwKBJsJONJktOug74H/bHFZPzcyzzKOKY\nxlmhsbFAVpzHDOglwNMNZ/nuT/r2fZv35Rd98JSt3w2nimigqqcldUF202fR\nENzuJsDTBFlXSorgknC3wqLCFVv10mE2y0V3dQDx8CeLJLwru9LjYHUBDAbW\nUNjbqDA7hNk+GTvXDzecKRKnaoKheuO8XmlYhLEjyCHzqgOYxvFf8dlepcr4\nmeiZ\r\n=c2Ic\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"23133de3cc7d0744a845240b5ad461cb4f16b3f2","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.3","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.3","@truffle/blockchain-utils":"^0.0.18-alphaTez.3","@truffle/interface-adapter":"^0.4.5-alphaTez.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.3"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.3_1581462297859_0.6639994845246475","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.4":{"name":"@truffle/contract","version":"4.1.9-alphaTez.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.4","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f17d8fa7382e9b80d1383776643456df3fc441a8","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.4.tgz","fileCount":44,"integrity":"sha512-pj1XrN4yjODmTFHhuRogW968BAB0QWlr9oVijxpGbprFY5ouS/7OujCENL9ihWrzldgAJWchME2UCs7xvWO/nA==","signatures":[{"sig":"MEUCIE0TJ7RT7j4IL+qlXWXdawgG+bsbl9i14qtUAidbWDZxAiEAw/Qxa3pe3hdqa7eAGdCvtist+X46wuawQVc5oOx8E7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRDw+CRA9TVsSAnZWagAA2D0P/00v8z5X+GQQ+cPgNXWh\nUWOXMNJZudu8ONQU0McBK2hBSpiqWNuDz9YKFSsN6/GOgYtJkRBGDRJKcsZs\nJ9yq6VqRcunjZHNH7BSFm258aOmmofrm5ZPE+wJtxnWhYme+AkFSp74Pe5o/\nLobB9MQzCgDv2X96pvB3OmfgIqqO8A9T1qY0srA61tjD5WoqGVF7+RkOOUPU\nGpL0wwHU6SdN8yuHrm1SKa/nRlsfqmDVvBEKNTpQw4BY7oKNmdobYGsHwDYJ\nUvaiDYjU0J3x4QcN8CkUqzpoCKw9zs6FeEjE1DhkWIymfwRk5JEuzgyrUNW2\nz9k9NOnhiCDvHS9cVRDsQnqsEH8FCtACelqlxp/pjeLrTNb3Top2llJ7ymGK\n7CpEsLQZq9VQGgQgh050wZYm/j1g8hWttdv2VPf28ERJduS74v8/1yzoLvTl\nMFqZxfF6nvfbOTKimDwTYH0ncbztIN3dMzZSsMYEVXfMZJuwtBRfZnGRtDck\nToUes6pVCxPUdreSVwjaFNTYbgsL2By3rUdDp9DoK4xj6aoBwDD6bHlJzdRA\n1Ml/3QlJNtdd+fd1IeJD3uh/bnZARyz9BjJ7rIz1KrwBfKldmnFXfCJmSaZf\n284B7Wg/0Q/jRdBYsreNLABocQGmgh/0lm4TKmKH8wRKVe08Xt0Ohh0JhagK\nO0VM\r\n=/0j0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"5675e1456fc53256b3cc38b8afe62fda80d8f5b2","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.4","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.4","@truffle/blockchain-utils":"^0.0.18-alphaTez.4","@truffle/interface-adapter":"^0.4.5-alphaTez.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.4_1581530173886_0.7986718584156671","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.5":{"name":"@truffle/contract","version":"4.1.9-alphaTez.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.5","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"52a0f5e9b795a9fea2b8ddc8d1968431303b680d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.5.tgz","fileCount":44,"integrity":"sha512-hQfm+Mamc9CipY+RpkG5Bidx/4LcnDl468aJY6mad6rPm6xhNKB8S8Z5B1a6iD6nStgXQltkItSXz+LEP9CR3A==","signatures":[{"sig":"MEUCICcLSp/e8IGkbuOwN/eG5bJ/C/ManO9rtRqrTQPny+0ZAiEA8TY5unoW/UFNGum44YNlUYOxzHaLWFA01gW1GKoFcAI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRHoACRA9TVsSAnZWagAAHi4P/RE0TXY1u29///gqeCti\nS8HUWxzCHe+jXtrdfWIgo4mu7akgfvCqBwj7l1U1Ib6ukWEPQYMdikySbg1d\nenrcdfKlQzobyhm9KY0pRWU+VIHe1l/UjtCR9wYKhsFnQ7wuMEEofkngfkGs\njtZrBwLRCPm8mDH7dyQocZLe7K4hZUJhQzEVSj8I0tbXJFcFDQo2hT9IEMVQ\nAKLFr2QGd+ZC4X/OHYBbEwOHblPBrpqdWQB5Id2Wq52/SU65CNvg7iKFl4T3\nwUVrGW8shOUwBzjFDdKY/XUJm2nHVHMBFIkWvvo56eiXCvf2xdOKjmNSamZO\nj+yFlH0zER+F6CJnXnH307cF+jBr/0H6WozdLKXIUjKh1NZMiBszZjgpa8Kf\n92pgwtuWukKmuWTANYN0Hvzpeze3u59m4oHKT8u7X+cKlRhMNj3Pg5gh7x+u\ngT9hQwEMdbeFQDHyY6XG6cCO4zxRY/j3jD857UpOvDxUZZhD9ziQZn1HGhps\nlsYEQev9nmtCkzeeKlyOZtxJHCdQchzWQAKu4Dbg9WidGOh46yfGd3yKPTwy\neaujDPr7JReoy/SGHb4XWbdkiFgUiZX6Bd2RGbm4Sa2KBo65wIB+EkJR8HRT\nXI6ykkXTbWWDiXPbwCrQ3p0DXFTqrtiqTQ+ZfdVoCWyhjVcFR/fJ8be0xNKd\nELg5\r\n=v6pi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"63b1cca3209dc7792733c192b3f0f21758d1b7f8","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.5","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.5","@truffle/blockchain-utils":"^0.0.18-alphaTez.5","@truffle/interface-adapter":"^0.4.5-alphaTez.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.5"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.5_1581545983494_0.2312301573651674","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.6":{"name":"@truffle/contract","version":"4.1.9-alphaTez.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.6","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7f3172849e71dbd350c14f8cd513d342d3871073","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.6.tgz","fileCount":44,"integrity":"sha512-7hRNqaNaxEq9QF2oX4h66H6ItmUl5BjiyK22uwZ7IbFfr7YY16fSSXogzc+mlOh4QoWZbJhlb9vrAePthuwiGA==","signatures":[{"sig":"MEUCIECGxAct4BKqkL/SXX3vbY7ly3/qAyH9P7C0r+RkVworAiEAmYtMX8uYrvsFlH4YacccPUmicxQhpC/e+Z8J9wYLOgk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRHtvCRA9TVsSAnZWagAAM8wP/0H2ziiNvediLzTyK9rz\n0479B0ixRsKp50V8DxD74qB1aoc4ImlWxrK/er7/21BjtnK975sGeyH6CQjM\nhhVhLJeGWRVyVaHyRtwHFLZS/2kisW1jI2uD8vrhbDGQmk7YJzUoj34/i9nM\nYYr4zHhfHSuitk2nOYvNfjz1t8KiJAbuYxzuNQQVN4pWLQB8Z+6O8GiOJozp\njbwNjx6KPoxmXE/hVNP5X3FB/cP4R9qUSN8zR3bK16fV12sI/b/j48fvjz/8\nmvstiALpMmN0dGZP5UNqHu0OagnSb1zBjC+SicFp7AlqVrdwgjyrTvsuNl5N\nFsKKRukyHcGd+/jf6rddZOvTqqdNzDWJONiYZZ4S4dlrQh+9r1zKNOv8IpvC\nyJFSwiKHtBrDigmAV5fUNX29k9qumEeHUa45MV9xFiqmsb7Q4+s2yt/IXnwz\njR9Ka3b7rAeh7VWNhphGjAjGBG9NJZ4mUyYZpGdRngc7onHAFse3fZnQJPOk\nbl9b5DHUR2h5XdsLvc21VHlmYZsHZjJTohzZKufHw2DhM7xTZ0u/SBgW7Btc\nHnXqgSO9JIqXUpW6RVPvb+nbfB1XN+c8EajjeVXlrHDAtFPrh96x+9rEcMnH\nQFD8OBrMpVFEMBIq5G/XDSxyuP1ZfC7z4DckpR5iXMmZccgiFdFz/lwfzoWR\ni9HP\r\n=Xibi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"2bb2e7f089388cfeb11f1f03e271dce3c04ef782","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.6","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.6","@truffle/blockchain-utils":"^0.0.18-alphaTez.6","@truffle/interface-adapter":"^0.4.5-alphaTez.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.6"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.6_1581546350889_0.6437342299827713","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.7":{"name":"@truffle/contract","version":"4.1.9-alphaTez.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.7","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"0796dda46e24df4a0f4ba3565f4ec83d37766770","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.7.tgz","fileCount":44,"integrity":"sha512-+ZrJsEmnwXWzuS5b4QqFt0QvRQm8UL02FVGkq3ZO4+y95ddo4q1WGk4uijosmhMB3PgdOQtLPFNzq5Y7j0y4Iw==","signatures":[{"sig":"MEUCIALaZ0b1nl8mONfRpQfeGwkVV9Egd2Bzvud7BAS3ii/xAiEAvqpyA4N4VXWE4cMdGKKCmMLc80qSZlgsgCoOpRY5AcA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRH8BCRA9TVsSAnZWagAA0wgQAJ8HcjpBxiFN8TCNO4Ix\nkJdqN0cZfVvTMGdEqcv2Rg0Y2YVsU+TRdsawsMjjYl1UXUq6LVZHA1nE+82W\n/AfyTS7Emvf3CnLYysbifAxJZpVNljP0ODyy2XriX8VuifMRGXttXGNgs9c/\nqzFwmi69sVR1oUYWyaECZ/LYhc8RvPTHi+X27gSS3ADTOBfow0hOjwozdMNZ\n8C0vSKUYuWbFubGYDTQ8hsXoyQ+eArg5Vg5F+MWt2kOfOwb+68b7mVl62S4Q\n3EHN8Vt0nX7vigOIw/UEKriGhXUTzLrj7iEGlqmRhuH3pMIrREMQ8NTl1GsB\nE7I+3xyNEuHSRQ183iY09WjELhOVTmECAiSvp1lh/38AEXhKKg0uv16GS05k\nc6BAAObi+zVlQENTcdB3VtbAao2CJjyzatVRStijPkoDEFifCCxPHmQ8aFLX\nPiCoHF8AAIXaOlMd3eKeMpRuaNdxXdXaxRp2BvZbAm4fvf7LIP6Nl6oQqT1C\nMYFYq1VteeyGZErqFC89RyVFQuEPpPQw98i41KWGTfa3SIfQQ7TqfdKhIB5x\nWpWCM+Q+bCHKaKjdtd+9nq4wNZ2vxnjzzJOvve9FUcvy5KISyEwzBSCV4AY5\npIhGjCrQZrUMWmU+6+AaMXEtfLIgbjc9tSPN3Mu0pcg/ZhqSddIRcKM84csE\nWXzf\r\n=6+8A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"a7f61b9f2fce0ee5927e5b07a626412f185922b9","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.7","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.7","@truffle/blockchain-utils":"^0.0.18-alphaTez.7","@truffle/interface-adapter":"^0.4.5-alphaTez.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.7"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.7_1581547264640_0.671676533892879","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.8":{"name":"@truffle/contract","version":"4.1.9-alphaTez.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.8","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f9c1953e68c7643497c8da59b7e3b5ea4da99e49","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.8.tgz","fileCount":44,"integrity":"sha512-vVsIS2d5UmgoutleU0jq5W+cftgfy5SVjGXTl3GTAJ7AxjDRMifqAuvDyrYbS17Qrs5gg9WGd3LgJA/SBsovvw==","signatures":[{"sig":"MEQCICpnxbFzkSMCcV+jg5D6J767nXvfvR0m6GaNJwLmlycSAiARaXsoiv+jhWls/Hcf+8HC1PkwKgqTYxXuG07dDZiAJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRIguCRA9TVsSAnZWagAAousP/AnWyP1hbqJBMs2jeAbh\nqn/kQyUJxEdcfCRXEPhTnNj9RNt09joTIKLM+8k06Y+tk9fp3M1VSCoHcc4X\npoz4KD1+V1JGgliV/+wQSMReY9E8QpjhtBdDmpnJg0b4SkjeXC9NcftSu4on\n5eeJK8wsZKAnrMxU0kKwagnzWbnvVVEZuKkgVZ6XsFRvfDSsKBA/IPpZRjZf\nYKmWYzbmN0eL/c/X491E4AtLPMCF1CcZRNa+CoHD/f0AueQR+6WTlnEzBZJC\ni0uvfQgEUm/a7F2lV0cJS4JsGpmhqS04CE64ayoqgWEMcaTpUWSM/8xmR2df\nxEz8joX7lE9agrimTJJ8UjHsh3LNHauMyDOS4lM7u+EUFDcCBgy5uUjj9ZDY\nbAePtP7MJaDgoACcN7PMqMW1eX1QeFO3mEL0jSlXEhIGRt6zV+WqQHi1Rf52\nWD2tq29anW7VnxVxplx6XoMImcGujtYxjSjkA+O2IEfWNRAfgI/dq9E1DWet\nc/0JT71Ij1Z++JwmB936F8n3y3x7cTVbZDgPZ0r5voL97m1sHlyx/T6eTCE1\nfj+ynKUsYSJ6/XFFlV5MQZQmzFZCp7sUsxLbgipsk7TKEGQfOdD3oGJKmzvJ\nmizmH6iEnQBZLyYZqgSW41DbAp2dMv0b63Dpp+q/yOmp89kTxw9TV/Ijploj\n1zAZ\r\n=xyKe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"debfbde8c1d20cfb79d04659a349c2113c1e40f6","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.8","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.8","@truffle/blockchain-utils":"^0.0.18-alphaTez.8","@truffle/interface-adapter":"^0.4.5-alphaTez.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.8"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.8_1581549614268_0.8799887474321308","host":"s3://npm-registry-packages"}},"4.1.9-alphaTez.9":{"name":"@truffle/contract","version":"4.1.9-alphaTez.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9-alphaTez.9","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"bcb01eb6fc0df164cad5a1670d3173309d539bd4","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9-alphaTez.9.tgz","fileCount":44,"integrity":"sha512-B3mLWqQiRzWK0GVIw1P+/AMqEE7gD3YGHLLGYoOled5C81MsWqSZ/jjRK5NuTpymBTkdjtL4oBIf+kKHjUtCzQ==","signatures":[{"sig":"MEUCIQDbUdA84c8yzJm1aF9Z+AEovaZcnwPlCZGo4CFvxizxpAIgYcj+F3cuZjGZOLzcLcutehLH1/JhLY7YhNdpR0daypc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8724070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRJYNCRA9TVsSAnZWagAA4kEQAJYND2kS0J8E3BKPYPFi\nWstyw141ztbdbxBxKTRMqPhsVY+fo/KiLgqvbnxdvkpIWP1aM3quXu5+uWEQ\n95gEDSx6ERf0fGoDG8rENewaHC+zceASvooOYnEP7tA/krjGTO/FnVMXKwEy\nGFJ+GMc8rsiCc4zO4JeC9BNDZN2MMOQu1NqanocR7CObfV9V9UzyFmFocp8y\ntcv22Jgu7rdNzfGd2N8vN6BQqyeVpJhN0Tob5QaLpFyk2BfRm1HB/hzHP1hd\nSxwgEGua0S0kpU+Cixykd/iAFEVpNHegmqhY3yMzA9/KyNV5Q3EZSpA8L2LA\nkVYvK7t7rPkukTgmO9+ri7YPU/I3WK+99WmLYYrIAQOVaAdMnuLUaX/CST2u\nUZEJhTQvTO2ep+rcBSK/NR4YxnL2Xc8Di1r+6aoqw/n1CO8n2BShpT9471hV\noBzSlmAeKrzWjljZLi/c3wcAJ/YJab8SF/80nZqN2KnONX8ULyZQeub4YF65\n9CzwE6+VULuoZ4WtYyMojOW4mA770t2ltcy/ISdLmty1J77RfkoVSV4FZ3j+\nLCGPhzurmxkukbw9vxq5dmZKN40MQzEJgzZePPuVbtpseE9ybIQgHQ5FAYYz\n9aqx5Srue7BsF5rq8TdgOqf/cGs0FvCex/PTfaLudYac1IjLl8rLdY2ktAxc\nbDjH\r\n=V3za\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const deployed = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"0c7420e63fb5291441373d6899ac83d31cb0e027","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.9","@taquito/taquito":"^6.0.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.9","@truffle/blockchain-utils":"^0.0.18-alphaTez.9","@truffle/interface-adapter":"^0.4.5-alphaTez.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.1","@truffle/compile-solidity":"^4.2.21-alphaTez.9"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9-alphaTez.9_1581553164471_0.890987781057371","host":"s3://npm-registry-packages"}},"4.1.9":{"name":"@truffle/contract","version":"4.1.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.9","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7e9b2a0adf76cc29270feaa541f73feb17229b12","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.9.tgz","fileCount":42,"integrity":"sha512-jZEt/7v0KORibr/V3iUy2R8g2hY2mUSzQ5QoGlG9o1Kdz3dxFPEj3F1xcVGb0IMAYwlFrqtyHr9RuVnN2Agpkw==","signatures":[{"sig":"MEQCICssShBgrSMGZGrCLimAY11hMbrcNCZGco81erFt/G/iAiBCV+21yz+LQrAXiqzFQ2pI7TL1dEmnVGxT3ofwMy6i8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRxobCRA9TVsSAnZWagAArhIP/Rvk5AXNzNbTzA8ZtPXL\nOVg5g1jcK7nmZoyHrFj9FLjUVPmOvHz0mu7njYWnl/UhkOiE32TcCtYpFhpI\nmpUtZWdu0y3o6ZeWT8AyDArhhQE9bpLz3b5jIicspJzUPOR0ozmyLSEHQ00K\niV0QBM1YxRJnc36E8cPH/qfal0a3ZhQen3O0/b9YH7baeIAoLHMKO8ilhxE3\nQhvZpUL6k73vss/o35rcXgD4WnNqWtcZPY5z3iDxZVr70mZDj6IZ+u6opfim\n23jjWALwWzcl1v172PVA9+C3AVxRpKYW6/ZgVv/0N8wVtXmAc8ExeQ6pPqgL\nkHb4pJ7anVjbuTweePVYGRFV6Guw5/tk9A3d38rUCyNDSgSYTzIuzQ8npY6G\nRbNoH9NJhir/weIKz4ZuJB19E6IN1jGXX6bE5rrnMTCtHzM/rK+NsV6bKuV/\nwacIJCBnXxaNI0yENHH9tGR0XLFtEGLGnStQKHdHqi1aXphGIQhM+W0EgfrA\nwqFjfaezYrNcuo6b2ygybbF+a9+FJVvOOQc3cb6CiX4ThxsZY4V30EjdUhq2\n+UJz41kZpyxd39TMfWQ4g1mKuR3xNa+MqSepdX97y4WhCH+Ox13PpwYLPVeT\n9FUWMEWFWLP/W1lubHM65kZSk2Xujto5GRGEKFvPbSehWOKDde0fAuYSiFOU\nd9fY\r\n=+HEP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d1cb03df2383e9b83809090afa3f7cf1bd7f7ee3","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.21"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.9_1581718042582_0.625727611399786","host":"s3://npm-registry-packages"}},"4.1.10-truffleLogger.0":{"name":"@truffle/contract","version":"4.1.10-truffleLogger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.10-truffleLogger.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f7800fccfed10d189e5648b38b2db466b92f57a1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.10-truffleLogger.0.tgz","fileCount":42,"integrity":"sha512-DvPwi3lbeGAPnCsCUaZ9bfIoMyG5TrXhmq7vu7vXyuqtO/OPwhdaLSBHOs3a440RRV9lRSAm0YI5zpugGCShlQ==","signatures":[{"sig":"MEQCIHgE0TKfQ+n/rpAFidh4vfsKHTuSA37QOrEkn3RligfdAiAhovy+sAsftw4vkYOKcJl2TKnlv4yePe3juj/Pkih8sg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5706146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRyTxCRA9TVsSAnZWagAALUsP/A4/dg8zajH6KiKwf61A\nOcPzwnM6U/hvJUxHP3PqlqGBDddh1BSzixFPwSjNFuLG68eMaV/56TLujHhZ\nRHogGSdkQ5R62Vws+HCKrHb/TdUyfrtULyda+f7kOFiXJG+pMo1miW17XN6M\nDLmeb52JKI7TGivxMjwQ+9ppLlyQsZOSNu+260DUvlGf3MM/HDARDLvzxc7S\nj5hS3V0GN8+kcpV6+79Hrx9ocXOHzZVG1P1fbj4qOpp6RvqTL5BF8lyp1frn\ncGpY1W32Zf9iRPdRzFg6GjZ2y9hQb5q1GkpDprbux1SZs5RxmY8wmw1KjSun\nITaCoQ4tnDJFk9N73IqnQfrNHZcejZuX+n7I3fbiBARuYfYOpxwxwRGtRKcv\nrGMn+xREzsSedqV/FNHY+nFBvgnzGtBaiMkliI9QsktEHeyQdgQEdjOyIY1T\nlNiqQHY6pA4NrfeBuW2nCYFbFeXN76zwPOo3stROLofijIs6MDkwePyKO9rk\nNrE0aCTypqhaBN7wuHwqXR0vUhxfz44ukZh4FfiFgFUsYPL4S4OYn100/FNR\nrQqMpbrZOKevokKJVL3xdiulFDKDkvburHr0hmLtca22BYz184TDauvm7BqG\ngg/V7nVRHpzTvWCBtRcR8ayzLCgawzarGIZUCDbfp3hBKM5Mm9MYjAldIqt2\n8Lah\r\n=7cwL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"400624b348dbbab9a081503e58765f326efd87ba","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.22-truffleLogger.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.10-truffleLogger.0_1581720816852_0.18470610482797545","host":"s3://npm-registry-packages"}},"4.1.10-alphaTez.0":{"name":"@truffle/contract","version":"4.1.10-alphaTez.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.10-alphaTez.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e29c99727c72dad9ce3c57922d7ececd1598dff8","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.10-alphaTez.0.tgz","fileCount":44,"integrity":"sha512-Rv6g0Zp97+0oqQTdSxoU/yR3bxyRB2SqNYJmsuPTDwft5PdTLD6NCf/ZzbNMrf7uc4A/dIYzRkdc8xmTNd3xrQ==","signatures":[{"sig":"MEUCIGyJWkwZeJbhRM/OAGYJ05ntq+rBcqIGnjV/hzXuD8ClAiEAiGA+ZdI1yBXY6WeveLpJRWN0Ych9ZbDrX3geWOHKSNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8753522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSh8VCRA9TVsSAnZWagAAVE0P/iq5okgjWNJdCQipn2SL\nlVZUI/kDCFdCGgPIILcA3ED5PBX39oEdAYGYGNpQkFCJ6VjbUnc9aRH8CD9+\nPBb5gcdBv8oYw7yISQiv/A6GIkn8e9JioW24wvlIZvyOPgzdNBIqdMrCLmPv\nhcLI1CB7daAHVh2QeNPddA8DyhIBtNZYuaNZtuBHfrntBk+2szNE5nM+JBH7\niy2Qpcvt5jSnXBe59EkMk4JJog9/pF+YDlXojKBgCd93ri+sOZA2A/PLnqxF\nXI8nHAtuazHVuh1r3Ky90N8MyXA/0kcSJRGIfrtEZ5uFuh8T15MONkMXg/6f\n/D+WC7BNklEPqB9znuXSfPS9HdSWKgOZn55ElU4OkHHYKnYFgd+L7FxOlhVZ\nqNxp95Iig1G4PSTcIPJ8A3BnKd0Muwa9s0E19l+fYdgx3a4xKzEWRPt7pzba\n4nWOW3pOPUu9LdX12iGSFamex4kKMgJtRlolV92P0SpX7RXaGu/kl8jc3Q9n\n588OHzNm7XGy1/KJuzRriKxgAC6Ux+4N8aolnLrf804pBT7ruyOjCAtSW6Ix\n3vZLMsL8moCGYaiuYK8XAqnKI3u6chGyK4gzG/a1zyIhYDzZAMVY6pmaU94+\nZ74U8XWj2SiotnratuFdBS6q4fzywbpJYvWkhuY4UlA0tOBODaGb+heNJ+NP\nH1X5\r\n=mi+U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"4f8baa02e0615d07a0302547582fb86823db6368","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9-alphaTez.0","@taquito/taquito":"6.0.3-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.24-alphaTez.0","@truffle/blockchain-utils":"^0.0.18-alphaTez.0","@truffle/interface-adapter":"^0.4.6-alphaTez.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.22-alphaTez.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.10-alphaTez.0_1581915925407_0.26262124681543053","host":"s3://npm-registry-packages"}},"4.2.0-tezos.0":{"name":"@truffle/contract","version":"4.2.0-tezos.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0-tezos.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"aa71d4c15281d5e31f1912c84e76c07803a5969d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0-tezos.0.tgz","fileCount":44,"integrity":"sha512-Yh5PqUf0rIot9wP9O77uJzxiLBl7LjIuE7jEIRL856G+CgmhSGUlAW8d7jPvTdiQVuZbkmThKd08uVGHxGiu5g==","signatures":[{"sig":"MEYCIQDK9tMdBTg5Ya83PV2zM0uc1kS9LZrqIBJjNvmcUML76AIhANuCFNDjqrm5myxM10oJc0boVSCp0DSRhgqgsRajK9LZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8753556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTCw8CRA9TVsSAnZWagAAkLoP/0iwwnKIxdMBO4hXDHQR\nhNZWqUeqHwhU6Patv2gogXWpMhzPcMtCHGD7fBdwLECRBq5KjCn/FIVR6InU\n1Xk8xsol26VvJduBpgY4Uos6AbvAZ8tUAkcps9/+j5tIfMp/zyDI0X4xke6B\nad2Q0ad7LNEy5v4gatyiVepARNixEyVYWKa2W2q1hpvG0VZ+6CKU1YvT0bpw\nYKhbytfgMXGx8CoZI4FhhcknfAeE4u0B7W+3OA2yCQu/qzqZkQ/P/JUBZ2JM\nnb/SBeQBFGXmCOTYYp6jNcxYi9fzmYcRyCSjpnlQKUZWzznhkydnD2o7EsR3\nNZ6sFRe+9JXYGwGB1J7W/j2+pXvhXB2dIp3FwUCWFVnn75PFMScGVV3qEm/s\ndnogbgglRafWrL2ULexEqy2hhvvWmEvs61SBKWyvDZegTaN9a+sqT25CJCsy\n1irzTnrz4MblzBWcCeqYI3+ef0BXwba1kIApPt7UJWSLGgMi9CU9OSUaHWVN\nWR+ZpMk101bx/zMqftM5Ozf6x1YapnqDYOgVmWL0mMKxwqigKxixgHiXTTFC\nzkhngQVxJffm5lz8kjtsd3z3f3jtqpeK4bmeZPd9rVVmpMuDI60grQ54RSE0\nwClaW3FMX/k979YTNElhcVgiGxZTRnqz6R5eaBuohDEnYqkGleEoB+WbJNJH\nhzWy\r\n=WxnK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"c2fd8c5e2664a9f8c51fc043a1f7b4b3ab0be2fa","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.0.3-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0-tezos.0","@truffle/blockchain-utils":"^0.1.0-tezos.0","@truffle/interface-adapter":"^0.5.0-tezos.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0-tezos.0_1582050363509_0.36795417598899904","host":"s3://npm-registry-packages"}},"4.1.10":{"name":"@truffle/contract","version":"4.1.10","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.10","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"640b41159306e44c1dfa4227145759dd92108d1f","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.10.tgz","fileCount":42,"integrity":"sha512-TRec+7oQyrxfJizYbOCGM9+Jbl2rA8JvBmMudoYmw7ZImJPerD2pJwrfBOOAG4oA3Z4uhW9+rvG80yuilAiu3g==","signatures":[{"sig":"MEYCIQDzqBk54yHuC5zdkowyl83DAajqs1FLyZBzZ9AjdE+6NgIhAN14gPml5gNTGH5/NXR2hoazIGkBGbgDwYy1E8N0fIdW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5701932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTy6HCRA9TVsSAnZWagAASfwP/0TzRnqhA7RXg7KBxafC\nn278yNHu0eqi4Rtiy02VlQDl71Q/GJHA3nfG4K9w7fvvOJhzEEKL6h641mgJ\nBv7yr2HcSS2FXykD8k1MHAxbQHK6JsTcOJGVxfrtq3efbS4Tb/PCLJXCm918\nXxFJ9ygu3KqWNWPIkR2et5R600P6VtGMEgFPWkauuKh5klpyKTsi6LDRANpb\nlmk36nOpMw9iuEuMWHaZ/BAnRdz731JnGxORhz9LCD+ncJ2PijVX2sgErs/r\ndpAXHJo+QwcwA0da5a4iaUr+pR91tGyjO4vOwH+nl0liK2XaGcgL/k29nYQd\nI05QpnSvYGZ0VY1Sk0z0gMllWJKY3s/NB3dC00yYl5M75m24iFUCBbCWXmYt\ntBEgG8PQtQEIHL/gS8aIAZ8VfXfneOS3X7bdeRBBAB0ibZv5r9RDqT7gvJ/B\nVmWAyOxwiwnbPz3RLbwPGkHkojI/yoTWPKHYWu06S0RLpPEG+N6aSMeDxii6\nsFvCbGaQEyRtK8lkhYJdIqiszypB3fqxIcywoegZPDKkm3hI/Epv6Wu+FYcx\nxq66WDIx3tqcK6LBirIK4v6tMU2bQYV0fC127XQ/lbBl/iqK3+UZu3MiG6k4\nrp9KNiRgmZRVxmVzS7QCVbrUgFyJ6oZtL+GH/o4+d8bCt1Xj2+S8YtSU0pc5\nF1Lg\r\n=Umh8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d17ead2e56b6f2ab43dc235afec2c054355ba1ec","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.22"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.10_1582247558781_0.4074599035400237","host":"s3://npm-registry-packages"}},"4.1.11":{"name":"@truffle/contract","version":"4.1.11","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.11","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"660718e253e81d97c65fc93a1fa248bb1d400774","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.11.tgz","fileCount":42,"integrity":"sha512-gU+DXYlxpywmfTUMkbKb/mPENkMtNValxAFPjPY34rxKzMN4LbCzoEXPRUZJd4zBsoMY9ap20l2AptqETIlwUA==","signatures":[{"sig":"MEYCIQCEOAc4HOZKKhD68jH0g5s4LYIiQoyaml3SH9WEqPlZVwIhAIxlWXFrpLBUW2TGvEHhFrxbhvbY5xmaHvNtHYhP09ct","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5703882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV/3zCRA9TVsSAnZWagAARF0QAJ6W4TxKgjGtBGPKthAu\nwaq4xmLfBLoPa6TdQzl7DmzIggk2eRQ3y5N55Zl02NiT7UURsvBrtLofXvVr\n00KyEV2DtvLfzaYiey1m0Py3g7wv3d5IKfxDiUwIVuRdeP3LZsEL1tk8SY34\nPpEL8jeo16YzecCNOiPx3xePauzc63dtDTDikcQoby0WWnrIm4gIBFUNjDct\nd2AWcq2trVI6kBcqOXPd9DMjObp7496X8VobqUhWeOAg8KBLZJdrBJvSSgTC\nyTLa/2daddNKrhhxWRM7MdW0bizgIPO//DEKbUQu+8pOV9C+hnBDAinSsRrS\n1yK8oqGPI0DuypvrHR7eK4LJ5HEyy+Ya9wbIFY/HX2WJOwdSTxyMWNj7AXPI\ngXqKls82iqxmHPdDI/iEWa0dCpnafdbQyYGWoqaruNYIW3JaBEq2k76S51dA\nf8cbflJaycdkgfYiyrGU6If+aCAj2OJBYNgj1ykrJWR6MSA8I7QMB6zmRhm1\nWYcAmDq+OqDIfI8nCM0c8AVpuqPneFFbzr3vE0J4In+2t7q5JPd1nuQbXcBr\n93wA+uVyJ9i86mckVflv7lKGbZCDzpUqIBRbJJhPqxmev62TNN2kYm2RjB2E\nw/R95R4RjekBuS/LFpSP+DvCMM2Pma/wDXH9p6bsHC3e3eN7jtCUqRCDhjQU\nEEcv\r\n=P1kf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4373b07e9f479d48470c647f5ec1be27c23b1a79","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.23"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.11_1582824947432_0.5693161897905785","host":"s3://npm-registry-packages"}},"4.1.12-truffleLogger.0":{"name":"@truffle/contract","version":"4.1.12-truffleLogger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.12-truffleLogger.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"faa813588474d94fa980b4b898132da2e2cf20b6","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.12-truffleLogger.0.tgz","fileCount":42,"integrity":"sha512-wV/qqEe9ntqEe5WrR/SjI8VunlpsRSIQRkYrPXJ7/BL9k/fKREcdYR8tyRChBUYi3Cvouqa0sFUIHGi0NA8mQw==","signatures":[{"sig":"MEYCIQCNHeanZuiPrtESYRCnGqqWwi2vOPigvbo0AYN5Go1x5AIhAKr2RAwdbgwnjCA/32Qkzi00etZky4LZ26TZnUe5Uryn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5706188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX/OsCRA9TVsSAnZWagAAjzoP/0Eb6ZUXgJDj9b5kZBS9\nMSmdEURF+0AbZCFTari/MsXN2NARNidxdCPo7HIT0DSyLTVzG8EzZf9o13vk\nhsn1JkJUlRt0Rjr9s7IMzewOU8vzgtc7Rq+59P+MQdu12tFLF5GeILxXcz/r\nLjUu/pYAbpam0T2NUubEPbC0Su8OHdMKEUGNAAeHZcXTTHgU12Ehf4ZK4R+2\nUhPbx6YAtKcn/X5ObYYqtqaPNWJ3omszB4KuyS/3YhWdqAgLCXQ9Zm/+9kJI\ntidZRtg7oP7+9V6ZvOz9fzjXPszvjWikeO5VdZ7kWqp5eoEbDby7jryPMneU\n+x9sXoE5Q3IuWRvRFz0N1IEpJLb6KeDc8CIIR0gSFS9tiSRDyn6ENsbgA+ua\ne5Wy23MNsllte/8fQ+/XsSWmq6fjpSlb+X2FidJzZutzzkVn7GxqFMskIqcg\nwDpLm7wOoGuPhqi6U3qlzpp3pE0XCpgs6MWxcz0lglUzFkLMlqFfTXCa7inz\ndn2NrEMJnZqUEf2zEjiZNcv0YwCfkozDyCbZeyk8oUzHuwFGWOoGbaDuKhXR\n34ozyBoOmxZtGz5QK3NVo3B+/MRxQt/Dh3pKaC6wVLEoQyAJBINLIk4g7d07\nu8FWPI1fPnLmtlTfzeq6abd+fFvEMxSue0lf92Q5lnaz7V44vYoMYM0NXrVt\nTlXR\r\n=in5g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"13d4e7e694fc0fb8036ef9ad707b876b8dbaf0d0","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.24-truffleLogger.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.12-truffleLogger.0_1583346603311_0.6229333055223647","host":"s3://npm-registry-packages"}},"4.1.12":{"name":"@truffle/contract","version":"4.1.12","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.12","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3f9e7a299275ffc78ba5c23ea67de34be3239f47","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.12.tgz","fileCount":42,"integrity":"sha512-VTxbbnIUFKCLdZWDzmCaBhT8sRpd8gCWBiAm5xmYD217fWmhnDVubmROoS0PdXuAFhhvAsS5ZeMSywiAgh3vSg==","signatures":[{"sig":"MEUCIQDcLYWNKbHz3sD9bd7jjyvUJgrbRDZ+OkDHbI8FOwncmQIgLi0QZ7qd2ljI6jo/uEgouQjHj44C9ZqJlUOEtRXAHNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5703882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYVVcCRA9TVsSAnZWagAA1rEP+wfhOXA/SGYDee3y9XWc\nIakVx4cpWKGnlJl7OZPZ0YSWGDv/yBfx3vFFeRZF+GZHtgXhXTRCbMjOCXL9\nMtRLHepfURX5/LAKYdqXLWRk5ewgxXbfQ1t/M7BjuGCQpTHuLKF4/7UfU8dv\nmLmQZULg+xNSEYYxjsLyYZFj+7PjQgvFC9hhvq+SSzmPRYKKQl9Zf1RqOhSw\nyq/XZNb96BjoIpJYCbfWZgoJ0m1YC3AeavvEvVa6xrOrXrTxV4mb6yF0Yg/D\nbjZURugZMkzkGg+zN+zClHmgD1eFX5ST4HtZU+wDtYbLJmEgOWDan038BFUP\nEv8j5iYvG6a7e7Jg3wSvzoiLc23ihN5lrIKlNgBiC3oAw3E+tuzphiRPjbQ7\nD+YGcXkpu/BdhgT2US0PtHO8Wz+vySgpl93l2ki4iQ6o/SaCvDo1S8Ynwmro\nf3wG6tak21nsMZacAXWYbuN4vpB1/0YCt7NsU93gOYZrRnUbp5xnV/HJ0wyT\nWcoS/WSzmeN6ClNOnpRXNQag+IoKESbseAwnjwcbF1bhrra8imLsh1nOKhlx\nTRenhPj4dEMHhPXgBiYVp1x3FyDDOFDJPp7f9fJ2mhjOmBB1AmqRiu/uDXZK\nGq/vrK6rJiJk4ujPjTztS6pxL1VVDOlaUU4GEdTBS1HR7qxFn5kKQBU4SdSH\n2QPZ\r\n=9jTf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ed4102bdaad4bba1b7f093bf3b4122ef5784e853","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.17","@truffle/interface-adapter":"^0.4.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.24"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.12_1583437147563_0.5329349964609775","host":"s3://npm-registry-packages"}},"4.1.13":{"name":"@truffle/contract","version":"4.1.13","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.13","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8703ff787f73df4fe74a0424837098e64352100b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.13.tgz","fileCount":43,"integrity":"sha512-LLtRU4rRBd9jw/ngpYKwr++pEzdR64/vu2UjSxeizP1wIDm1XAIJ7BH2QiWh4PV2i44KzAfgvPtOwgbwr2hvdw==","signatures":[{"sig":"MEUCIQCUuF1CX+HdtFY2o75EqJ9uvTwVJCfj3W3FLhIvFoErhwIgZ+gyKVB7YaxBow+eCvgrsrcQVUjMWdzIiYQ42Yr4Sko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8990202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeasfmCRA9TVsSAnZWagAAHGkQAI9PtTOck4wQLqipamxP\nQRkqXQEAWYsxxaHuu5uWRX7ggeYoldISN3/WEnvHc/o5IGCPOhshlJVKdEGH\nWRsg699GuGIL9gzTHbGw+dL4UiOWDuBhIVjm8nxiD7SeTqN7ArrpP2NuCuLp\naDQHim3wxp4sGYOO4UsSuZBcMvdZjByxuFNnYsdBbnwegCN8zTBadRefAYH0\nHqIoDmUn3p8mApqBR7n5Pu0t6PYftZMuHAol96pLQCJGGfyx9mquxyZLHN1a\nUDp+RtjEJ1rb5gI+Xuqu/c0Uh+Ikek2txICWVYea7PgXZq9jvjuOPf7ZrSVi\nw3H+yPpmBvqG/6txz9MPgNlrknSjq2nqXEZS2jg3fUFls1HwcwjARk5+FnW8\niS7H5zAOnFyHJq65GrQGYDERwsngymxRjlzSlvJEQ2T/Id/HV7l/j/o2bVV2\ndWFG+VOw9gO9ck7xM0WmVSk5QhjXeuLzwSDG6y8JzyDPx6dm2evjsl11ZgiF\nNklR7T4UFBYD4/7RFG29CTq3uE8McDAcaabUD+RlzMLj6aKjEr3DkWnfmbxI\nHeJXb5VmB/o4Xz94CnnemK/ZJL+9GWfLvdfAwe9c7Fsdm+28l0fGzn7oMqlf\nw7FWfOHWEOaSPCbOk0XoCUX5BBVLQhs6Ww5sgdeQKZ3O3OlJ0jfdi/GwxdAr\nXsx6\r\n=jozQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"22029d18b866305f67d50ca1844f3057b7145901","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.25"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.13_1584056293519_0.1124210305095763","host":"s3://npm-registry-packages"}},"4.2.0-tezos.1":{"name":"@truffle/contract","version":"4.2.0-tezos.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0-tezos.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"56f5877e422297f5d6cf53a1c37c3a689882008e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0-tezos.1.tgz","fileCount":44,"integrity":"sha512-4zxewPL80exK7s+pvmxgWi/6QHluLhLDPUZxktYBYEjDRnZO9XV1sxOgjA5qGhcUxt1FQraqZbKaJbt6W25zIg==","signatures":[{"sig":"MEUCIQCWgyKWmqlJRtlKZv3g0B9+yGpybAG+YORCA7SGN8wxWwIgImN0l4Pu6SgMDiWjDAUgyeZ/cIlmn5Gd7dtlVnqDkuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8783460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb/4eCRA9TVsSAnZWagAAJjoP/A2v7OX2dfFz7Tmjd+BC\nIVodWc/Spog1d3Z1xnHkAAJ2n4uS/JjnWuJoABqKai+vRUkC3v+Y8I6Rr0I1\nDqeZq4p3hLCzeuk8NYR2bnTtv7j0NKeU2LuZVP4Rmq3Kar+N2jefYEYxO0NR\nb8e8y4Q0KUTzlM0bKdq82SnTaJrVxaSdbX9Hz4ERXukwAxrYrD9KuGbyeFhG\nSsT4Ul4JH525paMFeQ9LsfKUCAONzYNZ2df2mMqvyTGX6ZfLoOz1jNPHt0iD\n6HyY1dr0Di8iOYRHQMomZ/l4lr+7hgIDMiQUm9OkyzxlyO94MzVvhpCtRWaQ\nchxDJx8xFXRxB3OTHGf2QSv93aly9RAsV5xriaanHa7Qo1i0Ciu22KvBgv/B\nQgc1xYwn7egXd4uwwkhUQ5LE1dVC7NehByc8Ke2HfctfX805xeaRKbPP8q/Y\nMYocjLSxLv2PcbVW86jkijyDLUH9pPubTxOe5FAKjiN5vtNe0horaTcTfKpJ\n3lvWCiJbxgdAD6PKl1kkjWFEw6jYT9EyShHNt/2IyX2xwjkvEICHk5yykGdX\nyLXXOqGHNnblyetF4jTmrDOiZuJBrb0zN+Gk26DRFpl8Q5Hdfg9baqvQi7P4\nLugjj3TrGmOxKFHpAD0NxBmhACbBpf7HIZJjj/MD2+A3QELEiv9jjvfkerUb\nMCz7\r\n=Ah35\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"e8503f3499d8d9a77a8c6800c0c86870724ec399","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.1.0-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0-tezos.0","@truffle/blockchain-utils":"^0.1.0-tezos.0","@truffle/interface-adapter":"^0.5.0-tezos.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0-tezos.1_1584397854437_0.3916892412776838","host":"s3://npm-registry-packages"}},"4.2.0-tezos.2":{"name":"@truffle/contract","version":"4.2.0-tezos.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0-tezos.2","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"be5558205b58fcfb65f68727d893c911504e60d7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0-tezos.2.tgz","fileCount":44,"integrity":"sha512-q1UNaEZGZ+EC07gZZkppdCuo6UDeKJNks68HQFntOPfkZDtdF8QlAcqU36yTAubkvWRwTqBP5q+ctM/k8El+Vw==","signatures":[{"sig":"MEUCIQCYELwHtgzCfWstpUYmx4PbMLTXHVgfetPL1efQiROnFQIgNA396Ib4mT3IV5VaxtEfiWXbxM6Y9BaiLZh/d8naVi4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8786219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecm9oCRA9TVsSAnZWagAAg4cP/ja/KnE1XqDKaQXUm5ts\nuTr2aDk+3q4GfpN/DpPUm47GF8KIrP9huFNmN/Hvp6mZCFPZir5xNlcytNoR\npqrlHS98tp44PKtT6yDCETccegCNtQfeoukya3RflC/3lLegg0n7wB2+lpN3\njcNPqV0e7T6y9RlCp5xlFBIiUdJsEta3Svtmfq4c+T8DMB53hhApawzV1q+9\n99IQUha0HyH9WmydlkEUtfmsciV70sTjoB7r05Y1ly8FJvixUWbpPnlw7NqQ\niCWZG/7z/IpYB+ifC/9v0uHtXyuXwPsvmzyxM5wnjDlSwDbJSYM1duQoD/8Q\n4sLaYexYwCD/Ll41RNes+Lv4/2oPV3tbd7luyDtG7Y8A+vpzkxJOHRyW+nbF\nHE+wPB/j4liI4sN2kAhCbHoiJVDrUD91I5n24gEsCR66tePrwOLgaV4Q/+DO\nw18vwnpddwGyiCgFJY+8FyA72gQlPs9tIjBi3XXx8wQE5BOQDKRxGpnZwULD\n4bLajYYt1qOCj7IXE62/UyaFy1tcImDQP98ADp54B8rlkMNAZnoAuL1Gd09C\n5V5FU3avLmNJwAESoWcy2DbZM0phNeJP3hKE71evhWpeJuTThiqw2NVmwskG\nLhVVGIGKijACRzYvtOoBE6DsnkCJi8DLa4WlyslbKK2qxlW0wAbR8lWqQCch\nqjqu\r\n=8JxQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"ca59183a7461b58567e1a3052293951898c02fb0","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify ./index.js -o ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.1.1-beta.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0-tezos.0","@truffle/blockchain-utils":"^0.1.0-tezos.0","@truffle/interface-adapter":"^0.5.0-tezos.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.2"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0-tezos.2_1584557928345_0.59713850056649","host":"s3://npm-registry-packages"}},"4.1.14":{"name":"@truffle/contract","version":"4.1.14","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.14","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1fe30d17ddee573390c81a2dc2b1b2d5b3cbad86","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.14.tgz","fileCount":43,"integrity":"sha512-rXopHO62w0tnQ+aD2X5FANvopzfD3/lXTiuY7pU0GnHPpCjlj00fG/oh1FAEevQiTLKZaJXiHftWg1tbPAcZ5w==","signatures":[{"sig":"MEUCIQCm/+Y3HeG3n1apbu1DVPNqIhxZ0Kjctq0eanMxtjN/1AIgPw5IRLdW6/M8Bb9TBxpLFmLQfEZmG6/adBYY3rsSAFw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8990202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefVZBCRA9TVsSAnZWagAAPFUP/1lUwADwo/valwZm5/vu\nBwCRYamjC0Tzotc4Hh4QBFEah1Z+1lX5zd/eOprO4qXtjg8Q41qVicGjVo7h\n1fSpkQDsrWeuOmtqBgaBHSOHOn9FBJj0ISpuKN7novZal0Tnxwp7n+2/kaP5\n/GvaCvmW/PwI5NcNrDUwFDtntxZ/p25IQxUI4/xdd8PvTsdvBHSGLWI15TMt\nsG4UVglU4mzLk1oLhqnvcabAIB1Sg/sNnXU2kuJG88WWQoUTOKB26LoVGg1i\nAmcuDtdssbAvbcRlWCfnuEX9CpOfcij9hx6L43yLtJf8eIDMp+y2VSAP4Fgu\ngzit+Rx3ez13w2qYzyIkx9alU4FfrWSQL+1NUegXxejgxKcSci8IOsOHNKB0\nP9xLWSCyk1ri20QZProIhUHOXkbVPf7iCDGCKd7ElydzXt24OwHRaBra2ox0\nJC5Dl3RUkfREVmWrPxRqA92mhkKPfkg3S3099lgBmtMdOwCribnKGtaSwpXf\nrprN65mdFaTjjgW2SpOz2TRyPFtBK/pNkSmq/c5YWmzlGrJ3RUXoLUfSJIVm\nqq9xGz+R18i2eUIQlnQlwzVDGvb194w6P0PunaC1CWrYnPTTWQ4Qq2t+SMV1\n7E9fO6bHyx0DNzIlYOdbucMdQcgDQnzNAjdj0zx+quZ6lmaQvVn3C0K3mP8p\noQfi\r\n=r3R4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ac0e127038f65d3ff111ccc87e429909633c2a6d","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.26"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.14_1585272385104_0.7934298585315538","host":"s3://npm-registry-packages"}},"4.1.15":{"name":"@truffle/contract","version":"4.1.15","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.1.15","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c82ef6e98e02d069f3cbf9c6d2fc88e142769ad1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.1.15.tgz","fileCount":43,"integrity":"sha512-3LHxoVYBziLguvPq6u0VdZsc1l2OIXjDuVGJDYdddfKuDNX/2NuH1JYRP2FM0PA8OYBuGyFolmlldPWRzuucng==","signatures":[{"sig":"MEUCIQCNyEYi4Lto+3kRszEGWGxY4EBAMAfUk7v2X52wyX0KiwIgNsfCnoKXGjhnQLAcqz948aMM20nGQRHy154CEJVVAy8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8990202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehh3/CRA9TVsSAnZWagAAHEwP/2VNKeJJw9pLuvU3rHEq\nkg23visSVq33b1dBrd+5WsCqyDRwZUsiU+L1Zx64++esQhEtAGwNf8oD3gHj\nJOwjf8V8dW+X1BiUFF37V3HmvAC0uklCdlfGNIRySGmuYHe6Aa7CGI8EQiZ/\nyWL3hPn556cQAkolODPvmTGur4Yfs5AlwNXG0yyMbozDDpSzLDwAsIe2Nm5f\nHuNBlZ0wHpYNn0rjdyaFMjV4/lrhU71XzINibfb+9tB86DnwCLRoaEwGmmsf\ng1FINrKzzd1SvjSox2Kj1jt+CC1DHudE1Y4g7CX71ecMBYcy2AEELS6CYaGM\nlTF4avG+DY6dnk4H93pUluLFHFzc1tBOwnTBr4oR8tKV9mQGrqG2b9e+zeN8\neb2/eJQPCPmnpLfhgryFv9P0tSxKdOWC9/qxIeCgWPu1AuWPyLJMJph3S5QD\nPrHRe3733td+EpG8EZ9EZywyG017OfuXccDFF/QGeuJBzabLdHK6d6Nhd+vU\ny28BIDdMUwzfwORC/u3iC3QfBH3WSi2Kc1y8Sc9UQKMbRMuB7dz3NzYXiUed\ns1mE6ZSMOWV7bCh8kM/FN+2OabinVWBhlZEjBY35od+clp0MokEtyzDKHHXh\nb2NDu+ccdUxLqMlxLNtIuKniQWEB6QSEjZYLPCBTiSVAjvQKmUYKE06bDiTa\n5etD\r\n=EjEI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"beb8a3c1245a4ead514ae84872214ed714659791","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.0.23","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.2.27"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.1.15_1585847807193_0.41810269975477454","host":"s3://npm-registry-packages"}},"4.3.0-tezos.0":{"name":"@truffle/contract","version":"4.3.0-tezos.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0-tezos.0","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"59fdebbdcd082613b1177dce9dfbcfdbb694ab94","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0-tezos.0.tgz","fileCount":45,"integrity":"sha512-aq6oqQIZdaoXaGOfqpQX+n+BqXi51KUAlC6KutXKSLEidq+RXCKics8UMYXrnSFGPnRv7OInW+QDG6WsmNryPg==","signatures":[{"sig":"MEUCIBjcye4A+1dAFu//o9bv9N7Asg8K1EJ8AfTu/kAvPgGvAiEAl9LSdn5GTlIal6Ee+rTv8NKyT3238v8Y512JBPnuwX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14109344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejKriCRA9TVsSAnZWagAAl1cP/1cUloxAAA16ZheKpuQg\nwsXVhDVpEFKORLj5YAMBBQQ4XM+QXA+YJZnYFol8/Nj/EduyKcbmskEPwQpu\nh4YwbFIcfkyew/Kuy50HhhRPcaP4TFylpoaxIugJ8c5McXoqDE8HuKnWM1WL\nU8bpbxVscSJUGGQe7rJdY7l5tWj6YtXbfkzeu/PT0KDtISo94n19pERz6HT8\nlJVzAdREd/cBr+iyEafrNupG8Zl3+HUVoG56tK/WuoVFNhStdBz88isvDP/x\nYNHK/RqDi9IB4DxDTVl75474cBKsI20e9A9y6tZkeQE06XUnr+Zk1gPkQE8K\nl7dXFuoHpGAmNV6kcD4iwoguZNWSQM2UowcmJwCPmbmKd7TpgGQBowczJZPs\ngJs6ATIyVulxL5+7ntmMvFQOgHEckJ26bFiw2+nh9cmGYfMVebTzusMmWXJr\n6R6hfE8FzFyOGY0XWHU9LgRJbCOGTXCg7BGrU8UjEA1sivn52cnzhPFbUGQO\n4vPsq7IZCoZsZm+cpB61zPgd1KSUfhI4euUS8Iy+WFeffvaEJ1c/n3WGQPW6\niqhgQTIRbtr/OtRYCD/CDN1CNB7DMxTRs31UkwsOZ3FEuTMS4ZWA1g1eZdKE\nnnST/0LsE6VwIhIVuWJcLicA8+G6aRUib/gFRfhgx1OfNuJYyuk+iQEoXFpI\nBYeZ\r\n=Wl4L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"b23801a13abbdda37ae87f76bbcc06f2f0418d14","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.1.1-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0-tezos.0","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.5.0-tezos.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-4.4.0-tezos.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0-tezos.0_1586277089964_0.8675725905189569","host":"s3://npm-registry-packages"}},"4.3.0-tezos.1":{"name":"@truffle/contract","version":"4.3.0-tezos.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0-tezos.1","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"43249f240b7fb2b66bb8964285d0e538b8fd081e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0-tezos.1.tgz","fileCount":45,"integrity":"sha512-SO6iZoGpO7SxZMAApmDU9gXFaOtqArljafNwHyR4ob0VY4VZixJvbavVzZNHkxCh1O+tqZOxPWHdGehyn24l1w==","signatures":[{"sig":"MEYCIQCZV/0MBhN99Z6GIFVXgwTKLlt6XTC5nODNO2PvTUi1BwIhAKyklnG95CtsWlEPXHMcNnbPhm4+R+iVzb2+C9D9pVvy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14109258,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejQ0kCRA9TVsSAnZWagAAyiQP/0YVIYkY/RJxj5U4o6pe\nrxixMhZ3Oj11se/6M8sSFsd54I9OkmfSQwpUKZfgOvjBrOjrz2P50v8LgcrK\nRRQhEO3PYuF3XV5TS/0jIJ+w1tS7SV1T4FGYWGI0bFLXiGixjMK8c5MjLxSh\ny/8D5vJyshMZGFLlOAV6tw/RHnMzpSloP+N+Woc9Rg6+EsYhu+gPmB1wLU5j\nZtV2xAOhiroTOhCLj1tupPtS7dvVqxiXZdKgMZ4JldcmVgdb9VFfbfZcQHCV\npBYJmv1Gz21UsMpijQmKtDzMKAMirRcgN8Oc9ZkU6dYUSsAQ88DFNcAhXB1W\nYS87eBaCBvG6E/g1A9Pq3+24+jKqTacinrrb9IUruo0O/ZozSmT5xQbR4cQN\n1Jxnr5iHLlYoCRUwH/0HxPMFXDW9t0GxVhbF6DbTBXySRpDiCl9MWD57M9UD\nVkpz3QdT46mJYP8tBEXocU7NnWvUf6kRRHcZdY8DALwHXGt726rAa55uGqh4\n2v+bJBdq16otGypKIYfqVHrNX6bEV6OPoppD3mW1pGimoeLlsCyLkfkxl5v7\ny+dkPB8Hcc5NW+ceSIEqlE9e0CjCCX4dz8I+DJfqg3gXxNf21VA6u4+x+2V/\no8N0tw24Qw08f+BZZDGNzzrjP9ZOk5mW5BfpcSvkPdbnezhYKKul0G/BLL6n\ndhvG\r\n=V32x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"cb853c8dc7f9388f32f612c2b45592e9fb2bf7b8","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.1.1-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0-tezos.0","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.5.0-tezos.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0-tezos.1_1586302243617_0.9051245205147449","host":"s3://npm-registry-packages"}},"4.2.0":{"name":"@truffle/contract","version":"4.2.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.0","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"89da720e60cc35038749ff23ef1a049cfdd2ee2e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.0.tgz","fileCount":43,"integrity":"sha512-N+tOhzlqcMGgtUXFqaErf8HZ+D0+dce8kho52DkPB60Nq6+HbLMa1bsLweOLF7PD8xszVp3hkfzTIw2l5hXi/w==","signatures":[{"sig":"MEQCIC/DuEm8H/n+PXi91ZhcYL7Oh2rUMkPX0r0VuYRgbWX4AiB9cJYLGWqVmdzUlKv8ahih2JnnFdoQbtAY1Lfl0WTGxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8994114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekUpNCRA9TVsSAnZWagAARD8P/jDCqUMGCL+YiIpT0PDp\nnU9CSEmDHB9kJwUmQwEyfDt7tr9LVCa31iqRMzRtDu+gtRM0JDXPywHiVHBE\n12cLLeqUWeRsEpFK9esFTimOUVLPXYv9O7MhyxllumAkoPidlAspSDJn7iRu\n2P0hXMjNEzDNQmkyBMbQZ3StexNLU1he1nUrpxMTrF3+fEEyNbUU6M5kOSJ0\nJBfjgt9Ju+PE2Z/If2rJek52zDCyH31OhdjubcHN9gvAsS2Ccr/r5uF45cMO\n8pGFc2LDhwXhT7b3q3QEijLM6EACtEKOlWigizZpoUdLbPCXLsGqjTkKqHGz\n9xHr0g/iN9ahCCMfyo7d78rCbZIDHcAMp2XsjL9vTPIYD7a9lqWxu+5b/5TP\nF7rlU6j+nFS1ffu9bCkksrpeKOGZ8sU4cZOOFkggez8RgW4vXore4GiV0L3i\n/kKDaoBaI4j4YaVwttXEJ/4dDCwd9ZNO1g/nAayuFybEIFvpEIL72WcvTGxw\n3Iln/CYKZJb3Eak/SUuod5GLDsGsKuixPTY61Cb09vj9lWWWDkXDnI97Y2XM\nw9ZbU+JAuN0k8FC6EAZDhJ3tM2BBwbXhCGRen7R4tylskzwzKvtoUSQQs67I\nYeD7v5uq+sn8o/+Q4xZczHs1NwDAHvZuJ1D5RgMQxzeuA9AKgpHU90AqmIQB\nwAx5\r\n=FH8q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"64b54ad493ab80d0cb377b5453c0dbb9c72b04e2","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.0_1586580045063_0.011111294120154103","host":"s3://npm-registry-packages"}},"4.3.0-tezos.2":{"name":"@truffle/contract","version":"4.3.0-tezos.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0-tezos.2","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"88af643c09e092627646071ec75c0233cdafbe49","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0-tezos.2.tgz","fileCount":45,"integrity":"sha512-8iW5eXK441isGUt6bFu72GFxQO53AzGiN+d8B7YfKjfpiRs87ojcUNEc5L8kRSmnbWEVSZFtnY6P3GsGWzzD1Q==","signatures":[{"sig":"MEUCIQDeuauf7btJc7sKJbayNvGqc4Wh2A9EVBuTPCnYL3+dwQIgEar4sWrLOjZn6Vbw453nN6PD1qYvnD+eTJEFFgU07xM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14128675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelfjtCRA9TVsSAnZWagAAnjsP/A55J0+oR31r63RPWays\nI1Drzxk33kVUfQ856TgHs2ld7pRdrHwSmFhmpFp8H9RuDPkrA0wCKBA3ixJ+\n4Xxktax96kJ1ROSTasAwsYgR++j3n0vV8WI8XVoFeFoCc+n4AAohvFUNyEdK\nyNrv8pUY88F2LLU05JDqKIII6/P8To/agfi3QI87aSVYA+nddQehh5FruL1Z\na4ZAxsXdsw3ey0kKt/DAM07JugqqAn9VLB/bwSiwnDB7JZ7kFg9EL4k2Hfdn\nPSXns30hSGc/z0GW3+/5aID9quu9kfEMmyyHhQjZuRq0RVxVPLHz9bmYpD1p\nfGlIIR8qVyHygrkzThcVvqOH/qeaReLp8cMts1CHZZZzV9uhB7Xd5HuFJwmW\nid5zeBg31EVrp8KuYb+Dw4l3oDmZVDyX+Pu4+4hiuPw/hV7m0wsp0KqP2XGd\ndApwMPBSfutH4+fKHMSV0M9qf4wq6laBImgVanV5eGArlqHhREEjtpZW+InN\nyjUvqQuSIYWH4WBS0gNt+sglFGFtv7It5648XEzHb8XKGMxoJzbxjPKzhZ6J\nqL+KhbJRQOmjxls5uSBxdhNfppsgExuj4zTsdblCHDKiwZ9HP9IRiBXUtu+j\np75KPpkGx8MaM6LBjPm1bsqjog4q0/BKPsmjW8KyfZIl9AFg+BFSZlLT3NMS\nw6Yp\r\n=zLiP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"aecd069dbea95c3d0fe81e9d2ef0e81a1395ef18","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.5.0-tezos.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0-tezos.2_1586886893097_0.3001631095354864","host":"s3://npm-registry-packages"}},"4.2.1":{"name":"@truffle/contract","version":"4.2.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.1","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"40b6125f7d35487b1b27c775ac6febf4cc0e8e64","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.1.tgz","fileCount":43,"integrity":"sha512-af1rUyU/W75GYHt/i7r+NwHozwaCma7V/q/+SRZ3Cw2MFaGOQ0dA/ZGhH8P1F0fmDiUe1DBEIbKxXWai0PWFYg==","signatures":[{"sig":"MEUCIQCG5cnq/c8OAbqycZp/Vsh3pISQwatlvyKMmTMuKh8/ygIgOD/ZH9TEADNWGWNuXuqOkxmI6ANx7qfBy4IqqX/vZWU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8993940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemMsvCRA9TVsSAnZWagAAmpwP/RDmgzoWw64WTFzrnVgn\n89U+lgo+pBsT7FCDOsBT0uL7bKdUe5R1Ctn3olG/tamjnZDgsGOcevrtT4oj\nja+fFp1XEHnmoTo3FOU+HQw30TNVhXTfOuY0efOtVYSe/oENekaGUbahREGf\nwhNo9AmhW+wDBSRc4E9AXeIFVz793nr1EVFq2CZb4JJgzK0u+dfMxWbFu2Dx\n09BwpmWs5fkleqXGY7qDoZ1s6LPHSIL2EDd2ujrjdUUOnjmL1D4rRjn/zeGD\nOkesVdZVTeY6+CD1f46OH4h74j4j+UthpIqGtIyF5t7lWRoe3knWZKFH6UsM\nN0hZyZ9/9Bd/Ckpft99RjAhO+OxlKWr4PZlDno/mtUgfvnhmKMZiSPaWz3ux\ngLJxzfPqBE7vN5x5aQlOz3CgbZ5jPQhYZUv2a5QIUVcnSj/D5M50zSqABXWh\n3FdXLZkLgLh+BQwmeWNCNgObv9L0d+xpshxUpFrdmd9e0b4fioeY/O3aYBnO\nr6BFx764OmyOeWwBvvlqQ66bmekKtRF4JU4KHgjOqmXgmRpx4+Fe7zUM2HPy\n/qCIyQxwIU5IZSprCOWg6X2TCNYLYyEo42nlz7u/OLcPARuqH10wah8tGPiJ\nrQWkUDGM9YP2sDniF7Y5t/Sv5T5aiHw/cViJHlWh/pn+JNhRrrG90OHxf5M2\n9RX5\r\n=XZgi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"3a7fd7765229fd9e14a12a061cdd7e27042b2dfb","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.1_1587071791145_0.8093693461979798","host":"s3://npm-registry-packages"}},"4.2.2":{"name":"@truffle/contract","version":"4.2.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.2","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"13f14b1becfcfefd73247e1acfef6bc4f3e48050","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.2.tgz","fileCount":43,"integrity":"sha512-SxwXITIgBYysyMa6/G9zU3yZCzPfHjqDrbPa5QSlS6n3NKMd06mz1L8slV9iZdzqFWe1Rd7U9/bGP+UXmNiScA==","signatures":[{"sig":"MEYCIQDSTpTfp6+00aH4+fd3L49gVP25gZa+aYlwkq18SXE0BQIhALSgQ3dMjPldORloHTKVJXxFbn8rvQZWBMeJk+PNnzqj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8994086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeogmqCRA9TVsSAnZWagAAHMMQAKDjo10gP/JfxTsWwjRJ\n1VIXZucSg3goMa0oAE0StocAJYBj53AvHXGUxGRtpZdEcBx0qWopd6d/BHAi\nCqCLnl3MOpl8+V3eJ3SHXjsP+eEVZEMcEFXAUd/ayZ+F+1chAfZqSfQAzFgM\nXFgVKDX98dw6Pxv+x0c5O1x/EwS4Ux6ibL0G+86pJlxWnau+jSInl7tzEyAu\nA6Jg7CS+KmQK2KJoqwleUZsiVgr4q0p/aP2AZChDL1nunxyoKcwLyP/xVNrS\n+WZ4Pz39x8vXDMMFbuGwhHkUeDmjDZz7zoi/v5n7Vsu4O88H8Cc1p3iiPy+A\ngC13aDEdlAys2SkniLBreHVWVnqc7t1SWZtwvBrLc3VDEvWh9evghgs+PH/G\n7R1edFHbBPyhsjjpLfbFvgRDh2VvKv0tDY3KXC5VRuXnavpBIWuTB3kTIoxx\nSNRrbNYHVcr+cdxQIuqqmwUZ1GIg1fRQORTjT62/JQbss9IeS3JpqdSXs5K+\nI9nh9iiWWuWFPwj++EqlIA+3uOySXpYQ7pgjf34bwDQx9D4KpliTRhsAB3ID\n+ZzuQvoFVVOuPO9HgzL+QWIdzpTGB3NtLSMQxBYHZVY6qKiYTbaSzN7JnxPH\nB9fW5Ao74DrftHZYbcs9rKtk7KNDu2b8a7TZSR+8eEaAbA/XpioJAmdvdy1R\nZDEu\r\n=O7xl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ac427e2d1c7f53c7fdda5f874518c706f0bf12b7","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.2_1587677609650_0.1939512331629898","host":"s3://npm-registry-packages"}},"4.2.3":{"name":"@truffle/contract","version":"4.2.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.3","maintainers":[{"name":"adrianmcli","email":"li.adrianmc@gmail.com"},{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f64a76086495943121eef6114401ed1c4bda7912","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.3.tgz","fileCount":43,"integrity":"sha512-nC6BNvUTDWt1zceDQkrIodaYgwN5UIau5tMfSM4FuOYMAHKxytN7s9fC6vLzyTFzFHohyQ0fEmsCEbRNDGjhAQ==","signatures":[{"sig":"MEUCIHpgAIjmTSSbOL+/W4BO8so7Z1XUrrQvdBePlb8QezoxAiEAziQ+zMMCQuCltshhU34QpPUcFi1B1wdNkNH8Vrv2rJE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16505915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq0cmCRA9TVsSAnZWagAARM4QAIqQ771RQX9tAeR/wsxr\nzGCrdF2EWmu7PMBkXmYoGi4vKtc2QpNJaPv7uNWTY+QhrBNy76et/UufBWrH\nrHqGOw+jBA/tr+dzDPrIHCXaaYi3tqKE+HL25McAqJ0GVk21tetIzQTCYi2e\nwL8IyRYYQLS68lmVEpfCqp9OdBe8P3liIziV7wZo5HbDbSw4Xm8U6Gn7GstT\n9IeyXFijB40bLoEkQ1AWnxrnlXtf+DMZBObC1TKX6xYK0BKbAemUXKIbVvvd\noWKRwxqNIrflLLvD+uUoH+1NIsJJIoiSN1ZiiZmH3hhaiUa52+amGe54Dwd7\n+HnpDRaDMB41bb/7JrlydNzISaChz9p665dMpGQimaro0B/NaGVkWiHYIpGR\n0wwul9UTK03U/qCcpUtGiuVaNrAx9gx43l/X/mrR/I9Te1bEDn79h8a3RTqg\nQMEsXuKlGXKPK9aLnN1VXli0GHgsZCgmytkEQCZQ86pFyuhSMhpU8mAACTev\nchhokhNCkcafwWxJ3gzkob+dwWVwqNhGPmywa5BddzD1flurCCDGIA5pPJVC\nREq4EcZcVVgXJVxfwSIhWCdbftflVFPXP70piyF/5fCfsBZlYDwaVmLaz27n\n4ZFHnnufIEZd0W7BYRe7qgHZHfmtcqDjrDR/ozD51ipxUY8bN3W4T+zcRNGH\n5gyB\r\n=x/lD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5903e61a5ae3bcba93091db5e31d238e79fdc118","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0","@truffle/blockchain-utils":"^0.0.18","@truffle/interface-adapter":"^0.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.3"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.3_1588283173447_0.9163913956502516","host":"s3://npm-registry-packages"}},"4.2.4":{"name":"@truffle/contract","version":"4.2.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.4","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"850983d51f6bc123bd3d9e0272d23648c13dcdf7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.4.tgz","fileCount":43,"integrity":"sha512-91CELArpITxK8uDgGZlWPcuBBLY0Aa4bqEPZFx3nVH0p8n4ncj6pzUvBsis/zkp8XbwETIbbeocc8dM7dLgO0A==","signatures":[{"sig":"MEUCIGhBjSARbmWcvyOxtWFEQbI5QcoTOd6jBVEVzUTHv7BNAiEA8XjwOo5Sp/1VqP+pd5AQFgZCpmh+exTfP74Ts0xxEOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16505150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetjGPCRA9TVsSAnZWagAAB08P/1Zw95MFA070fSiPMBCd\n1fY7NcW/6YeU3Sk2CX4LckwbOtBzg1CDbx9HHsDY06Hg4hu4vkAXYp/3JQvA\ndqYdIy4it/Up3WHiieEXPwK3jc6iBPN8tJ/sEtUGwUd8yxeBWflwTbOozVvt\nQ14zPPdtkqeowejrsLPjg5eEtuMMqLcZRbtf/m8Sx7ROv8b0Y2HvA7IpU6l0\neKCrgHQBbCvU3pR91LvqJdm6erW3edjqAaEa47nilYZogzK6mWeTj9yE41yI\nSRGOd/9ukFWeWdS+vrcnIid0UDLb3w0RDk7MGTKZ9/wV0PBVOcAPrPfUZgpg\nVTdnjO+OVLOjiqjUFHNkgINaQ3qEMPafWsI2xejtVXhVwvAWKjZ0k3dAaq6O\nKqOPSgMqyy+6P5nXrVpZ9VanP7cHzNDcsGjLzXr0h6K8DCxnhwb2A4K0+6Qe\nPBxuZkq+yOGPBqfPhvM/+DTq5CQWpJ9UDjJ8sVmhQBISqjHNb3HPZ2WXn+TD\n5L+FA/7n4q4L2aE/t4d4vWFgYO7GqLWUeU1USt/D1T+LMByueZ1xAUGwjeLd\n60vXvuWfC2MdlOaiAHxbbJZKtzFA9qRtVZkN4T90Ce+fiVeA80LAvp+DtqI4\nnqNAQIriunVhV2HEYRWToq74F+GVefDebKzTN0P5bJzmXPCW6UeypOxXAry1\nlibi\r\n=Wx7R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"cd27f14cf31ad6d3201ebbaa9bfa5eb83dbc590a","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.2","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0","@truffle/blockchain-utils":"^0.0.19","@truffle/interface-adapter":"^0.4.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.4_1588998542677_0.6067410301154774","host":"s3://npm-registry-packages"}},"4.2.5":{"name":"@truffle/contract","version":"4.2.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.5","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"fdc2db4ca56eb0cb1b6c2821459303afbc1bebb9","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.5.tgz","fileCount":43,"integrity":"sha512-UM6PnQa8pz1HF8zSEkcu8JRwejKgz7eSL59O+j8BRyEMaPiKuGZo2EGzupOkkSyhbG5SDi9brfhjAtEImjEkDA==","signatures":[{"sig":"MEUCIDxnbVHOdgxHE7MbpRPS3/0+k41QJnku7cntJtJOxHV2AiEA07aAQsxw16kO6yoA33ak8TM+Uh/3P2YjGK+flSymP3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16505495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevgvpCRA9TVsSAnZWagAA9eMP+wQWcvYBbr1B8EiN04aB\nkIs7H8Y5jtV+Jghkes8/Vu5+vVEOHcNM+JSjh58QOC7Dk4SoTwp4/+QbCA0v\nKdVzpZvdvSXIDYUkq4/SWVSSCBwpSWZWkVoOUMDA7elVNlM60erYJTyrmrGF\n3d/zQGi5UByr0/Fr0/6lbxuVqIomUjFJi1QxPnqrpKuZG+eWVxHhmgrFcNVk\nBdx9D+oD+8vCNyk7rUrPDW/6FZoxT5C+4iW4Zn+pXk+w4+WvMEizBnCT+AA8\ncRMAsqjf26/BIb4pcXKIk/WYngBnLuhZq76PPw3jjV0otQNgTX6nOC9vvbdC\nfrjVpjfOG4WPvf+ryg1gm3xVSLZK2+nb9nkak85Xw6+eYYIVP5DW7dYD3fzg\n7KTPNW4TPR9gcaxKRFYCHJV1SSx24cYyFzCk6UN2WdHtW+zscA17uoP1hjYm\njwPLX4VvmbRJ/9Gv4mcZGi4buv61xwql6DC+GCo+8ZaUv7gdGagh7Qybhnvn\n3xNmEEE01d27vSMAgVp4BXtApsMkT9c2z9yUX4AhjMJm0lUCGCkgmob8pk+J\n1REqvxRz6yeexIHCoSCwmzcl4cxMYPolx5ITH2DaU5Q/t2KbCgZiwZb9einE\nrL6mq3+PtlaxWg6q7BJr+32d4ezC2I8JejnMtU/Pr5+UJN9uVI1/QmwwPiV8\nJu8m\r\n=plvv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d820e7deb1ac7cecfbe2a323bcecce4b4f27e14f","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.17.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.3","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.1.0","@truffle/blockchain-utils":"^0.0.19","@truffle/interface-adapter":"^0.4.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.5"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.5_1589513192811_0.9577870742340444","host":"s3://npm-registry-packages"}},"4.2.6":{"name":"@truffle/contract","version":"4.2.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.6","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"548fb67340dfc686e14d7dc94f0750dc18f93454","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.6.tgz","fileCount":43,"integrity":"sha512-x+XV7/JBAFiLCdw7YR90qRTu5Y9AprPQES9hNwr2n9RO/o7on+ZUeD4CG3BsKDchO2aRnUfkc4R5byJiJ/sXBw==","signatures":[{"sig":"MEUCIGNmzhexaNuUs3x9wBndIntWAJ3bu4p4YzhAhxouspWjAiEAm6jkUdCekL2DIbSlMdArrl+a/TRvqK++c7mvLZ7O9MA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16506880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyXrgCRA9TVsSAnZWagAAs9kP/1zQwEWkbbiVEsVhmZab\nRKryIfkT07b6IfXpWMLMwFO2uJWAs6Xd2gsoGMVjMeQGlawbjW4tyLcbhUko\nXjcympQ61cYVD33+8xbb2ZTiS4D7yWQmEHhaU6BptOPehKkhxVsKoFLP3BpW\nLa0aQVrAkZYQIjjSpCETrzvh3KbjX9y/5jta2pAFnvU6rDPjKIXv1JntEAfO\n0b4sJceCK8WH2uZqNavsKtziXJ+z/SHbW2zXB+eUHproU+Xgg6ZJaq5XNYqK\n+4KqghOHKTXGfdHjFs5oC35lC9fpuW1H3jigMim9fDlyrd7hMpObXB9//Snx\nsQP+u+4eIQ96qYj8AAjqGT31wEJ1lX2GYYhXx4vwAYnlcJ58wxPbJrvANxqL\nbREJ2P8B4i0/Bk8pndnbVzSN+uDl0zHycpP0N9Jklb5H+iRJh6mDuWvDkO8p\nVH/nvIHcPPrI6JV5hp4G4WTmgK2tkhIsoyEw0qg+HX4smDQUWPrmqdbIG4y4\nxOlpUnoJ8LgJEkGQtSTEKQDZh9LMtbHioQ9KNvCcdp/Q/LTGskH0LvtFfYJr\nqMFJFTmHg7OrXZLbZW+vxhxicLY5fZ3sbw6tM361jBo/wrfGcd+79GQU8Lq9\nEUbCuXstL/JCNVFs4FveFdrXwqEJv8g4MUS9vHd1yS+9IFegdlCtjdn4oZUJ\n3mqy\r\n=PpwP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a0bbfcce1d351fdc5f865d17760a63459f8dd191","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.4","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.6"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.6_1590262495935_0.7467437220131201","host":"s3://npm-registry-packages"}},"4.3.0-tezos.3":{"name":"@truffle/contract","version":"4.3.0-tezos.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0-tezos.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ba8751565aec246d7a10d8f515e50baced13b6d3","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0-tezos.3.tgz","fileCount":45,"integrity":"sha512-UZXSHQHrTOU0g4IWL8IMAbwVUotuW4nRJ4NDhhLjltk/wJcfww4kU2spb2QimqY8nfA2+XQLPpdO8bdRSRKh4Q==","signatures":[{"sig":"MEYCIQC5C92d2vZEvdl0ho9Jxcq4H+9oJElrLf4SUT+DewPnCwIhAMwtWoB/K3WSJKYizYJFxmhwtvKqXRZ2fosr3Cj/b8DW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14128556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezT2lCRA9TVsSAnZWagAAGuIQAI8bv3ITdgFYjT1UKKI1\nTOq6RVBqixtGrwnmac4/hVqijK08ZX4C7nwYiAxjC4phFfppCVXhTEw+BxZ1\nO+4keY0+jgW1ehZp41c7PtvRY6pg7IbG4p/AJLUwYfWDmDd5KQEWSdg+c4KG\nolo4hSHlWfVLKFcvWuy8jWcwQNYz8ItD2PpCOwY9NJgpzcWPIAArlxFee14R\nsZzBVmSaK2w8v5coouM/4rH3mNXOrgaxHhLi3KAAiQ00ETG+8yetiqIonM7y\nvArYV1hxQK9dMrfV7HLGUQ01l/18Nmi83RKHenCAKn7Xi37jFg2a1Ebp7grX\nvF+Z4PFoWS15dQ9udHEtjrX54MNelyxgALVv+3cqD53KTvE0z3W0u0rRnQIC\naLLXGxtsmZOqJCDDZQoGNa0A8uUpZ3jqr7S2+psC56LPlBi5Jf4sgfg5p2uD\novrCZ8c5/WsB0IyUZMf9pSR3b4q1Drswr9wM4slJKg1soXyNjC0mbcxC5hpI\nsPC9gT+AvziZq4a30cur5bUB4sA52A7dEqfj+/jBOgcl4Jzqec9qHis3bIgQ\nFvP95crHKyLXJnFppEC/JV71B4iCyRAapgtmy2+cwiQJ8vWZfUyI0tT8jdcH\na72vitMWPdJQ6FedKEvXmMQDZwUKYDeQCii6rYkZt+4x+SfHOIICu4nuNyku\n501f\r\n=Mzcz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"494683e7d596e5a9415ddc61a2495ef82689c524","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.5.0-tezos.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.2"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0-tezos.3_1590508964571_0.05080830829335703","host":"s3://npm-registry-packages"}},"4.3.0-tezos.4":{"name":"@truffle/contract","version":"4.3.0-tezos.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0-tezos.4","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3680a204f43293f4df6b1afd3688a5c9d93407b7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0-tezos.4.tgz","fileCount":45,"integrity":"sha512-W1o8qid9d3N0TUfN6LVs8WVlDeKhAy6o6CQ6JCaBeun/9K84gc4DG5yhOFpk82JdE44gFu1r63psKp9slQfTyA==","signatures":[{"sig":"MEUCIQDsJ1UQTwzmH05p2cpO4MNENjKrvsN690oCZitaM9L1ZgIgGMM+0Gl3mDTc4ouvVPs+LINZ9Qul/YO4xryjNWz4iLw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14128552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezYiaCRA9TVsSAnZWagAA99cQAJ32S96v1q0QzbeJ4dB1\n6sEv1csvlMrR5KvAHqorcW8PRBLtPBkMxoH1STpZfzLW+ueaoCPepnnB2Pqu\ngIhKVdvFelney0mTMzXYP9G0ZeVyKXRNbtTNz7m5tVGYfethw4NToJrpnK0Z\nvwWjlxcyVhKuzmJNZ6GBLCq+nbl4OvZ1D/HIHUBU40D+j7aUq2ZcNN5tONLC\nl4ZozHXFz3YRryBzisLjpwN7V7rYvil84Hv/sR1Q6twpaVA2ylh7c3MAbwa7\nAPNBpBENOp/BshLQpecGmgAec5oJ0d2wbB+siH50Mt8cL6JpyqeiW6DhoaHq\n95UGiR3dt2VX8Q776e3hz2eIt2Nd1YnMScwACU9lqbunVxMMtvmhseKIL2tW\nhxl1Vw5ILqy7k1auSwziPDAaDLouSewqeb+ISGIR2rc7R7rVDSw4uH1+Amr9\njOubpjyOu0of2STqXH5QWFL9uvM5MZ5Wm+IktNpfEozYbnXNLF/cCjzgf4je\nCJ2CnICrLfv5RQIGuXK2Ofv1PMoKiCAIH4j/BUR+pWZkRI4fksYLehwTpfwa\nXawws8Pd7zvdeCNZS3DL7jUrTls/TaHsVENLU5PSdQzgYYPgFkjP/H2fkl6l\n9rLIhHkDkRHr+y//j2hYtxRCJMu4kVLttvfWygcKG8SvFP6teDd3xt8YAzk/\np3Pd\r\n=vcNv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"afc94486da8368555a361496a4d41f1544fb1b8f","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.5.0-tezos.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.3"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0-tezos.4_1590528154325_0.07581533312308664","host":"s3://npm-registry-packages"}},"4.3.0-tezos.5":{"name":"@truffle/contract","version":"4.3.0-tezos.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0-tezos.5","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2612a41ae60a99faa5e30970b2478075ff0c0477","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0-tezos.5.tgz","fileCount":45,"integrity":"sha512-w4GR2EWqFmIBlmscZaBgIALu8hzBEFepDBdzNAWoZ9e3OvjPzuTxAYjY77o5FgG3x2GtQpY+tkkac1hINf0ICw==","signatures":[{"sig":"MEYCIQCO/U8rCD9NZCOanHZXCS2zFeFe7qKdqCSKrUljMhaa2gIhAMNTKYnvmbH0NqCwo16uq/4ANWrSftZem7wfhIwcrAY6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14128968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0X+aCRA9TVsSAnZWagAACTwP+gODZMueuBearXl9nT1R\nENH6bW1bTCHwktwY9HXka/7wkcxkLlP1ON6gURxrEZYwWczCcaWOS9lhU0RG\nDNWv4ZnpnAxbbJFmMzT3ZDgl+zwm0aFarFskrHhf5TUv0vIK9CFQF7ryhqES\nzcvt1/HCqgAp51CD1w+yeJrYmvJQZxShQkopPd0goD1Vk0fCiM3uDtMGHYwF\nNOH0RSfE+4+g5VParouV4+VkHmMTNs8vI5Dn+kjmS+pZ3rdpnrcsAjAz2Ld7\nVgrMiQz4L1p3T9A6f5Qq74buW/MRat77FC3NhU1+tdENP7fB5xR43PC8Cv6G\nY84JZwic1qwMlaT0cgloaOJK5Mftc5fKH39x2nh7mU+IQVuiPPesa0idUHWS\n0bRN6XdteXS4Kupyy54xjH57L+UZuWM/7HyVkeEdZQu6lGB7sJRlbSyb8gyX\nFuteOZ1E8udhe8acmrdid4t6G9NpFCO3x9DdHUAloDf6cO5eadiMHdgKw7hQ\nUc/P6TIh8jRQByC2j80cHwnZk+L38rvdLSvMIqZLICzrZ7biIy13VLUu9pbp\nEXzSHHTZPAIFs1JT6cuXqmJbYDVyZwdfplEZ3XurE3rMV8qbDLL4hptha+Qk\nyxKbq8ptfsbbyDWqznbFiPHe8+YLDuFi7CHFgJANqphMnLfcPcdXxyNaHck0\nqM6j\r\n=hRjN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"72a73cd9bb556d6d528f75820f553e0f4ba0f52a","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.5.0-tezos.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0-tezos.5_1590787993417_0.275457316753954","host":"s3://npm-registry-packages"}},"5.0.0-tezos.0":{"name":"@truffle/contract","version":"5.0.0-tezos.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"aaa3e44fac22af2c301bfa5f9521105e270f89a0","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.0.tgz","fileCount":45,"integrity":"sha512-qMWOu3743ZfUKbq/USzjYgcVqtsiqZDiDos++6Rn1aIEInnUWvOm5ORhLuy5aCAj/axC7OxlSGsbdoRx+rSmpg==","signatures":[{"sig":"MEQCIDs48V14mSXmtOvUY3mGi0tCUfmPdxIh4Og0oRC0DufVAiAj2tOcNvfeopcsiGHRIzg7UmvHqmBP37a0dD6zJDqC7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0Z/HCRA9TVsSAnZWagAAS+AP/RgXivuJ2IcqwLUqGz9I\nRYrlqonQZXtBzS5oNzwylbdTEZqOza6F9V1ebByWCFHs1/1MJ6MEbtj+z+my\nDeqQ/NrgQEbCpPF9aTzAlOimUgwKg7BOeQnbNJAaBVkqZaphv9qbuwnXJDui\nLBXWoZCL5VW6vCi5PlkyZJmLdnIidlUmz4IWY77+4AKiNTVc28sXdp5n8J4s\nfcWrMB2BYVsAkwnkTpK1lNbSnIPmKO5Fg781aml9DApt47Q9cgLMKPUZRiV2\nn4qjK9IZTY7/dTQ8AdxK47jfwGjx5MW/MSIE2q4EcMdBpnit85Vky/3nPSTb\nUI1241TsY8gYv6Taemwj3o0x2z2XNW9bLaMYJtli0SjtGGCB77koH0/liShJ\n9PWaPf6n3Yca0MrSjHLo0/c73QFKSul1TDUWOyRTNw2BdoqPOfuXJmlOKjg5\ntNnfHZW8CHetB1zxahkVGc5CPGrCkc1rRzxNZ65KjjmVauOga3Jq6ht6LKKz\ngIBDCZcj5NpX2k0jM9eej5y4o8ClovJlMWaYE5oeGRApT3/vG/TuTvbSZCjC\njLHnbSDbxRAs2aSxhaMNWbxq7VtWmxI9qT64vHub939BnNgm6BT5+wlEoCDx\n8b6+WNEFpZUU3WU6/3HjBQDDDS4b7/egpblzxM4aRuGbkq55XTGjN5+I5nez\nArS+\r\n=L7eq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"f57f9858f48528c4b62b4d6096e6ab3e42d85991","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.5"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.0_1590796230815_0.26432588605983054","host":"s3://npm-registry-packages"}},"5.0.0-tezos.1":{"name":"@truffle/contract","version":"5.0.0-tezos.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8198e40853ecb39a961db5d0bd64c8edee56c348","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.1.tgz","fileCount":45,"integrity":"sha512-5NPuZkxNOkQogO/cTHxH+vB9Zm6eeuB5J9imy1fzJRejOX89rBfDbHxegdmQBnBwn/n00w/O4oWxobf7spNxdA==","signatures":[{"sig":"MEUCIHsnXg7/CbX+sogE2/X58vmcNiVkChELp3gMHLSRdNqFAiEAxQfD0LQRR5BipQw4SY+zgKBU97EHY93lQYGVtQ9NmVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0aN8CRA9TVsSAnZWagAAW6gP/iWrOdD/K5XI4XgEwJEA\nBchNVU5TtlGKt0bsplcztuTWughIP0rCOK52GUS7GY7Cjq3lJiBAA0hnNgFr\nIAVIICZVW1IJzb/k/H8ygSi2Oas3ZnGX5TRDMlzyPw8hS+tSxT+YEtfxZjDH\nnnI/0iUE7yPlFBxGrgSwcP2mzKXzCfVDVZud1Pp47BIGAXJPNkZMBjmu/F+r\n/L5bfQYBCT4JctMNEt4AoJplrZnrNq0eWawmRMRXVt332DEqxJOkdxKX/L0H\nV9rhn5ZdsckQUCLBZftHDffv05hzH/3+zYygV+b5JNXCduL/fNKIqUYwNWKv\nYxOMk15jhBnPXEkyr4M2Xr4wOaj5Ae82JBgSfauHHviT/fA/BjxkBaOXNwcu\ntOj4OH2K8X4Hkm7T+ZHpb4lNYbKXHA4PU30tDP906joiVBNYst//+Znro0GM\nkFvEEUZ0qTWXYPa8w013mEYn5HHXX4hUgp7a3+XpaEUkv+ttJURwdCpWZNRu\np5YAt9Eoq47iYw4o+5CzkvNC7gcIDd2H2USFqt6vBslXzGTPZnczKdwdqt+s\n+3WUIQLb2Bfeaw5iWirFSfAfKdNjMzaNLfU77wGzdBiqEL+QWFUc5FEg8+vY\njNMx3UFu2UNDQ1H3DC5daQWE1rO5fYWtNl7u+s7LcGCkKiSuAunqPA5aP0dI\nU2lE\r\n=oYiA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"b4fcdab91a3b94d39fa2e8b8ee9e2b61ed095ba2","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.0-tezos.6"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.1_1590797180245_0.3682201700817729","host":"s3://npm-registry-packages"}},"4.2.7":{"name":"@truffle/contract","version":"4.2.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.7","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"09f8c5a4288e37c36c0850752f8fc2c6d31bccd1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.7.tgz","fileCount":43,"integrity":"sha512-3CbLnC2isPmwcQdkRkHPzGbJRgKjiOupIocA9xTvrBMBorS7jKFx+dUc7m04Z+2+iqgOYOUYdZkYvxZQkLOjMA==","signatures":[{"sig":"MEUCIE0TcSSh9pPItC9yiBQ0HKyJOrbOWs1MxNfrOaj2Pl0OAiEAzQjGkVuB04lYCbm/ro3+xe0a4in+1ltSic6ykp2s7qo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16506848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0cgSCRA9TVsSAnZWagAAV3gP/jjE/lcSLRCc1IqX5o8k\n+QAzs0ltHzPCqi0B9+CtS1hgfdOWMFr09ZcvL4VHZ7AtMeAm/STeI/U11Vh8\nZ39YMKmRp1Tbf1IQ+rKttZkJteGg6nTl4PDtFOQsrSebz56WHYeofjrr1RmQ\nI7eAIvia0tZZZwrwHXWXo0ounOxf3RqzyulQglCvw2aw5iwx5wp/myGHFLP4\nidV8m8SrZP0451Eq9cZQeekh9EHjYoenf+TqLHUA2b0BbQDPmpq+JkukQbFZ\nyI48Oxlv6MfPt4mi+UvjXNfoMHvoIXmQklwFfVzfzA7lCviH1IZ+V9c/yOkG\nX++x41aSxIShjxJECM+Vv+rrRUpZdgQ7r2eepAdIer3ZhE7vBBjJ6V7jvVi6\nfpGFmqoG0mfO3l4qu8PmKkObDUOpDOpGI4sA7LjDnpyhkOi7eHc7ftC8PU0e\n5qcWHozqQxVQoRXSuZgF3IR3rqyjN3hLJiipn58dzMVYVoGb6YdutsqIhqiZ\nX6/HyNA4YW/hxQ0lgdzeqEgGRWQbbFDt6KtyzXuhANZTCoXmEimFog0eq93D\nqeO5ubBOrtVKxY2dTi53zfqWh7/yHRLd0syJ7jGhaZMfICsqn6xc8nJyAw7l\nGdPOT30xZAKfayB74qLwzMlVQgCcheoJozvKNfO98PRvTx1toDPguBFri9iF\nYoHN\r\n=NtNc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ec11c4ee97996f3157285059848e1920867b4ca1","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.5","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.7"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.7_1590806545894_0.9931428009171477","host":"s3://npm-registry-packages"}},"5.0.0-tezos.2":{"name":"@truffle/contract","version":"5.0.0-tezos.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.2","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c527540baa0dddb09f71809c2c669a94972425d7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.2.tgz","fileCount":45,"integrity":"sha512-MpMyzLmq58KhEgykPc2G1U5fDCTtTO8UhsDJgk2LfbZeJhrt1y/9R57mG1JkZ+yVpnjkBGVYephS9Z5NzQ/Kaw==","signatures":[{"sig":"MEQCIC6rLVPU9yiopzgqG1hZVtXaoR8++bkzoaOJRG1OtrbqAiA4seGQvCwt+1QcR6GxTHNph5GmL3LHvJfqV1KmsBOEeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1s/7CRA9TVsSAnZWagAA/PsP/3G4AOyq+299pzeqddIP\n5hla9yTGeK1jSo48PXtmEBLDBaNCFfrClCTtg7xiLGMTzWYZ0wtmvWMRTptd\nwF7OaO7np+PFnqL5j+oAQ//NDhFwWFoaU1MVDPufbte/9dq2sunKYehCnR86\nJbgilu+AhRaUgFvjdPGgPeVxtuX8Pyc2tt/T3q5htDh16ZNtGajZrYP0YoQR\nFACkRjsrZtMBqtu+quBUarugG/Um6jk+QtYeJR4aEZ4EJeE0fYsb42Uji7Wb\nyq/6ML+0DtbFPPOlTNq1CWmmkZgK/LJQYNo6rafn2w5mrtGrJgbXdxwOh+Y6\ncgw9sEvnBKtEh9mpuSbrLSheBx4fQImSEiQwfkbOvGU55qQ6bUEfet9AcMCw\nd778rPIkWVN8NYr+SxPu2ocqOujGReYdXCvbifalpvaV+m9xhwar03eU08ps\n5ByE9q7xO0WPk64kNnMv/pZpkMXe8/p9BVd1Wz39RNuNfOni81iMJyesZ3SE\nF3n0VzFqb7Hl1E/0u4uGnu49dhYODowcAvMzgGqnD+UnRhQUZ49VxkzqEBIn\nABq7YAti8KqCbQKG9Ko+xm4Fyiutoj0evcMPzDgJ/+nsB5RlhpHvqAmIklFz\noo/BzakULQhjsKD2qunyaQRSdUlaSInEkVlNtCXIidr5yzM2+XmsmQyWwp9U\n5+qp\r\n=60Ze\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"050e2927b3c1e7e0f4244d06a3b7462d26ba594a","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.0-tezos.1","@truffle/compile-solidity":"^4.3.0-tezos.7"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.2_1591136250205_0.9633045714512243","host":"s3://npm-registry-packages"}},"5.0.0-tezos.3":{"name":"@truffle/contract","version":"5.0.0-tezos.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b3412af27cbb437fa87217d2fa1b9c09916e9836","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.3.tgz","fileCount":45,"integrity":"sha512-iKW5dFKQreJuX6kvvRlaPxs5MoW1kVSW05A+wf8J680rme/xtyL5rG3GIDiVqbPs0l/hUaayRk/u56yW/OVm3g==","signatures":[{"sig":"MEQCIC6Oai1lbcqHYPrg8I+o2T4YD2QhzbVEi4xw/n+25lHtAiBqqrfaJyDPlP4wu+CKmpbHOXcsCFLMYvdqVs/RWj4A1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2nFACRA9TVsSAnZWagAAb+gP/0j5RfgXb6uBmngD/uBw\nSsz1P2FvhCJ7dXfOLRJbZPazSf0xMjuucKWyyBlLHp3Se6727z0UW4oaT7We\n5lSbL2fqYlGywV+WT8XDebTQB6Rw6HNt5DdEXYP6X3XV/6YnrfRa9DKCXFlQ\n+4JKITBQeY8r4KdaPPNyx7aMc5urUQW5vTJmk5ghLuzKuRMhlKmBW6xix7hj\n86aVoD2IBnCirlmp66a6oS9YEfvCW1HipCB1i9Ys8W3deC/d8KnnBFIedQLw\nLmP0/1QB+30B6zR42P3VBwE0LXusM0E0LR9owjMYIjymoQrWZVFmMhT0p+Pk\nHxYQzplCGFviQZl9YwsWw3Bp8soQTG82Ox8lyGWTZAuOU63nRVFDgNCzUuk3\nww4MBov8qOTxWnE20B8ueFSSU8RcnOEW1bUwSht7YSpvZiANU8HFt7g5njBI\n+Y3SMgN5aNo4YBzYDXCn/jcyjKrqFQruJGPyx7jOo0QjcpaD9jwsMHnKujSc\nfX2VfcQPQOL8+nju6o2WWIVALJZCbKqs0+QmoYwBKI1W0jbSC2RVN8fZ9lUB\nOKMjRJC3qXxBJfGv17OV84D2PAJuaeQpzC5IVfTH+MjwUOcIKEtn+EcZ6O0w\nW/bzOgwH3TvUFKymLs0VGWvG1kmMKxKww+eTvaXILKlgljdDOc69k5IC/i3V\nCxo+\r\n=uKar\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"e41e228b4574efb0042873977f742bdc4bcea9d0","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v8.16.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"8.16.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.0-tezos.1","@truffle/compile-solidity":"^4.3.0-tezos.8"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.3_1591374143673_0.34780310499457934","host":"s3://npm-registry-packages"}},"4.2.8":{"name":"@truffle/contract","version":"4.2.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.8","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b63302b8a6330f2bf14142a44b6cc233090b321f","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.8.tgz","fileCount":43,"integrity":"sha512-k6dme7e3xYU3NKV+ROM3rS2II/FMhDDDxVWPs4jT9pUAeLNeRUnFoSfIW+tmwAbrQmvBb69T5MYf92xDve7Cjg==","signatures":[{"sig":"MEUCIQCor5N0XKqq+1tNJNhNeOO3LAovR6MHOHBuwQ3Df1Ap+wIgcJ8LfsnH6O4TrEA3rrbzALpkP2FQ9tbvbC/B4+0HHb8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16505670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3CkXCRA9TVsSAnZWagAA4W4P/2Z8HLkURypDBrhcDZBP\nqcWnO7kxMdDQEHldNzE9cR4I1RVDWwBIjQ5nx6/M/4Ei4liZXDzaY93zPJM9\neriRnrXEXmDICzon0AbQVqtExEn+cJmA+eoF3hdOQo3sDoOgWbiGlLxN2P44\nylTl0Bj46tdA+OfA/Yx9tmZyW9wK/VxO64Iy7pCuFtOgHfGLajrqJnS91RnF\nutzsdWOHb0mB2OlFdudC2cBlv0KJkKmTs5BKkwmZSSl9PhpCwZH9hoUemdyg\nseT66BiRWM6f3/SvDNz7jkoSyPx4GOoR8mZdZX14fRHx/4jnUbEludS6BXQd\nhuaCsZpr1PQEn5tEyNSuO6onqNPnG6oqcocptR9nh9ZQLWiaYynWuU+vjILA\nKlOHTBFAq4r8pGxCOcePTJC2CVrJpt5iAGEp1TaMXY/0URmbayDiwF7wHnj1\n9wHc6rckZNJKI5HEK7AA9NB7ZvLFSJj8GyFdnzy8H52+W+3a0qlM2imffR5G\nTZe5IdKdxUEW+E0nhDlp4+ucCSlR3W8IHaURwwL6+PmXQCYcg4VPLpxWYSt2\n90Doho8Si/UJQg0R9LoN3upCQkEz4cojegbLs3Gw9TFNd9REOdDgGzR1s1Ap\nZcs+4l5nqwyH367t00Mv5NtJdKRv6gGY59rd0LJvww0h5V1zYttDCJ5Sa0cC\nEj1a\r\n=eoKb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"94f6c32b5f452b77c70d8b56d10a3ddce3bd2460","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.6","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.8"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.8_1591486742882_0.2762963710703512","host":"s3://npm-registry-packages"}},"4.2.9":{"name":"@truffle/contract","version":"4.2.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.9","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"22073aead1532ae92d160d5efe32e150a9203eee","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.9.tgz","fileCount":43,"integrity":"sha512-eDr7nqY4d/KeM/PUrjuSLimz80pLkDJz7j42wMl592dDn/9Pfp2Ff8INM6ypFZ4fAcTZZaNg5wiApI0+pv4mWg==","signatures":[{"sig":"MEQCICxpeWdNPj8AbVsk0+Wt9Gy+FIrD6bmw919xZxZDsz4DAiAgh8LJQBi/0k38B5eOevQopwTR13jVkoftZofIYm8ieQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16505695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5AJFCRA9TVsSAnZWagAAYCQP/0fTj8gkNLgsoKT/NbKY\n86x92yknyUm5Sk+6YRzTHSYIDb/13IBc+HMpsMvnjYgRIyozw0YiqrVJqcdc\nBzeiLOmCygV1J57VXie8cMUiboid2WN1y4E9l5AR9aCXZ4Qqj30c4t5Z1eYF\nIBYytNC1i1HSIzPh+so6F5dmV6YlbZvUKY7jcKSk7WmFg0RM6bQ8d+Hq2bfc\najt7fqfK27VJWdRbgYfFS+/8th1CdfF5bN33HDnDYQflqXQurwhl2oky15ja\nG5TwyC7bYrF0oHAhR+dAYsNtsIgb0NuSdQgiB00Mtjf7pGH96YAQ/ODT3E6P\nuULeQblrD1HFNF62fpzjDuHyr14axZjdRx0kX1HvN5KIbB16nsQSa5dvjCCy\nqQKVmAq6VnbgXXLui85184xITtTXNCvPmAj/cfdKWdI/7HK9y9PIcuHzGLyS\nvEG2LWhCIaJCRd2G8DDVzMFtn0+7huK9bkmeEB0GsMWkCUxXsPZQboowFwsq\nAjnZpyErdiMzTCKhb2D9R5Xcu6K4LrghPftAAOnc0HFSlXnsBt+Btu6oZfsD\np91OOzd6uFLGH+wbp+3kvi++QmP1SAEQN8Ffc3AZ4Hq5iKDOnGLr1Wx+JDXp\nC/3Ua1qwf20tk3dIwU8uItt6KYf3u6FXEk3NtrqZTkoBqIUNDMUsN1zYVyhf\nyD5/\r\n=8XjV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"19cee737a96c337562a61ec76128a7287ed59454","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.6","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.9"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.9_1592001092924_0.2751331684742493","host":"s3://npm-registry-packages"}},"5.0.0-tezos.4":{"name":"@truffle/contract","version":"5.0.0-tezos.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.4","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9466bd1928332bee49b3047084cf0b0b70040da5","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.4.tgz","fileCount":45,"integrity":"sha512-qk+o82gNUv1VZgGvKo75JSZ3hj2vl8MKKK+XNmi3twXgnB3LzqbZ1R5acKch1a1JNykrdLpRXmeemJ2bpHB4fA==","signatures":[{"sig":"MEUCIQDwVAzm3qY32AAoT7MSNAv+6MSC+bGtFpdnUucD/F05jAIgRcVcW22ASe1zH0NJBT/cphNognOa9er606tUqAgNrpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe59JvCRA9TVsSAnZWagAAitgP/jF/XFc/E5yeBk0HTVZE\nIPpxGIOY7X6kNuHyuEGvCISzzvIBTqWE84aI3g7AAI3kgnCooSTZyZhSciBU\nKn7Eo4f3ifY3nH1ktnkLn878WEA+DMA/ZpYrgVoj+3WwvqaANBhspd+8jCZr\nmfr4GfoFEUAgIlFu02eQYZiREMrnhRAxTu24KpK+SyFOhMeomIGXlKjzMTew\nmauX7gOx95gzyNeyENhL0Mk9e7fKlbAoF42hs2u+HfDxY4GXrrY/vPrZMVJO\nFHPRloIbScy7jJzhGNgPLCV+YVD/KXLNWTO64VgnTxWUfi3KoFEdbIvi+RDB\n/PqNgFy5XCLUOdX+kxIVH8EKtUqQi75PMFHwztS7qUBQlfZ2Q/1EaL1q10wq\nnFBAvnug8J2TTCGs8dlR8kbCzK/ARlmsKfRKkPv4CDEvCOKyIIoD7DpH94mA\nFLV4t3DugE1osPtFoZ2VbnFA+nU5TdVKBJutNOtQrlwkJNDy1MzkaDVfzsD3\n6JO5pnN6hw+iIqG9VccAdAZ1NNrUlmKRYF3vmKqMDjUeZ2lRngzz+YZ8CsTo\nsRTFokxdvkorjs2aBHfHLC+tWwqSh8DHLZvMpvZYNnumjxV/2qm4iy9JD4+U\nSs5ePwnvpuAjzUH1o353/qxvN/DU+P/sKMRDadaHPqHJ6QK1hH5j+zSa4Twm\nyfxW\r\n=jb0L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"4b518ee8cc6467e3c70c1a485a9d42428c10bc68","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.0-tezos.2","@truffle/compile-solidity":"^4.3.0-tezos.9"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.4_1592250990960_0.36802335286165033","host":"s3://npm-registry-packages"}},"5.0.0-tezos.5":{"name":"@truffle/contract","version":"5.0.0-tezos.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.5","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"adcd0e025c9fa77dc3512959d55e8714358bbe7d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.5.tgz","fileCount":45,"integrity":"sha512-CnebozhEFKQbI1LxXSzCQzOfHnpST7rL/oeq/JN5k3jtCzDx7dSiZ4yo/FtD8KfkExRYFuKnIaumHlHbdhYdwA==","signatures":[{"sig":"MEQCIAzcCrA1L3hCrEDirLFFNJQpNXAWfwZ0cMG8pN7HhAjsAiBKut32SeBkijrGWe8lLU/semW4ysjBRxtJpYEKqBXeRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5/sQCRA9TVsSAnZWagAAGagP+gKG1UwzJKjXqeH+ncIt\nAigJWeMKVvsfvo/pgZmbxae4fbAUQDZxkfUwYsRlaju0nkLTtlDf5DFtnp2n\nrhX1a5q8GP8CyOvK7Q13jJnepsPLg9Q9vTxK4SJwk5IL1cOmbgZnppTAMpr9\nK38Has044PzaUvsP2B7R7k8rAvmYzkAKkcUq42Mv9OdW0dvm/3okc16hhsIj\n1NZMB2jxniARxPx+iki09+qzsMdBWprCuR7UDOfbzsyvC73AdGVibGJ1FU42\ncbMmuS/9oSLqGIXd3g8og3CGuUyG49lbyfWv2qWBXZaTlsnq/+pGpAPlaKhq\n5AeUiMPnBXIbXejgf3XdNihKfCC45xTJXEcbsX37fXg8c0X6R7GOkqu/un5d\nhKdPUwIky+wA80MQZ+p1goAMX4hTLlf1+rZy9P4LLP+gYKEOv/3i13l/PWk2\nrv9a+dEwbVfNa/bva9N2qpWA+YuZtD2arnts3u2F8/RurWpumgfp06L57mbp\nFMvgkfLN1NUcCODLLmd8cmxz1OFeOS534JB0f6jN08fxBh6iU+7Y5uyf36A9\n1md4rLS92AO43EeMVtS41Yl1HGy0tZA/yw5qKqZlszvEZlCYkHeYNHdRWpwa\nQFzefEWtXSlHxRDBhZ/HXnvL/nlCmwYPW7to13Y/UGVaIXuWojXWskWTZvWg\nDJO5\r\n=OMjj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"5e90dfa23c8e17c22c7462aab4136956561a9ad7","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.0-tezos.2","@truffle/compile-solidity":"^4.3.0-tezos.10"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.5_1592261391611_0.7332570390435387","host":"s3://npm-registry-packages"}},"5.0.0-tezos.6":{"name":"@truffle/contract","version":"5.0.0-tezos.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.0.0-tezos.6","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c7416b0f244c818fac9d71da7cb1c05b5f7492a1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.0.0-tezos.6.tgz","fileCount":45,"integrity":"sha512-ElZ7nxZfijyNa/oiyQicCsx3Hgx0Ezais0R7WYeTCOkUUGYrBp9/SoLXZckEOZqAFdcsmXOBa1GBhmfzmL6Nqw==","signatures":[{"sig":"MEQCIFHA+fnCXH9B/aZZUyMDXIHkSPq1yRNiMnzUiaRSvkodAiACDS6WBiyqxsOEFi86g4spzypSZP+Wz6qqGW33Zvwy5w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14129937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8jK/CRA9TVsSAnZWagAAzIQP/3975xijOk+aZAMsP58Q\nUsWc2TFsEF5d9aRy0IymTF8sPrpdex3vG2hqwW+Rf48wyC30R6mBdSZ/b1AY\nI/LfyYhnLGrEQAh3amKYxyHLC70R0it53qz/fKPdVJA7WPwezCScaoapAUJE\ncQrl1hAgtRIPPuWM5K9osuZDBMQy92rpoyv4NXszikGyPopGGPP+juBSubD3\n172sLR9RpNzW4yf3AH0bAMY7etz7X5tKxMJdD5+bzeoYUDKg2mtolAldc/9N\nnLAAAs/cuYGiopysKzThAafxQl69Yw0aSuFxGCj78XeKtccgu00mq4nF7ej/\nhd4S9ZDicTGl/zlgE+FUS6IDDs5kVlqqPcUIwMO6UG2PzIeF8XRYk94c13H8\nudqaOabMgJTg6VtcS20Q39kRFAiA0/cNytBcdYSc/9CtGSof5qEYMp18mmPw\n3ajRl/cuboGyVQBUbv5Zpr66Hr9f90DMyQ+pFYI1wi2bk+PORIhWBNFhk+qn\nK/DaMzqk3W1ZLD0KozWaOlwBWX993h51+dGG0FRg+lYlciIPb46iVONwtpM1\np+TVPNyQYO/ZoqhERhLUri1yPtM8VgkwMiOe9vrMm00V829uTPyPClkQ2weY\nWsH7uductcmWtNj1fpf5RlJhc2YsSVwVxgH4Q8ro6Smkdig0dVTHZrftwqKn\ntzyi\r\n=EwY4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"307aa6405cc8c42c8ef5d8d8f50a0d27311dc366","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.2.0-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.0-tezos.2","@truffle/compile-solidity":"^4.3.0-tezos.11"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.0.0-tezos.6_1592931000562_0.8817972280394211","host":"s3://npm-registry-packages"}},"4.2.10":{"name":"@truffle/contract","version":"4.2.10","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.10","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"4e3c59d71899a8745a782a89b8a1e69fdd97ec11","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.10.tgz","fileCount":43,"integrity":"sha512-86h1qyw9reJRWmYiGkMreAIZaG5bnP4VHniBe/ufMvspQVhgVPHQtpuVJD9hr1BkXwBH9WHBFdLx6z9eeiFm4w==","signatures":[{"sig":"MEQCIG3rPFBq6lyiRfPs3jiBUzt0zBQH1rm1oYoF4ZUWA0dgAiACB/UBN8ebLi0NGn7PG97LLHyn3SLeeb9xrIqv2ZrypQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16507139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9TU5CRA9TVsSAnZWagAAEBEP/0XE5eJPk37BGqGE+BRo\nSqpK15dj0aAOmu2g7Tkerl7UTU5zjMgs1L0V5RaAXQ+cRtaZT07wqtDDBf0X\nHYWBlM2YAvYbE2wQSZ71aW6WJs+Qi3iHV0vZA2/o3w0oZkDTpil107ybFf73\n+GSKDXzwt6A5Xnfw2rmbWZy/ft7zSlgqhySs9qI4Mc3gnO2/VB1aTarQLeys\nWG2oSjzn1otaDzrygyVyUNILn1E2nOCvQZHZRMTIBSqMs0eT1SaXEpQR9DA2\nzL19RP/gI/7xkdh561aDArxpI1HoGYEN96lJMujaQ0p7ozxACKg7gpubRGUI\ndXpa/kBAWHbAKHBXI7MeVKbmfR+Nwz848ZbvJSOT3XwCvY896e8tRSzQpekU\nTSqJ/IRVvBG8jW8jGW0XORkdbZplnF8D23rZTTALqKShE6PFnaMU2zmbLWG/\nF8XMLVJlM2qgf3R7vjQCn2EUnPR2smlutjYB5GRvV5c+PI9MH5xY/R0Qj1fL\n4UachpUzz+siqTN8dSVmHStB61xh/V0tW57Lk41DP78FVDpdJ8P8TQttcGiP\nB8UhOC3X8wzKTUU+f2RoT2bxQ6tEC4KLSQF3HyCpllPG+RIbJRYzwkR4O22B\nvyGfc35JkhpSRD2dG63qD0F6WDlkbWlbq29/Nwumpxb6i+G0w10POVuJN41J\nYFW8\r\n=6Xnu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"744fa69df2684b974c323d0b7fc8eb5d13e85f2c","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.10"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.10_1593128248767_0.9915130810376667","host":"s3://npm-registry-packages"}},"4.2.11":{"name":"@truffle/contract","version":"4.2.11","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"613147ebd6029d069e277678975e94edd26930b2","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11.tgz","fileCount":43,"integrity":"sha512-YHmn5Wr67bGkqgb78DUqtluzGO6Fca6/KxPpTggqbTzk3jiNZPKkhI10HbUZQBl8N8zjGDaUIaILORT9gdi9dA==","signatures":[{"sig":"MEUCIQD8GlKOnabOqdqRPA/PCWmOB0iFozZpiyHOBc7M7a1juwIgBcshrauyPU4zdiI5jMV/xSpd2V8+v4uO2eUU6ZS4kOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16522112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/jfSCRA9TVsSAnZWagAA7vkP/AzAIQcl3m4oEQ14S5mK\n6mc94cuUPv2pPtWZqM3rNvbBqcMTgcxZYs9bV7/dCjwuuA2BOp1AelnQ02yu\nlo6VvNee45vSVk9XyOTjodkbcRUrNClbrEUH6wGhbfxdFMVlJPNdrSRs0/JU\nBH9CSdnMaW6A6TzdINQQD2kkPejh20AqLkXtXnv/Xcds+PvEFtBl0n5JcT3T\n/8UpAE6hHbP/1lJPya36axsMS6o/vWxYmcRr0XeSGlHUeE5v1DTcODpXPJmD\njG6x6OkwDcPziCJTPob3tyOxktIqrOqqbDFNqq9C2qcsjAAKLJFb9DPU9tVA\nWUAmvxS8f9FmR7c32d9E9TCEkwCK2f0z83xGTZxGTu11vXmY5spQNeft6/lv\n+DsuGk35P2/MM//S+PNzxHWm/3fqImyJwynghNKhZNwSJjJNstr6yqskH8VJ\n35NhYjrsKaUTAARCd36Zwjn9oA0AV18VlgvLeQslnndCH/XIwJOl6DqDEKAy\nY8hFN4Qu0P9QAQoXquBJurYiz77Cj/ZhmEZvn4EaH3TqfV+DaI5n6PqKZcDV\nXACByeKn2dTj5Dz0F9z9lavgpQL6Zy2fIfc6wBGveV7SF0VsznWDgcQlsixn\nh0VBhGcrmq9q0MRWaspOvn5WDO+yBGqMGU1gE7Juk3uZ3sKeGPOjNvWrHcN4\n6q/F\r\n=qHCY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"00bb454f3c1680e8ef35ac1e26ef25649598b589","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.1","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11_1593718738311_0.445871482918043","host":"s3://npm-registry-packages"}},"4.2.11-preserves.0":{"name":"@truffle/contract","version":"4.2.11-preserves.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"fc651a5a9d1b0c8e6b137755dfa24be537986be1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.0.tgz","fileCount":43,"integrity":"sha512-fwKNbj2yfQ5piD4K1Lio24jGZGLRH4dLwBoUQOKEHtbJEYdSUG2oMgs53QNVHQygom62rwUYBfUPF1bkmxs8ow==","signatures":[{"sig":"MEQCIHCpupYzd824CCyNxqax6NndV7FKKAvKK7vl7ymjAXCwAiBGUgOJGVXT5DBBDgy2m+N2YVt5x+LEhBTiipn6Z+/1Eg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA2qJCRA9TVsSAnZWagAA1sYP/jF/HiqN+2gpeXiAf+qj\naJX9wOvjcHJijN4CFptPz6eAgfxMT86C8kdesYrpqZ6Qoys4Tj16zW3ao4Yt\n/UCtmzFJ6mIewQ9cZ/5lCPdt8KJcMgVnj3RdyHh9aEny7GKoAwqjEWGsNbFo\nKn6yWq5bkVjHX1nTJLzRJD4NUMRIeEEDTB2I1mhCqb4i6NPnHrrJKSlgwtNt\nnHPNdLoXHIlJYvCnUeL34A1OGToh6gsW8zeCNnmcVCgchN3HbdLeEWZuIFc6\nuo/bqJbZp5b6eeJLP0HqXARonw9ytjeYPbpLjIcJ+gcwJelxtxutB7LDt7I3\nZCnwi9wBa6emLUzACHQ1ZYcr26jrf1XCvm/nOgNQNzZ9GyeWOdywklWY5ig0\nbx6xSoiCtJ9YPNmp10SMW4qQqtwqTEkE8qWvniUMAWnviZGh7pISdMDA1cx9\ng89nKEcYcn1tK5PATGfKSBXIe9kWz5tuukkYFjdaebe3qeR+1rTvoDGJDdji\niSyBa6vVkvRCY1hTVAtMWMzwXwBvYQmAZlBDcVIXXiv5nztOY2yfcxzkA/dl\naAOSrHK9VpHDHd44VraKtGhBKyxPGHoAfMHlS1/5pzPrzGw3+vGRXFtxlxgq\nQKQ3qMWgwiUssA7Nj8CeGPQsCJvdSDsAzCDQgMyayHkwIBhU1KRWP09WPtmO\nvMIS\r\n=vDIv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"fede0649308db281c85b13cc512c7eea8a301ba3","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.0_1594059400756_0.6877861521560069","host":"s3://npm-registry-packages"}},"4.2.11-preserves.1":{"name":"@truffle/contract","version":"4.2.11-preserves.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ff87489c670bd5291cbb901288d42dc51cd992fd","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.1.tgz","fileCount":43,"integrity":"sha512-RAswbF26rrAy64mbqcz+9Aslhyq3j8NHMnyNAiPyDo4AJ8EFXf+YZ7C54u78nLH/Wi7L3Gqou9h0NSg9e0tlRg==","signatures":[{"sig":"MEQCIFNZXwjcx3P1PE4DSmFdreLQO1+tjT3Tv/L4whkp0LWhAiBFm67YiJo34cpKNahB0/J2j8tesKOz2FAVNUSimMERwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16645988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA2wZCRA9TVsSAnZWagAAKRAP/iw+W82XIYRj3n3JRwR4\nCkkJAl1uxm2ooqK7bQpz7s2vSaAa7l/ClXnLJWQMluSJNHdwTgUknVG+DoVN\nuifohTDer2UpJmTGWgpYjK3bvGUG5wShw0415X5j4Z2YGcpNXTXJNJk+ksFZ\nuUwpqajTwlHjXL3BtvC3yAjwEeTk1IFBr1M70+VuRvRUwStN6HekwmvCT6/1\nYArD5r4kgdeDDhBRFMKJNFxB5xL4Os8bwTC7XJHAkWFOzvGMDd/z1qy6Epe5\nzuD7MRvFKyvRT+PZ/4Ob3AtMWTDa8jGqQ6xrsUVnQXHiQZmAKnmZPCaPadP5\nFn7RY9KI94egn90w7qhtdSix4bm9pdSXUGX16heUBOD2efM7wkVCbipoE7uL\n5/ew/qfn2NGyheqSsI+zpMlPVwKlRl2bwf5TuUP73DurrejqgNgLG93SZHoI\nmWP9zKF1z3IKm9BHyCLVC3zLAHHsJ5oNMldIM05Gmn0Jfr7MK9ROPlmGS+DS\nc7sgA6MNCz0TDyb2Ch3Ts50kyiguB9k+JUw2Eme1ksDsli+v8reRyBoLqT1o\nodrhXtNFJ1Zf2GkoZWJe2Zeq2PfeyyYh25cztx4xF/dsxYCb6aZjTZrMDFNc\nkGBJlT4+g/hu6xJqDj0Gueg5MObgE5pTGanLTw8fsibP4NxJlMm7zgIn8S50\nKT54\r\n=VL+x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"0c1ee267dca31a823fe596585094a9efc5cfebde","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.1_1594059800987_0.5915929550963257","host":"s3://npm-registry-packages"}},"4.2.11-preserves.2":{"name":"@truffle/contract","version":"4.2.11-preserves.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.2","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f1cef0748e810ba7e71972840dd60528fb37c514","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.2.tgz","fileCount":43,"integrity":"sha512-dNOfX+dTwzBTV5dTvSd/ZV039yA1KMX18+3RkUguJHFZqAiYukYLUuh6stJcHLlMxMEwi5IUdJGt6tyPsnKcGg==","signatures":[{"sig":"MEUCIDHkOImmINY8sjKbmSaONPKVrf+RLUAG88PLbDglhSDDAiEAxgjCfO/GbT9TqajpGthsHpFkHhU5teXW9q3mx+NnqmQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16645988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA27eCRA9TVsSAnZWagAAX7QQAKIQbQnST3gSNXR5qKby\nLUmC8plgvsRKvRYd6aHyObTGI3CU1RvZJDL+nUaakwkX1h9H5LHyuvKv2J/6\nQxnH7DeoAfHxo/iZmbcHSBCVohOr72luhvt4Wbvk+0MTl0CzCEVRQl3RrqTH\nm/cE44pcFeCG25E1QdKaWYEsQjZHZIu0O7bKJyPUnxVGbVfI5xm/h3rfZdqt\nr56ltfbmSvOps2wlJmNNw5t6LkYg2bUD7VQ1OhtQFngNOavVsLkblct/C3kd\nB3tctRapGvtQtzNuFyu4VffbBBsSdVD9g50hAlq/EDzBYcJzeoPN7Z5NaJ/l\nhrQJtrk4xT9YTqhAVBDRfpBmskfHUb4RGVek+lsZNxv1FxDMlzq+KFWEnJV2\nFk6mdUfCvc2MbLRBbDhZ+grVh+Wmytq2PdP0orD6gcYXKvBHFZbS0IYlr7iY\ndMjppgKM5cr+vuW9a1rTH8bpG/s3gBJ9mibx3gRrk9n6b+w+d1asA3z0Ru/A\ndMjfV7krli/Uoa2Ge1sZ/+0L9+x/z+WIeXfK8bB0sL3VU7+LIUxfmsqv2sJE\n7GBNYeW3/npvx4aX9mexwWPalrArYOquJSlQvU0fnJG+n//WBzdyGd52m8uW\ni2VwOdGsy74Rasv4W+M8jfcb10YUFUwjDS86CIG3jO/txVdteXkLAyQ4R0VE\nolnE\r\n=JnYi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"4da982811bde3042bb0b178f107796edcb7d7240","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.2"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.2_1594060510222_0.6813328503611389","host":"s3://npm-registry-packages"}},"4.2.11-preserves.3":{"name":"@truffle/contract","version":"4.2.11-preserves.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"4b3ddb5803db089c3541cc513d2b497e11d5b00e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.3.tgz","fileCount":43,"integrity":"sha512-xIRIPkms5i0AYBB+r5bnCbmNZlZMkKzIVKXkJ5bvrxQlAxCtfDShHxoduWq6qP63X5q3zDNGetXnwH9ky8JifA==","signatures":[{"sig":"MEUCIQCbkSFml49GSV2r+imVBcnJEquCLjG6pgs78ffYgmNvQgIgCVOp4g09xoy1rMwJCfum10oRiVJp9dFU0mf62emiPlY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA8pwCRA9TVsSAnZWagAAqFYP/jjPavv1K9+S/wqz1fwq\nEA2V8Bcd6S2QfSWMDeqr4NV6fPcNfIJDW/ZoXM74nYVEBypm553nVSbdfi/w\nZ/OkHrcud0s4smwEEFIeRM6NqsJyCuGhFCiLFxT6klqDCEVaUYlea78Frvzu\nn4asus+pDRI8EgGjJNgJ8WG4M8RrF8ojsI7FvzpTvEoI7RnwfmpIrkBLgIPS\n/YUbDtm+H4DD8M68zUCzzszsAl3W/7xtQsd4WpcBlb4sau1NWVq7vaKsrJf5\n09j5cGmed56I5hJClX4XfKC6PlHr/6xaS3DefGdFI7aoU4nEBnl/dggDafgN\nYt3GZMeDh2baJhKzlkJAqS10q8gj1wODXwbbDeMUWuwaBvFfv9+X/4eWquJK\nam5lQgClZVNxEeGCYQ/0HFkV9JT45slpNxrAcHrl+WazFD1S09klCNA/XuKU\nqn9cwruUQaMhLBpzRBtkjfbZgra7/PHDl0N+V6pXEpCkbFWgN03PaZ6w4xZO\nwKGv+9viOC0898/+MNtIAGDefB98YQYevpVd0lCbWezGMY+miy3XK9HFUxNi\nndjsUznrjA/aCmQB+8zfuj15Sg20cp++JDQ6qX0ogDD1SlQDELaKgy6R7eAN\niPL9pOd8u2+3+qUDc91N7kavy4f5NM8+3DxQd4X6XdrDYkJIgZVhuP0kKF3J\nSoaF\r\n=27QO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"be0c47139940a3a71e413aa3343b977aa2649ed1","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.3"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.3_1594083951999_0.16711182530251634","host":"s3://npm-registry-packages"}},"4.2.11-preserves.4":{"name":"@truffle/contract","version":"4.2.11-preserves.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.4","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"5415aacbfbdf9642d65981b0d7f12200dc9effa4","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.4.tgz","fileCount":43,"integrity":"sha512-1gARnKyWYr8HzDOUT+TR80KQSFvsPx6bp7ampthjQL8i7XbN272Dhi8B0mz9J0JA4N0xk2ZEIolgdoZMz8pFXw==","signatures":[{"sig":"MEQCICx7skY4P3o0ECQN7zMZB1hofHFUK+fRVMwAxLdgB2y3AiAGMA4N2HaMVzL7h8TbdcMrAJdaa6Yb5yYII6vAWEy1oQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA+rzCRA9TVsSAnZWagAAfe4P/1jfAcpU0V4a/2JLfotT\n1CDEEMx+ECfmKsp2iw5VOBBTPMjQ8Giz5GpnvcVum1A5OZ/2rt5v8Nk2rQ3S\nQZbKg4I1827d/cnj2H+ZAUXB9u2/FGjuvRM/9BVTBwWwHtHQ9y3B47wxd1JP\nidhHGfhTlNRO4akSAEqC5axmbq6z24lvFceBc7hHFp/8MP+dx0z7uRALL+wl\nvVIcasmsN+KZWo2OP4K+1YePy7PTy+3ld8uu2xrO82e5grZldQoC+0jov0jh\nC9Rcd5x9bUsa/+zQIsUS32assQaNslfjPBKTgcAUGFtpEunKv4oYLP9J6yF4\npRd/19FrXzyBF0K/v2an1U1PKcPnzR/W/ZYamtSQGDvVu/0FZ9ky0oFaSdbR\n74IxaCN/xRuCCyN+HtWduFYSsRegJIXZsujxKyn5zHObbq38Do5qGqUWQh/V\nN8tqo7ZY5cuSuiu721Ag34Xy3vB6vg12AUQHKOEbwKeb1GHLv+RmkZvaOcjH\n3ho96SayYqYaN3CiIOSch7aW8YQG/8pw/YIUQHTX71+gqd0ei/FaSLiL+k9e\nw6KdzHFREg5nDOgyuRNQjijzOGyU47UacE56n854kiEKdKdF7G78hCoCgXC8\nAUt/hkLfsJ4ZJomba+Nl+OiEUhDvYuiPJtI2sDFt0doG7vWzWb7RT5QOiX+y\nKpC+\r\n=IcuR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"6ec2739af65d24db98fa4c4891a09ba3a132914c","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.4"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.4_1594092274583_0.03282012058594286","host":"s3://npm-registry-packages"}},"4.2.11-preserves.5":{"name":"@truffle/contract","version":"4.2.11-preserves.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.5","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"cff6233b6af05ee366e01ec7628aa5ca1b043fac","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.5.tgz","fileCount":43,"integrity":"sha512-P5vTU4GycXW/nxq/HQl7il0zUj4QsgHh6XHwRh0weuBkw9btF1ah4Pgs+6SQm25txF8dng2JMmPoqaRyV8lRdA==","signatures":[{"sig":"MEUCIAQhtTBMCePu+57bAQ8bc17lOrMzvToP1yKGHk9kgs8jAiEA+oOtuwDmJ1IlLZEJ74VocmlTDADycHNXdwEODk1xJIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA/DrCRA9TVsSAnZWagAAjk0P/iyOFhuNXZ8lF3FUOmwr\nVxa8VAF+XBs6v9FzNT2W7mK2JnrdR9vgAsZgVUBWmANitaAptbMlJvLVYvuO\nHGXR61g7QGxQ6A+zu4s2YaCLBQFVasIKqD9a3HxFEDrRByDe8fzBTY0MBJwe\nV1X9qAn63oRKxHtDilUkC8N22Y3DSY0bm1xCref0VqOa8adCvLQOOad+MG3P\nuQQeJ2s6nwuGw/Z8aTpLJaWJhR7na+OQlPMS7u5B53qyt6bQxA2XwDnzrdOa\nO7Nn7KkkjFxX83boX2XNBiEcWYMdv5qqPr/5ZInxZT4zec4EHwVdnFEHD4El\nPT2AGhvEMYXIeGRKJ1TFe31eE+djhH5VNKX90mm3au99PS5dX9EmdJD4Y72M\nzT4Y/iDxIoU7KV5ETchJule0sLRN/qsgv9T2SBLXcsE3TFodQiCg2VyTmysI\nKZ86r/m5AARdbgrrFs40qsRDWJcxb6Jjo0OT/Gk83YTPDN7MOmD7/QoD6pT/\nCLqOONWcxTJVidhnG0BFESEow7K19Ml6yY6HjZA8tVmXxvJ4EupuG2Rcixgx\naa4EWez+x4PpAidQrBjoZPNafj2k/hOOmGLREcNhT8dfpgxb0rPNlq7qd0gS\n+5pTaa942r+/lVcbBJRJ9iYKCxU6fCXvRdRjycimBSAR7JrfjCWDtRqDcgMd\nWOB0\r\n=ckEK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"0d2c748971b47582587a569bbcc337795d794287","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.5"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.5_1594093802835_0.5974827364090871","host":"s3://npm-registry-packages"}},"4.2.11-preserves.6":{"name":"@truffle/contract","version":"4.2.11-preserves.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.6","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2e21f3cf696fc082aaad63f89aea832e124bfe3b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.6.tgz","fileCount":43,"integrity":"sha512-0JxG/hHJ6AqTIGtLp/CjnuaqqHX8rZlMDTt05pB+bTISgUQ2SeRBz4tRGh7NMjvgxJAkElmZl7AXXR4uXQz4fw==","signatures":[{"sig":"MEUCIA6OPeopx/Syz/0io0P/sDRwR5uVSZzWieF+FahSzqmyAiEAt+hYjAcjSZykPuLqrVogBBCwe6Oau+/n/2THhwV0QdQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA/O/CRA9TVsSAnZWagAAKDAP/0+iDK4iUSNpswsAWvOb\n33fDwCXNguysU+NYdxVZYYvz+WEQcbeCBgI3GWkvjRPOwuG2LkjagJGbOStW\new1zyGVMa0IYDrBQwFtD1qbJV/r5ZGlhPkUGadSnw/msG5AwigjAupUr6mik\n+L3CjVxLCEVShjNbHMuoU3urNlfoRWV1GfHTmFczc10DXuMWQXTBhSoXUMp5\nzyuRBoeL5ydbnNKexJ/u4ttDjY9pfbLCkzX1x1vz2x0dKUMRTvcF7y4GM/Ia\n19Ib99vYn8oJhUkICspcIRi5CvURLC6ZpfBFkoP20E/xdnKznjyThTbIfwsR\nTCKVESYtPuhSapzAqNzz6A0G0doQ7gkrrd1dEdqwkxg4+tFWeiOvah76wrh0\nPCfzv4ejgczmtP7OLXTrG1rwEqPabzqtlaAMi3YsRLQtVpr0iHi3malSsIPX\ne4+6XW5z6EcS/0r6zIYfzYkQGguR2mJ3RwFaKTPx2l3hMbpd8KUSwoSd10bt\npRilcyyAHMvNamDQ8AjWK7udySUXycE9Met0KdYJmn9aZXAzQV2nGnPDy8mW\nc0wF1jxNGwRJE3vHhcgoQSaDxtkhQl1yIyCD7U+AW9zBG1GmcYCh8Flsimy6\nL41BGjav4N3R1QN0lMtms1AlAaww2RIuBoMF4P4XzJx1qfv8aiA6aV5CEhWT\nEg3q\r\n=wXJg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"85b4a26e9a12ef3edc8268a71d48ec2b3890b82d","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.6"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.6_1594094526691_0.3783675401436377","host":"s3://npm-registry-packages"}},"4.2.11-preserves.7":{"name":"@truffle/contract","version":"4.2.11-preserves.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.7","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"47dbbbeabc6b189d488dbd4de313fb596e31a2ff","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.7.tgz","fileCount":43,"integrity":"sha512-359o4UPzf7hz9E23ffmreSxyCHK8upLUJZ6rL3PTmu7RaSnVZ1G8o7ktvxKTSKStuHRNM8Q+MzlPoKwJQTDEtQ==","signatures":[{"sig":"MEUCIQC8ScV6hGvQCxi6DqJ4pYL7nC9K8XU1TweKhjpj7D3WDgIgOrizSoaUj97JDk6swY4QI+uS/2CdyvrJcrPyriioWs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBAneCRA9TVsSAnZWagAA9C0P/03lLgmG6eTj1qTWaTxD\ni8dxQoxKCbbdU7JzyG1pMDAl162Ubd9pyvLrUpXQX6no9eRo+kjyz0cegUj8\nLJz5sLxTozPYn8fjZRAnob9QTV+2clZMHKH6sXkkIho5Nvp4vhiYsvgSwfQS\nAwtb9sh33n6Lx4hfFBqA+gEtzKjkZZRCa6/qSx2n08nYJ012viDo+oKxT6Cj\nJt7gJWCGAGBFwYERjUV1gmDgDbwu7ypgiiqGAdeG6V6VpEjjruooLH8mVe8f\n0dvB7QDEuMbbOkWwqUymw5pV27ecmf3JBVOLvilWFrvF4PoJ9G8LrkPkyINI\nV/GEFQO1VweBNusmnikPOoe2Ncv0Ik6+aeJiZV3Tc6Hw2vEBqk60BSU+BoZR\neQ0nZOE7xTl52Yp1Jhp23sNOUqBfUy1MyonTbjxrlVH2dnAOqUgPen9I/4oo\nD2E/v+VbwbrUwIYu5piL//todAZq/sjvyCZaeuQPuMCDh0Ca1Kz6VWG2+cay\nt3S5aftHM3ETNEO/XSibHqTHY9DS/m8skPo5MLuZLnXSl5PHCbFvydkozgNS\nyLKoN9qGMe4tijQA4ywsNEgYzrSUF19dDVQQNRFhr6cnhnG/rVVhB1gcxXdF\nt5JbljklAAzwYqjXUI6JEbMFMWu5Q3BNbg3zxd3LO3QCCklI5u4/AT/hGfdJ\nDnf9\r\n=NbO9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"8f7d21e4f7b5cae67f2688ee164665224963a142","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.7"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.7_1594100189854_0.3156380972206443","host":"s3://npm-registry-packages"}},"4.2.12-next.0":{"name":"@truffle/contract","version":"4.2.12-next.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.12-next.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"20f4d39345b6cf4ef16b75dc2e96b6fb7752352c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.12-next.0.tgz","fileCount":43,"integrity":"sha512-AT3vbG6BTjrD2Dd/ZzqlOv91bpOlUvGluXDsXaSZIcDtmxlbOoNc6n6m8Qu6up7mbJuflckQ+U4VWP5dqS3XTw==","signatures":[{"sig":"MEUCIQCSzg9OkbCcxGlQw/i50Tdraynez+7mSTXSZ8Wfj+9CiwIgZSGdxhDC140Hnlh6V1zSF87f60Me6AtGrYZxVp/AlZ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16522665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB0G1CRA9TVsSAnZWagAA5CUP/2+tRNPTG/ovQ2OSnBS1\n9PIqcIeN2UfHi5noGGt5I1P+dHeKPlynvJhtupit1cb+up1VN3mrGo58qkWy\nR7m0sJEPNUeaM1kDuO4rcibKW2sREk/VI1HGuXlafQ0DGkpxOxFpeZdh9W7T\nL9/veVzYxjOYQBqNIws+WKeEkFcQmxMDx72EToNlIekiSPxQ/16ujfsoFvx2\nmK53XBrWUDwFWWKViW0cLEAFI8CSqeeIEl9cZaHm0vCpS5i3Qt0UDP6Clc+V\ndszGWTZWyE62+J2dhWyPjYw6lT8srmPxY4fLl2D8Q1bDC5qJVAstgSSkXlAR\nudvfTukHDGg4vejy1AAFIZs0Bb1B295iGz/IaitcmkNxXW9s3Xm+XeFeNwtm\nhxhf5eunJuH2kRzlyXm7Qe0jDLDz0T2ancbjsQdl3oohQcfczEJyvo8YJLoP\nHyGnj7wfap66JB59F/HY7RcTnhFP04W2+hTPZduKc9bWVnFUV7riQ9pjWwa6\nK4XiiSmduTP3sVKH8r6Layk7xUNlUzZkSui+agO/rD0eAh1pKuPnHg1uKlG5\nj1Dlb4pqOoHuQklgB3hsxLhkGbzkoMZSPdVUy0WHfvA5tyhVWGVeBcWzaWS+\nMnvVhrssVF7bCQ4LajiJCsL8iWUJny6y8RHb5ydgRVrd26OW2oZ6b3O3HMNp\nDTQL\r\n=SYjQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"688ff063674ded09ca98eb830286e38fee30ae42","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.21.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.21.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.9-next.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.2-next.0","@truffle/blockchain-utils":"^0.0.21-next.0","@truffle/interface-adapter":"^0.4.11-next.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"8.0.1","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.12-next.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.12-next.0_1594311092529_0.21524619831408875","host":"s3://npm-registry-packages"}},"4.2.12":{"name":"@truffle/contract","version":"4.2.12","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.12","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"27f02bc93dc76048f555da5382f8cb3eb335b54b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.12.tgz","fileCount":43,"integrity":"sha512-VeNFA8kxx6+FSxW7ZjLtoOjVZFWEnrPVy+o3oLe3g6jlaTYJNOgC/LfRMxfm6ZcJQ1qsj5bCGxg/EvAiTNl7Qw==","signatures":[{"sig":"MEUCIQC1A7Pp/+oxNAltniNBperfXMkT/41BOHjm1NTmb+eCkAIgK18ziWLa/3iFPiV9ogsMGKRkkzBgtZqsLSpay2EkFi0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16522476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB5uCCRA9TVsSAnZWagAARAgQAIIWSltmMYrd2VyHKe3l\nGbnZEQBw1Zs7jn7hq7E4/QszsQIeHZulsx92HfSQ3bgXyfihs4wkOlzNIOcq\nG4Mgk0QIhbMWG7KE64p1g6NuFnDE2VJcNk1BJHKVYR3+NsZ7q+w4KR6eRHOL\n1xi8KldohbvWelut4ksDojY6c9JWckRdYzQqahQM/syWTRLMnPPnrtcfGfrJ\n9TScv3SaI5+tTSxcuw+WNUoaUldJi2x3bJkdMloHplyHRgvaT9rpI41pHMtN\nIykxHTPFscsKKVVcTXzRgkotR9QUWAbapiFueYvi42nTAp/uXHE5cuxz0PyC\ndJtSS+ZFkOBGzYOt2uC/SKaNhItATX0cVx5WdXQ/jOgrt4nyS02ExqxqIRd2\nqgIlYT0sp2JldTqDjzlT40h35GNZUDaRRnXOYZBeQ2iPhC0UW0krDHiCS7PH\nWvc9jRsWsrdnHY/Fn2jSjkwtGlWWVnB11SmDWNljO+LfRDNxLrnrV81urowi\nQuQE3SqDbPAGlEfE+Pvf2YlhYpG5HfikNI1yJHpzR6XpNAJTN4DonfJriLhH\nBGR6lT1jnJuXXfYjY0VEzFQP9WKmdxHIL1V85HrYqlTwSZCw9dpa3sQnLhGG\nlYbJXnwyX8lrF7ku1fRcteQqAOLYSxDZ0RWQpdYz6Ls+mOE+31jWmiVatGZM\nNoG2\r\n=J6K6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"90c9f7e0c52974600a61d2f86b2b2b9b0cda1691","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.9","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.2","@truffle/blockchain-utils":"^0.0.21","@truffle/interface-adapter":"^0.4.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"8.0.1","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.12"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.12_1594334081812_0.8501167823983209","host":"s3://npm-registry-packages"}},"4.2.11-preserves.8":{"name":"@truffle/contract","version":"4.2.11-preserves.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.11-preserves.8","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7d45340e0e0836f17a9efdad7daf199d72f7acfe","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.11-preserves.8.tgz","fileCount":43,"integrity":"sha512-C9xL9SRTjJ7BlRQxLn8OXC49G5DVgN4wHVAE8DAr3DMJ83ts8v9X4EguaFup3+PoLdSlhvLztBVANcbpNQyORQ==","signatures":[{"sig":"MEUCIHm/fttF/Y5vG1F/F01ezixW/O7cLTa9nGKsI5/GMqLbAiEAiI45/en3AdvEO9hAUR9DLpf5KzceWIsN+kqX5i/WPPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16646300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDUWcCRA9TVsSAnZWagAABMwQAINwDE/AMXgs9TImZFDT\nDgticGycJ5VMvwuBxOPBhIajXr2ZZEnl8e//LMvy1p8K66aYUUsbpjGEPjpS\nDBI5yaljWUNYm1DvNpKuKaKFO4YFUR+whEbHcP+wByoi3UYmJgTFcb1mBlFJ\n4yM7CNhjIkmfjEcVTJYQH1GZHS89TZEcS5Lkm779+n0e0EbFlUkSD68Hpxc2\nwQPDmOKjDTxK87el3DMldX1OJ+u7HQFvGF/s+xsMfk/WgvUMPKnQamH/POWe\nocF+E6BqW5eGcfA9MeR4oDUDkM1hn4inof0GqJ5K2b0L2Hk8tvxaWSNUFIO7\ncY1PoTGf3WQLBjmhL53jmmbce10n12DPvuUdAghm1nlJL8cS1AhUFjv5ou/5\nVDxAcnWwSo9ahTiudaQcH9VPfFSeECyIibtzuI6mvDWFTKKaAIdQo9rzYWga\ncI/BW/3eQA+zge6pTwXCYAZ7wHwy9Ma+xnEVQiZ5KV/52ev1ZYXQZtmRXKJZ\n6u9hg7djzON2NgOqK0go4oX48IRDPRSXGSE49omseMWOKsqdOza4QBo8wEZ3\n9BYzsGQBQ3ysKVshXLhSZzmF7N0VxXCSewbiKaJ9Zdtg5ysaintyFNLMvKRS\nrrbvXrgBhs1zPT1VaSBCpdIZjGVpvibHid81mB2llMLDkkzcLp0Ys0cU4cuU\nSeCN\r\n=z/Ss\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"f9c4aae629832fc9fad4e2fc50d409cb3a395535","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.19.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.19.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.1.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.0","@truffle/blockchain-utils":"^0.0.20","@truffle/interface-adapter":"^0.4.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.11-preserves.8"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.11-preserves.8_1594705308453_0.6782817704441031","host":"s3://npm-registry-packages"}},"5.1.0-tezos.0":{"name":"@truffle/contract","version":"5.1.0-tezos.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@5.1.0-tezos.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"bd7e29c8165bb7d8bfa93f02e47ff3b9774d8005","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-5.1.0-tezos.0.tgz","fileCount":45,"integrity":"sha512-hofChgw2YAuy/xP8xJ8TSHD9y8+mmh/AeK02nSxDP9m7mYoAXECnd2ECOh7ad4ZczbRUD95E9sFeDdhyAutSyA==","signatures":[{"sig":"MEYCIQD5oCHZ5ljt2a7jtDNpx+7lOIe2C4S3xfw1TeSDMI7trgIhAP/f/ThtktuCDYoQk5ARK7l7dnzlntgVjNQg4htN6Aqd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14518547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD1MMCRA9TVsSAnZWagAAYIAP+wfRs6Lm0hsQdqzgbSlx\ndSm4YlbqF4EFtssldSmwHLi1cYPtiaXxmzWP73B83N8qm2CwZDX8FuqW7GFP\nUJidaUBvNM8v7FISkYJpBOz/av6dlfdp3d3BbheXDOQmVpXXYbHbk+y919/7\nO/iS83Otq9Psj1dZmfAym1JWswT31y/nhob0NIChcUGnGPv1APIsSOGH+b7W\nK0AyHnW3/j/KLTMe6OnaIpQEwVbFRcq7elVy0hTa+A73BQpH5l1+M3gW3Vz1\nCVq3Yw+6L5+YkD45F1mtqAqROuRrwJfUKBcyxrtyzilBi/iZV534TJuCNVWe\ntn1FLkLDYum6JA8dbss4NDgrB9Qx79rTIPXRFhgaAcD2jFmh4dto1wmKL25g\n6Iv7OBzTeCbTrZwyY0JVgmsdDQRx8s3rx+bHW2HA5307kJ/HGdLM8yiZVvo1\nQ0r8wOrVN8bEVTbL3B1u4sT/yX7yr0x7xBSltOb1Fye3B6LyQjwhDYvCcE7T\niWcV3n8YBCaX6DeIFYj3LaxPyVwTACD2R1YomgctjkYL9lwQ3yxiYHpbkIV0\n77seBbhLzniL6twZwDafUoMwVmiUEf53rnoswstvw9JcpDlTuCKvHjApQeiN\nT4gqZy6Anptl/R2MEkoGNGeHfKZLzuc8mwoTcNg/UyrsxUk4K1DPZjEMOr3Z\ny4eq\r\n=89fE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"342231d2e125ef32a903558aea712d833ae7f875","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.21.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.21.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","exorcist":"^1.0.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.1.0-tezos.0","@taquito/taquito":"6.3.3-beta.0","source-map-support":"^0.5.16","web3-core-promievent":"1.2.1","@truffle/contract-schema":"3.2.0-tezos.1","@truffle/blockchain-utils":"^0.1.0-tezos.1","@truffle/interface-adapter":"^0.6.0-tezos.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","debug":"^4.1.0","mocha":"5.2.0","sinon":"^7.3.2","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.0-tezos.2","@truffle/compile-solidity":"^4.3.0-tezos.12"},"_npmOperationalInternal":{"tmp":"tmp/contract_5.1.0-tezos.0_1594839819529_0.06060411361569118","host":"s3://npm-registry-packages"}},"4.2.13":{"name":"@truffle/contract","version":"4.2.13","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.13","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f45ab5536f58962435254ed3859a3452ff908693","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.13.tgz","fileCount":43,"integrity":"sha512-/+JHAgn5s/13tmp4uN1/ArtFVFO4NWoZCMrriiayl2EbsRknk3aX4Ly2SdRD/pAnH/7xLr0fIBP2JVUKHB+gfw==","signatures":[{"sig":"MEUCIQCMgPbmwxGrLKgionkcrPLgQbu3JQ+1OUR24AXaDQqRAwIgeRq1w/VFd+w02RAYHWMq6qefxH2fB+zwPmtZiTl4wnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16637896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEiHrCRA9TVsSAnZWagAAyOcP/izZAcSNf3dOS4C2h9Dm\nq/Mf4hV5wxBk44/AaxeF50xKc1kmCZfGcsGblQsHCmzKfKs5HkjgpWYh50xh\nxErH5UFdOICCbntozqfkUl53aXUwL06+shwUxIuLkfXU8VXJnqGgrcJ9eslk\n9th6LSQKe8a5c5JSlDLM/9joa+KzOGm4vpfT/bzJv1B2poPQbpDU6u71bivA\nM/U7y/kwj5wMP2qa8r0Qr/vho86K+EBU4OSOp5eHRzqXGBQaQEEBkcR74VIa\nHMPbvn/2Y6YXEhAYZWjd/P4wllNaKnWsORVgGNORESq0OLIJyiVxd63cTnf0\nU1/8rdyMbKHEAyFrPE+tD9ELC89lvaMCRRSNCx9jvE7ovFHihrcXnCxG3p4G\n8+9oNPBsLqUgHojC/ktYJ6YPK5MhL78x/sa753OXJ14w3bKh8B6y9uFOORsm\n+bKRuV0KLKDi6avqDgcH8NKm/tuEgfaPWIhs8cRHWT4kacSwgKAH3G+9HZT5\nQEmYualGkrILMTuw5zaHEBVYlt0tP2+GMh0TfZ/3SiePYgqowH57KBWd3ALJ\nJ0fYbRAWyRsnPkyodsPkusj9OrpCmrH+ZpqoBV6JsMx1CTjUR3JzUG7+Zr/w\n1ZlimI4ugDJv5Oy+Kkf2YiYLS66RmEhX9Y1j5d6DQaoqscSthtPR2y37LNLl\n0YOw\r\n=nzv4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"692eac39c5af9c3cb2709eb1e96147cbbbd45b99","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.18.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.2","@truffle/blockchain-utils":"^0.0.22","@truffle/interface-adapter":"^0.4.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.13"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.13_1595023850738_0.774954345353047","host":"s3://npm-registry-packages"}},"4.2.14":{"name":"@truffle/contract","version":"4.2.14","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.14","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"00ab5e16b5470f07862176ca7b091910062821bc","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.14.tgz","fileCount":43,"integrity":"sha512-LGkfFXIjTNUZuf59Kh1V8bYR7nIQXPTDqzv3ew3bkP15mQWbL0xp9fSjLE1ZrC8MXzmXYXPDGSzlHAv8Fjkaxg==","signatures":[{"sig":"MEYCIQDjlooy9zxV6bWTVgCS9TFx2MiJywhL3l6f7eA7czRfVQIhAIQMKdh2BdGSgb/Mth6yxEpozVEkimM9aWydHlwceDoK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16638792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfG1aECRA9TVsSAnZWagAAtvwP/1H9IIQWvIFtYImJrxmD\ndw0qHLoUi3GxWt0FNTsP+hcc6m1MwL646m0VCaf9uomhLk4Z5YG+DOQ/BV09\nCQ4p3EfRRR0IQ6fLN1yomgUZRoxdHgz6eNrTXw/Ywp1BNHgvtR1lUZwCwlS+\nqWCfqjCxlmKGH0rI10g/ZxuIEanV/6VIUi6IF6KrmXN/PyDs9iuQDvVuKqCk\nuc6LejZS2WgSRFfINPTgdT9tiawF4ZUDPaIt94YVHZ77sDH/xVSn+M+ZkFWp\n1x90xUztqyBOU2XpLMoXzpPOqNcpP7F+I3bbKjgQzVf8Gd4UpJgAMDGsJQs5\nrjfnrWDJ8eR3Rg+VHmIuCVxSPBqppgqkHLaNtS4gk/rXRCGrKB0kDwVTnuPN\nJMVNU/r/WFY726NRXRz+JgSpZns6sCvcDiR9BSP4AgDnoVtwSuTV1GLyJKvS\nNKIWdpJpNLVOb9LY41qgrC5qGMzF7tBqd2yLJL3SKlfRb9vjednXpxHktVvc\n2DZxNEXSS9KzONRbOIfyosk+MHspK85yVwmcfEJbwXbgWIwcYgISzz35+Y4b\nFgRWg7OkgwZVTWAbd0wWpbupsabJKBICg9lpK7tMGT5uMz4IDVuJemooO2Wg\ntj2E70EJm3oj0dQtIef6mkubBJI3ocmDC0N/lkJVrEvL/Plb65pMvhnN45VV\n6Blt\r\n=AoEV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4468ee2d23ed58b4bafab02a64d42851cc061eca","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.1","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.22","@truffle/interface-adapter":"^0.4.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.14"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.14_1595627140104_0.7356357988265518","host":"s3://npm-registry-packages"}},"4.2.15-save-intermediate.0":{"name":"@truffle/contract","version":"4.2.15-save-intermediate.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.15-save-intermediate.0","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3a69215bbb7b5aa0686841bfaedf009e8f17c5ad","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.15-save-intermediate.0.tgz","fileCount":43,"integrity":"sha512-glKnlcCQNET5i9l8at/ctp2te+xbC2AAL+7CeLQimpQCXKT6gYT0hAZU98FK40U68uf6E+awWYwfF94CdWe/vw==","signatures":[{"sig":"MEUCIQDbx1aV093Hu0mJEMhXihfXWw4PveyUvejfEjPoPAskKwIgU+GXsBqRa0BqsSnK+sqaazcLmCOObrKceera2M7UJ6U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17073989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI2P0CRA9TVsSAnZWagAAHmAQAIw5Pd5iD1UrEGASUke1\n2TVp0gFCw2hNVAZtQZIk2xXtAJC4sO22CrtaMouTLP5rTBOeL4kcL5SeAA/Y\na/cPeDN0Ic9L7db0gSannTCnRQvfnTl1cbS1SpW2GFP+wYjIDxCHoG/ftP1w\ni3CmK6PTUdeKyN9Dtxh0JQEDd/+0wbbVoadJs9KoDUH20FYWIEwN2XkJP+f/\nmMCVYjIesgX0iZni2SZSzq3r+s/mWH8CymWlCwQrOh/tXFdT5mZjJE8EZ3OD\nQZEn1xng33GTI+twFFA827440tHcvIa5bBQgF8MBP5pvQ2eCxT5F1S+X36y+\nmoo1sAS20BW12nuuVbEfhugxgXL7qnNkDJEfdMU8WhyPcP/Ypv9k+M/Cjd7Z\nu33fmpy5SS0tSfo9ANEiARWog4J1bQSM16/kZg6pkjjB++R3nDHzSK22Pk58\nILMyf6ACJsQQHiwEz0IFvELuHm5CPamPCd1+6HRvi2+xfb3cO6WtjZ5i6BJX\nDUrBjhJ31zF01vQc9jz64goxBmkux49WCt56kbXpSr5gUwvaKSx/64JmF6Wr\nCcAM/AhvrVho+SCGvBw2GYQ7GStLEEiIVD5NaPm/cCATYta3zRjYMMLL+bZM\ngon6rIzVkQ6OHTYj/puKsmFzZYc2FjzmcpxR8iBo4cQX5bzgZnMoKGTatJGw\nIkU5\r\n=QZ3+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"4aba6a153d2643be6cb1500bbd2f1f5617a8ed10","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.2-save-intermediate.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.22","@truffle/interface-adapter":"^0.4.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.15-save-intermediate.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.15-save-intermediate.0_1596154867953_0.8081465821316005","host":"s3://npm-registry-packages"}},"4.2.15-save-intermediate.1":{"name":"@truffle/contract","version":"4.2.15-save-intermediate.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.15-save-intermediate.1","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"0f51b3ef204adcc76373c64c37c9db9f1e2006de","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.15-save-intermediate.1.tgz","fileCount":43,"integrity":"sha512-sD2RXxOFrYu8A3oxcXijH8xz1kpsaom46XKLWVh9c8zaX+RudBgHgUG4mgEpOiKoZFBr/vO1BLzd0H0C2D4b3A==","signatures":[{"sig":"MEQCICrGH9Uc0Qdwfw2Q4yRBIEbUWLg1g3ZXth8kmq7mnIHMAiA5UQ0RGRz5GDna2F3zx47svZU5XKkWhXIXOZjeJiiHiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17073989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI2gzCRA9TVsSAnZWagAAuSYP/2fsZkt0Jv/yiDfVgKR8\n9kMGb8yFL3CcEjCqxUbC6Nq3UcedY1kbAM5OWcNtmInxZl6rstJc+M7FyRv7\nAn1JPmjmmEMSTX2PmjO1SEyqUv4ZIQZkdDob2Qp9AxqiEzJOz0XCXTOliUS/\nEV3Yb2wJdqv5JEQAVgl06CDnyhxDKhDb9LHOxNVvHjFIX8rEXsOw/h7x02Ie\nB7P5B+gb7s//CNFZ2TXaWoeS0TVrewGpmL+64kKK3s85+qfsyfsDR0At05se\nnL8ptbuYk225mNKgW4urWDIPbseS+DHKr4RWzktu2VlFJtwOmge/qB748Lo5\ntMgF4QTtKf1BujmmCYEs4M5ujz/5p0Vrax8aDFf0LSwuFwK2x2BWqNoPPHeN\nMBQf9CamIYsIVJF6W5XmCg4A+6UJGTyYqilkqWfBOSCWtwOFRwEDCp711XUm\nuhP6lXMwgWPup77OAs8B1DFt6aEBPYt05SpKF5WTgxK8PWumsrJPKjxbjS/M\njNwwA8uSucOHaAbMwjaoUraBOgNi24dL4e8IDXQR0KF217zzPK3UtoYAHQyJ\nv949kaLmRhp6riRMpBSSyfc8dN7nfyhu4yUzi4uPXlWCRwAkDH6sR/q/bP77\n1uEwFVR9P2VBI27Mte1uKHa+OST08V7f4kKO4ZyAdW+ETB5YkpKO+9tNHyc/\nz7Xe\r\n=/vLR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"efae9ea6398d35c50c8bbefb625e7a0b56d9f374","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.2-save-intermediate.1","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.22","@truffle/interface-adapter":"^0.4.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.15-save-intermediate.1"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.15-save-intermediate.1_1596155955378_0.45686887745925686","host":"s3://npm-registry-packages"}},"4.2.15":{"name":"@truffle/contract","version":"4.2.15","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.15","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"09338d5b30bff1f8fb72e8c8cdac3281378c70f9","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.15.tgz","fileCount":43,"integrity":"sha512-/08WO0Gfpr3sYAtOj1HX9hTfcUvjsEt9ofBZHBSlAiX3u3K6zntaCWCKf3QQXpaxshy9mdVmx30OlyVIFNdUOA==","signatures":[{"sig":"MEYCIQCGBS+tOCGCL0IQvslz/2V8A321yiOYhhi02BvjYDZvyAIhANpCxRhObZD3D6f8X+hxCw+ti1lmzWdKdvkUBhChAmAP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17073749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI3EBCRA9TVsSAnZWagAA40oP/3416ntXCVVDTN3xkSFD\nOpQ0BQEHMzRZ40lFiKl1JVHz4zJI9FkOLy83PiZSkOVHbcNlAw7yRatLZmLI\ndGhF2zn5W5iC+1Qi8Gw5es/yIfQcmTNYobrLxovWSOhNMT4z/kdjjuGwNr6p\nDeBrAe1D3Ubiw+bVSfENh9U4GhMxz7KyUPJrTOif++9s9VodHzgQ1GD0nQQY\n1/IOLJLia408LZrBdEKqsn51ShxcsJqC/+OzEk3ZNeroc6CFIbxjKNHpMJMR\nOYbSVAUlepJlD9OtZ02eXIApSORWJ7Va+9z8yaZCtnaEckBhzIrQn61TIIvB\nvF36GEv//8lprXciOLU7TQVnskGcl/j6lEk8F++0JI84erhhh+2cClCP14dU\n1v7yYXlitn49+le4YCzc1f1Yuf+f1lfyZLicg7X4d6NWSM2oke5UtEMywE7q\ncQgf5xAFHB8CokuJvJZfwdKk707gnfg/Fq7072naImIIwRh0zxTqT8OScPVk\nNeHlCm4JjGMGtmu/B7Pq9It9GNF5plTEQESLPdzkiCGrAs4PdUTAlRZ8d5E/\nB1l7jjMRnY2yqFbK1vfvyBSRwhmuXunPL6HmAmFilmzImF986ROUq1JsJc7Z\n1OpX9i74CD/vx2r8eWcJGwPEpmAUM8v8tE/K01CxxuYOBn0h1LyRqiWol2wG\n2Gd0\r\n=pq09\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7833d688c0297a57bb2d27bfaf978f0ce0251468","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.2","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.22","@truffle/interface-adapter":"^0.4.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.10.2","@truffle/compile-solidity":"^4.3.15"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.15_1596158208952_0.9445712584422041","host":"s3://npm-registry-packages"}},"4.2.17":{"name":"@truffle/contract","version":"4.2.17","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.17","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"679c0cbc24b49044d64031fc7ba07e514a3fc7b1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.17.tgz","fileCount":43,"integrity":"sha512-tj2UclP5URSaBcA/6TM0Wq9h5ivDq8UmbEvdHN7inrmi7SCRFDE1fR80crlbc17T6NctMw7PJ0t8ZRKbe3GOgQ==","signatures":[{"sig":"MEYCIQDwH3h3Rl0GBWab3XBtMxHpsFCu8u+r+YZUxaEAXcuphAIhAI+KvASwelFHw6j5Jne1Bcz7AE1Wx8AFh3Str8hoAecY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17073951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLhV1CRA9TVsSAnZWagAAPOEP/1b66rjPHVhK6YeIELfj\noocSwh+nWIyLXR/pQsljv165YK+hHMlTDSbX2vyd8ukgqEY216mGoa7wgd7u\nhmyL4ky+lwwjRm+lVU/e4MYr6+Wthn6TEu+h9Af5bLd962oi3fp1AmofBltJ\nWk+5kk9pWkqYAEWcZvgVRGy3o6MIEteDsYNQpY3rH0lzDQre8MK4xU0qsUje\nxk2D4AtzQLHcx7cmvyT+jZINcOZ/JRHg8Oo1fOxRry5m6ggWLM9/N9yoUtqC\nHZ8XiPWMqSk4L9cUozOqFEv1qFLZCYFYpuK+V4ZUnrY5hjJOma6Fo2Op4zAa\nRtHpwlaT55B9vocIHYsfEd33eaQ4y8wgO2p1wUb53VUebMk6UCdEmk333ziO\nNReg8feBiPenZUVvGtfKNsLHv6DXoc1kY6g30Qo8NLgKTe4b8kY8ZCIVNK3C\nkaImQitRgkKlkJm6Eod3HZli/1oVeGKlCfyuOd5QnlblTrjXK42H3dseyuJJ\n9c/eDUnX16Jtzp3EwCqCkfu744VIuXJf9b7tYp6Uxc0X+rziMJWVPU1mfVSX\nHu52g1ze1qkq8gmMi92gsyvKqU+mw8kd1xEsPh51HC9W51GdbSHgPGt2yWm0\nzBOyjvD9VFPhQeIoZHLNuiKau+JawQt9/tzAYx5/XUYLqbXohZz2Tz5Jdqoq\nyNYd\r\n=rvod\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"6d081a801635bab1201ae1edb37a94cd21957b45","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.8","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.4","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.24","@truffle/interface-adapter":"^0.4.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.2","@truffle/compile-solidity":"^4.3.17"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.17_1596855668452_0.6122045749392233","host":"s3://npm-registry-packages"}},"4.2.18":{"name":"@truffle/contract","version":"4.2.18","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.18","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"6fa2301c6e6910617559bb0313b591a7ce203253","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.18.tgz","fileCount":43,"integrity":"sha512-X3kWO4oZ80e5PcZMFRLA2DjwlqabLOB++25+sofX2uH2mb2l1kjIdmyjNKPGXXnGhzGsRCxY9ZBRn3zyoMe+Xw==","signatures":[{"sig":"MEYCIQDlcEcPrLwVqkagiijlP1MCXGHiXIUn/LdGC0qpBorL+AIhAOS3pM7eRF4WbhVUbZolrSa9KYMpc1X1/C8uPGyPPLHA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17071262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNtQbCRA9TVsSAnZWagAA/C4P/1Wo2rTCHbJJFVUalKDb\nh+l9L/osKwhfrhKP3zGw23gA22iQJcVMNTSnNurY1vsSO3EWiOv6qmIW0ow0\ndep7ZfdvImUOER/8RRZlnDWHX9UyqronvDiWAzyuqNYWzix+FqwY90/yAEWh\nN33PHYWOccrdAJ647H7edXc3iWEzVXfCn9sRTGo5BEf2zpZN9I8ingMbwYF+\n3cmX2o8815VL0Bdjodec6MGqVetk/lk2UZGcJH/tZU7qD0zj08v409EQy7HD\n27n0Uwgn5Uuq0m5VbQT+AWSpqh5a3p12EdFtK06O/o0JzDGm89stKLvFP4XQ\nxJNdSe/IHtyiGkWY6iIJHO+HQB6f/9TeXmqgGSHohOvVeqJFZ9ERVAHoGE/F\nhme1vEF5xuxeNyh9dvzOaGFHb0Z1fBPhR+9SCpPlFdKuWB/SdMmTOLu/VHuN\nxDEUUiz7N3E8XTP87XVNBF39sFPBq4q0kLBrWEExdqtvo3QSKwz2lEh/oTFu\nAAUxrgLXpVper8X+Th1+7AifHLCo6J/9rwS/krhHvBt7TaI2ryrP7GBCBQRf\n8DEKgSAQvy9v+ANAABBF68J1zNL4rYQpXt9F1O2OVlTFo54P2D0MYFV7U/bl\n15GDQSbyKx4GFPHlCObzIHqfq93T2VK+hkaYokPP7x4+Xl7ui0HGZuYw/jnG\nKwr6\r\n=nCj9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"1d3da98d71b0e9370090534ed2dd9a0af73f26ed","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.9","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.5","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.24","@truffle/interface-adapter":"^0.4.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.2","@truffle/compile-solidity":"^4.3.18"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.18_1597428763263_0.16470701067656335","host":"s3://npm-registry-packages"}},"4.2.19":{"name":"@truffle/contract","version":"4.2.19","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.19","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"a6b1baeecb2f7646d2edc7a140fb40c9d54a0936","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.19.tgz","fileCount":43,"integrity":"sha512-QQmsgGc5U/UNQt12elmSnkADJN9jPG5QtdnLYHc6lGnRZst6IZDt0jdgUae9P4yMXXuAoqlr0Gxp7SzyZJIhSw==","signatures":[{"sig":"MEUCIQDqMLMJLr1NN825U6HupzZIWfUBMXJOSbtnh0oaYzp62gIgMwXmuRQgKXwI2EULlI5ITz0MfxesQzDcZCmsJLxbUVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17071258,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOy+tCRA9TVsSAnZWagAAmogP/33+hfgjM6X3ZjBLCz4q\nQ1hbNYSzUslRZQuZJxtYfGRyIG52ZUWimcQEUnibuVUT7pbsNdQLYWSRNzkt\nxutb7I55XICToA8B2LBVb0q1/ezAUJ2sUCxdTs3cT5H9GFMHaDXCKHiwH/rm\nWLFJsHPFth6vyKCA/cRxsL9Vl24ZnpaMRny+t9GsOQ9U4hD48O6T/TuD/oAb\neatOxhSpGTJz+c+Dw0hhzFSklJR9Xu4DJK/J0/eJfTeHEzfkTWqDInPYXmkx\nR8eFfgXyW6Hh/6r0ZqN14ppWyl1HfwXPRzzWSmnD+HMd//Qa5LqY/jmJEKEs\nZxi1yk7J5glzHhUpsYqGIG7VfHe11cbW7/ol9JVCUEt+l3qlK8hiusYiZtTi\nr3Zsdu0O3ZpwEf0nVSkbCIric0YtD0yWomReifFFhrx68GD5O9RoAqAm4Rst\n/j5vwbDGZKabiZrhQ7obxmHIGIbUWWwqzOx2QaSkUC3FFTw+jYuRZ9LBxYu4\nu0g+jZP0Xe//xjbQdVTpp/S7RdcB5L4k0eguYbVZdE1YwtslQVb+jdHBRYTD\nu2V3SWp0NXDeGrsd6fGhi1raDzkrxrdYDyri79O7Fls0ChBJQ71MmegNrjkq\nsiU8H1C9WcqQOIxXiNrX8QavR7bGh7j6u3HeeiiroNUlCwjZhrV4PdptZvPc\nU9Td\r\n=7T7p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"feecc5ba6903f1dbcc260b5b7a923435f381a95b","scripts":{"test":"./scripts/test.sh","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","test:debug":"$(yarn bin)/mocha --inspect-brk","test:trace":"$(yarn bin)/mocha --trace-warnings","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.10","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.5","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.3","@truffle/blockchain-utils":"^0.0.24","@truffle/interface-adapter":"^0.4.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","debug":"^4.1.0","mocha":"8.0.1","sinon":"9.0.2","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0","ganache-core":"2.11.2","@truffle/compile-solidity":"^4.3.19"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.19_1597714349309_0.009235399366313013","host":"s3://npm-registry-packages"}},"4.2.20":{"name":"@truffle/contract","version":"4.2.20","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.20","maintainers":[{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"033174d35a25057a77e71e1a7063a9ccabc0c234","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.20.tgz","fileCount":21,"integrity":"sha512-5GBHSXu3Mu15hDOuqtTgISEh+x14vdSOhAz9p+ArkuTLxe3diZSMWGGSU2DMenDdsj6pc+VBLum9y4i+TaMaKQ==","signatures":[{"sig":"MEUCIAZTpqC0CWJlJdqSaZznYDxbaCDefpBIggFkyIUEKIwCAiEAngQKrZTyuOxdDNTk/FZswKL5P3CU8v/8X4VaSzWHkgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16840763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSAHiCRA9TVsSAnZWagAAow4P+QAMd9oZ5aho6JTRSnho\nJWYLZXRIRb2AxgY9Yk2INnMWSWEadmMmtYFgoDTCBHBqd2NNY8jPYreQ77px\nmwWVsG51JJUVLa7D0nToNfDArPyC1QSMZPdU9Un4ob9LGHsY4/HbXLuKgpNj\nB4zpxJAuYl4wtA0U7HJtCIB/ZDRyQ79RLMqbbx+kVYmhUcYd6OhvXndomXC4\nqjFD77TNCBMdSAJ0bQdMaiSsvLVrHEj+P+1Y60VTokMYoiZ7tja2SASFPn7Z\nXV5ko4+POZgVcsxB6yWT18gUldDo9J8xeyqxaTGtrx4sw43zjVaCP3t+zMVX\n3gfwj5F1FZo66Opxd+KyyGOU0uUF8SMtpBoMs/D7oBSiTC500n5Lc1Ro5Uyq\nAPLxE4LGAcu6FD76nD/TmspoiSIXAGyTz2ZEMizeLOqAO0idFyysynD65MDt\nu1JOnDMwWYOiNuMWRIduGyAxo0aPu8+kswvZ5uCshGuCTfVhpDqXQrSx4/TX\n56emEa1Sixm0bWWnn2kH5isbmJ0IDRG5PwhZO7FmzBwnmDwmbGIZJOtxV8h2\nWQQsKvaLtt89vR0jNGpZ3i7p1YlytCV7NlUC9E4fezk1K2cS6dq/fvlmrfJq\nzM8hf3ZsVCPDD6iVLEBJ9fi0hpDeNesnygBgVamyhCSH4FmujZlbTlvtirbq\nA75Q\r\n=vbAu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bc2ded4ced7b49a29ee5236e31f3a62773b2a142","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v12.11.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.11.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.10","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.6","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.4","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.20_1598554593864_0.1657395832479931","host":"s3://npm-registry-packages"}},"4.2.21":{"name":"@truffle/contract","version":"4.2.21","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.21","maintainers":[{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7effb74f43213e0b94b58defa467b04c5c642b16","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.21.tgz","fileCount":21,"integrity":"sha512-lNc+UFOpjjzH4KCJDcQuBzMnZIjGUTYRKzCJNYExO0gGWa1LMJ9Uho/6MbJs+nVAq8UMc4vuvkFe3U3TMBVfIA==","signatures":[{"sig":"MEUCIEW70Ejq6ssXFscPOE18UVsBEG4ATJRns3IUCK2/hQIDAiEA6kSY3vy3Y9ulUsJBL0+b9qLP24wCRyB9h7kOUwsHQUo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16843137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUY7YCRA9TVsSAnZWagAAGvEQAIooBEIiNiXxjauLuUJY\n2NzHvGzQXF8y0WYEWOs/uCCRXJt+ww2lfjqjQLiBtUbuSpn66RbHdENeP/Ms\nLAxalcfh1opkktomYA+AYfLU8XsA5tso+XodVqFtU/bWpZ+3EX3rKGwrZ3au\nZM1lTfvr1fmMkOfpmZQBIoodMWXWNz4zHHtdjYE9EfMJNU2duGDFD+61Vj6W\noJXyPUFzriyN6g8EoxaTaQRnus8vC+i7BwU+LwS0UW5sL/iJ7WtLM2Yzb3ov\nUpUtHBOG9/3VHCTonoguZfSuBpOKeNhwuBN+Wvpjz4+qdzrwXMoVvNuZDmGm\nLQIsYyOrEiq1IZhOz0oo5mQufkJvSLS2tdbVvsIfoI2C6g5erU9LEjbIpHDc\nOE7nUPWbo+vUKdilm5+7twMlcCCA1KJK7qpz6B/CA72NLtTZAyGfftQIhEeq\nMki6+sFze+d9owcA1tAoUo5wq3wq+fHL9Y1zjk5XuYhXzT/lQTVZqqRyKR7I\ndP1wWddczQGTVYlQMNpaa/XBTLuyo5re/VXfU3FHSGpZOjKVLJMLeJ7/E15s\n6F5ocp7vvd5gujItCYmij+rfvo665qH8ohZzkLlTTsGudhkQXBDGRAlWzphB\n/SQAP3oA4TDiq3UXuqICYxy5k4gOFiiurDOpqgJi15S24REsx5kIUlpQC6At\nj49l\r\n=w5Ou\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"813664a0c23c2ed8af423c1163a1cddb6d8fad7e","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.7","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.4","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.21_1599180503886_0.8426902344478802","host":"s3://npm-registry-packages"}},"4.2.22":{"name":"@truffle/contract","version":"4.2.22","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.22","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"48219634ec7a1f970d2be4819d2d115cdb33d896","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.22.tgz","fileCount":21,"integrity":"sha512-mkkuQucuZb+kHlnDwcEF5CXKa7c3hZRTN7y0NSVGlNKPMAd+VMoGi4RsJy3o0ALAumsxi714sGMHJagqoz/RmA==","signatures":[{"sig":"MEUCIQDJYWfMTuxfwNNG/l7Iz077ojwEdfjtacV3qh3q+m6niAIgAeRideWRGTyb9HtqCCtyRnj3reeUqERmuC2WtciNb7A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16850691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWsawCRA9TVsSAnZWagAAPzwP/0nff89zQyTdsD6qN9rh\ngCdaUfT6XJEeaTLJk/w+R5XSHcH7PyxuUGf1hRc2BxXqbXV0CyROd0QD5nAo\nJZYLo18+2vndtIXc6fY4LBVQ7dvJX3bRrmc9AmIzih01IBkIxyNLkSdkD7mw\nFHsUWECBd+ZGmEx9OpeeH+uzro/CtlL8T+qQpBV3xHLCBjsEOLDwUhbrNPYp\nm2jQo1YmuPB0s+CLPqcKEwqyAwzvFMdx+uWw5gc6iIMrSd+ByucnYG6BIhN7\n4HDORbBE3wE11apH1V/RcI+tahXFoG4McH2eERTqMyrKqgToYETGzOro8Lyb\nstcKqcn3tFDpxJIxJlXTT8aWPOxxgyp0KIiZO/QzOmizUoX8b2v20GlIuCUu\n08KHrx++mK/fkftWwofkZnR44BmWrbAIbB4yTF6VH5IeuuzT/igizruWMI9k\nAmjPHxs8GWEHm4cJjY1NzRc5x0BwrYZjjSK4CM0SShsmEWtGYRyWuDC8oYI6\niLVe1UMdhAaxO2OSUb8t7F+WPd/+6XzZ+55r74E+PMsHRMqtzBUBNE6Tun5s\nRaFD1cPaRMmlAFlywFclsQiw4GdiC0qqfu6atLujNZ4Gw+MfoPhwaHkotG2A\nc5jQ6QuTw/19LJgxbtBaDAp3C2Je7iiQFx4ZdQwBVfxYyYM9EgCf6t2Rfdq3\nUvcI\r\n=lRMN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"01381004f67cfd64865e3c8dbf4fe78882189817","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.8","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.5","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.22_1599784624442_0.022312939676397248","host":"s3://npm-registry-packages"}},"4.2.23":{"name":"@truffle/contract","version":"4.2.23","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.23","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"eb8d3c66c242a26f364b8d98e95f0b3650ea684c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.23.tgz","fileCount":21,"integrity":"sha512-2o6xh+IQ2Xl0sX3Asw38LdYl7vi4znmVFM/RKBqFORVC6fVrFnMYzaot1geJJaC+5aEeDHAAAd9pLFRSiNU0mw==","signatures":[{"sig":"MEUCIQDlvuO49XNhaqgtTAC21MzPF5nzyAI5Cyt53sykbgZpoQIgQObvzE4TG0lrUdfdKpvZ60vk+fGzFS0a7MJO/8Vfp0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16851306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbSvoCRA9TVsSAnZWagAAuhcP+wXWFSuO1Rv+njH9J05L\npbDfWt4YvYNomJErlj2KuWjOvVqpUtSM9L79peYCXiBekmgW12wtlRuI7drh\nGaPz9JKXVMf/rq6amdiDnlyu97pmJIH8dJ9YeI23fDC4uzdZCnfRBjof9FaD\nKAoJ3JhCnNZ9ZHtVYTM1AOwd+9aF95sI4zJFbO5v1+U9z5D79DD9U8dEJEkh\nmHAFOSAUWRbBapM7l57eppQuFr2T+UG5Oq5bmF5fFj561daEx/PxNsyHU9TB\nIopsYxcH3wLMfhnXrI6CAyAGRMvfRFc9h9ApM7L/MaVut3H+CFZli1fdjVfz\nyJLzGhFH3spFlABscuVv7sAt2HjheHTY02EcrNaywWUYAKPBhC2q4mqOsHDo\nS3LkhRpkWd8J7eDS9YJqVm6jxn65YPfg2vzVxK/yxzWFX2reLFV3PJXkvnQ5\nokHPoVBLDd1bN1LmdZpLh8aGjdfvLS/h6TNjFXoY80I3eRCVAGQnFLwhvnTM\nyvyZtGVzKEgA3jWCoLFRsOaPT5H3b/AX8wySLZBO0BTHskkO0AAMILDB6bmi\ngrpfg8N5SQbHiFE82VgkAMVpMHNeT56WdIb27MMB8lvc4/LDU88pHF0dHulv\n7fk3OcBO/h12z3fEOnpapmqJBeoRR1U9CS7gSROxW6CCwKRITzNW6tVlUEsa\n1I+k\r\n=XfSw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"6b84be7849142588ef2e3224d8a9d7c2ceeb6e4a","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.9","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.5","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.23_1600990183943_0.007703327647496039","host":"s3://npm-registry-packages"}},"4.2.24":{"name":"@truffle/contract","version":"4.2.24","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.24","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2ca272c895fb3134c5eadae6846e6b567983acee","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.24.tgz","fileCount":21,"integrity":"sha512-zqDDDFAtholcplpRm5AJICZu7TMsEii4X72KsoVHWgKZ0jJseaTTqxE2zG45fmQWYXwPZzD4KrBtpQX8MPZH4w==","signatures":[{"sig":"MEYCIQCYjM/E6cknR73OlehO8CCx/Gr3vyfJyNkeMnFxgdFLAQIhAIFFIwAFEKzrnTuPpXL6yCPEmoxwyYnDpX6A+yW570HT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16850631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdoAhCRA9TVsSAnZWagAAHYAP/2s8BU36PQ5VdTbTIgF3\nsWTdUwzd9CgRUtF4UBlDtVmp9DsyFweMPRmV30JS4WW+hP6P9r1EPomn7W2k\n+s+mFOIm2ivWUrbyrCouP9RdJ+p/q32TKODkgkwk18+pIhlx5AIgB0xq1c0c\n+OgsWwRvUe7aunhkNOvwmvvZKj15UpBpOTU5KzY5TiTCf/AM7COHBTvqn1Lq\n5cdl5ppqpsTVk3Yy6BnZsIzP51b9jCMOeH4hIBSbY2q3ju27DFxEhcT0zkKq\nmDZNX2oh8pqT0fl3xKSkZEprrNEfoz1HMDvjEsI99f2jc0U/BZPnhcJz1Ggj\nuCOIG3NzDJg+OYyh5ReCN9xILk4aP0momW/tApOT2r+Ntol//EzqXuZCHVdP\nhlFpVffOf4PZGXddqGpRTDulMYCylsCsO1tGU3Ym7adNWIyj1XUGLwiD3D+j\n/kDLlQzaY/8csAHFaeDLAsED6cu85vztpjQ6zB7/Hckt6w6EVvmrCeAQZR4B\ny4K9Fdq8Wng5LyZyVBducuRxrcks5/nEel+o2Nk/W2pUPDSq9GTIHte+IKJT\nN0aR5Bxx2lLp/sFKohiR73oE3kFq7Np5k67a9JjDST5Xp8NxiMya0Lncl3Pf\n8KUoe8ph6n9uDeb6C3+ljHDO+0QKFSakWJfbUlTiu0IO87GN3y7AQVw2vO7L\nH6hd\r\n=We3b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"b513f8941ceede255b04f51b49a7122e6ab1d7ab","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.10","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.2.5","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.24_1601601568669_0.8070139325470922","host":"s3://npm-registry-packages"}},"4.2.25":{"name":"@truffle/contract","version":"4.2.25","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.25","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"600575864d8ad18c5c8cab25ba0be39d84ec6252","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.25.tgz","fileCount":21,"integrity":"sha512-VPeMY5ofJuoS9LFO/9OkLMZPyMTi4ErC2D8f9L+6vwbHFEbIJdL+qdRA6KYK1l+/SBCmrhfFUK7sdIg3+9E48w==","signatures":[{"sig":"MEYCIQCb49A2IT2Qfg2NmAkBc9qiXDznmqPsri2g53K7NZnwnwIhAPQt6R22hOeTt6x/ZzqUBcWt98mVRlSdvZrOM4MgLLrc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16896033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff66yCRA9TVsSAnZWagAA2NkP/32/ppgWbYN2ParixnG4\nYzLLAUQkYVwRyqCxegV6SYtCrXuabyZ3VeMYOYLUh7fqa7zbVz3dzMgjWUrj\nfayKJyR/kCQcEuUwSS7hqj2wauQwtCwradLl9ipGDI7DtFzT8DgvimQgjYZi\nL5u9PV59iyYkoLx0lGEjg8N/hou3MuHDpk3ilQtYoae34OAw5CR5F1gSiMwB\n5mGVgX5O4OzAVFintLZQMNUIPeui1hzALI+c9KfxEBjXpoIaihWPQ40h7V7U\nRbwfrUEznb3b90gXBaZUWg7I70djPZMoDqy8+LNzqB5fmRFu1JfZnJaC/5ts\n09IuGc5wCUn75SnQIk1T6EM0nmtIHTq8F6JK2Zkq+BvZf3uC25X/m18bX74v\nx+OFGXaEP5rAjIp26bETS3qeF5MDiKZJZnfwL+fsW2RFP+l0s8QhfDCojpg3\ncaF3TNxoM6QrQGOgB/87g2O+S8mXuU9d654UJz//iA7/+qNowgA2YZn9fee2\nPYykbuqklOJ013cbriMz783pMpPfKRcpbIae5aofJT6pVXO1eNLv0DUBcvd9\nZZM7hoS9rADTDkUBz5+rw1KMTefrkTk/Zvruy1uJJs88g4cF0ThMRItHd7Zb\nhJdExvF16Czgz/xzv2azS8kISBZkbOM0K7nkYNy50ORutOE9pyEzt2kL+zzf\nWzpx\r\n=UbE1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5fcf3381020f4421c8d8bde27089c1374907ca4f","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.11","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.3.0","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.25_1602203314151_0.7563752950511835","host":"s3://npm-registry-packages"}},"4.2.26-abi-utils.0":{"name":"@truffle/contract","version":"4.2.26-abi-utils.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.26-abi-utils.0","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"6c73f295daca2490c2a4c637d1d1d441903f1630","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.26-abi-utils.0.tgz","fileCount":21,"integrity":"sha512-sAUKS6x07/ZWZZEpVTg4jNH9fecYM2HoKrwh98hJJLfWkoAFYD1UN9PK8maeOsvkGapvTV5/x5hUGbUi/sGRzA==","signatures":[{"sig":"MEUCIQD2Ay+UFDPYxPZmQJkPChsmjdoE8XnHtGj3nIhUaugp9gIgCjsIW+dGwUv6wjviU135iEmaHbgbP6MIxV8VLHzP6Wk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16893829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhM4wCRA9TVsSAnZWagAAeOUP/RnW6mZHsYE8BCkjWzTs\njqzHh+Gz89U859aOSNXHj6d7cUsjeTXzDOcUTRJgr4aNu9OzgzBvxKZnC9xU\nnTqKDZkKM5qz3sN5dQ6J1J/shB/5n2hYuv0/tVAG2RANt+vd7X1q1peAYeQB\n2RQ9tPa9RE19TvUlPpkZcmUNHB8OZOmZQQEWjJCA4nAXjTR1vbTtMkFsd7qU\n0S8gFEJQqwRO8vumV9+khbA4g9sR+38CKRdBdByrhzRx7p/dKB4xM27zcmkN\nVfzhZ6h/eB2SQoxcmeQmz/BtyqaBRjAF6ITJtuieVUvvt8KjMDGP2obV8nJD\nxlJnSr8yIqAGmb7ytLnl3Pm3WK4Pw95NZiEsTpL5XNOMxL8OWuZKEJfRWnVN\nuEvdZy1GvKhnPxd0lryr2m4/4LaBjKTqA9WiWh7DlQgHl0aLsQPlK2ZZknQ8\n7nPsQOeW/4dEjzQliIB3DCEcjudCisCiIcsqh4soyi8MvizKvNnYfmheS3o7\nMbA3bdkzZPvmosGDeH5Mkp/wItm2uc8UJE/ryPvddn4SyFfuWxneFpvcKVom\n8t0LjxPPFKpwL8bZet2YySnZs8NsxRHe4SLFxTpCpAvZynb5sfLDkdE/DkOd\nX9lVPThwfaNByqVqseJKNTEFLj3nZTIQnyBfwEqCSDLG5tMSBjrEQ8EYVD14\nnIK9\r\n=cbG+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever contructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"d23827f83f3fa232fb0a934a7d0406239e1c3c7c","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.12-abi-utils.0","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.4.0-abi-utils.0","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.26-abi-utils.0_1602539055620_0.7085984037355031","host":"s3://npm-registry-packages"}},"4.2.26":{"name":"@truffle/contract","version":"4.2.26","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.26","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c68ae32ff5c96a3dccafb3a196a21ba7374151e2","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.26.tgz","fileCount":21,"integrity":"sha512-MKVb7Prf6IsY8rVjIBGrcAJoSTbw3Hx18htq+PuGZT/12r6ntzhnehKplaQbZC7thTFn7Yv1qrj3cdJ6insZ2A==","signatures":[{"sig":"MEQCIFj7RxBB7FNKgDg+snbuaivwQ1Fqv2yhncAZ630yeGHcAiBxcBo8GZDEDIFd6QMyOendOKI6Kur0Ps+A4drRlpSPuQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16893649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiNrbCRA9TVsSAnZWagAAgjMQAKMHUwQQp282fylQ+OvN\nuYSCyvAnHrlk8U8JLvse/Vj1V2BDnIXhv0dusoyvCGXuGt/Tl6jNhSe0hSWO\n54uhoY5lB1Rbdm7p+lcB4hztoXXaa2P/kNohwl1/GnNleE9YjHabUbKzYEhK\nFuVPQN4jp8fecq1Fj/L7RERXbLnJ3T4+gVcBaoISuLbsLEtxMkTmU2Mc7gpj\nY91ZGoWIu4uu1wjtrzecSTuTJgervdMzpHj+tTugpC6bJNwBvqibG49hJY3a\nlKQ3SDKoscMpQSW9O6tQW5ox9ly7vD0re1UWjpKTzRgvLwqs6Xnc3gj5D2B7\nWzUUOkTsoSjq4C0eeAhEajuFCTQqPVM12noDtkGrwHwZnmfEIAaEWkExX2t3\nVkjLf3ldh8pbMyWYK/+UKMl/xnNRF3h+MN1s0qMK187WE5Fs5hXyqhdcqESG\nyOB/o8Xt70bEAOyA5o5qYzDUicM3tJauO9jZWKTVDA/rNKJ6BiMZLwmk5EDZ\ndntJkm9AwgOhowHeBiq7OjJvck/UKyrTKEWFVNOGH7XhIU2w68w84/rTspxP\niAcYqfPPewqt+FTrIHsLnvZxH5lkWVqH+GzimjTUE+QhSTDcciUu7hSK/iEC\nyH6V+wvQrevs0nmAeGHS0mpXVxUjl1hm0mIZ7cqcAMSeFs2+d8Sn5HQjfCM7\n2oUa\r\n=RGPm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"911755f0a603f033a716ff921e7e0f5fe24a241d","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.1","ethers":"^4.0.0-beta.1","web3-utils":"1.2.1","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.1","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.1","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.12","web3-core-promievent":"1.2.1","@truffle/contract-schema":"^3.3.1","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.26_1602804442960_0.4923412453907534","host":"s3://npm-registry-packages"}},"4.2.27":{"name":"@truffle/contract","version":"4.2.27","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.27","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9e3c257cfe67a0153d4c25a5f8eb0d6550cddc49","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.27.tgz","fileCount":21,"integrity":"sha512-3IVUmYYrYopY+9rdOK3EZgRB1NnC+NI83FQ2Xuvgx4fg92Y/ggcofCJdI+D/iXRwaMFkIkqgJ7K8qZEJsoHWjg==","signatures":[{"sig":"MEYCIQDD57imOWRBPrXCtTeZ3ZdZiQJgcRdiLdT1ltgWKQ23hAIhAIyWAEZHC6TvwujBMG/pa3flkpN4swsZCIOufjEMxkNo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18229328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkbl6CRA9TVsSAnZWagAAg78P/1AE4K3njdcQ8VStDCaj\n7DI1wKwplQfOB3qCrE12CgUvYOX1MwzMbABpRnWJxWBqNjMCidbtiRs9IFjq\n0V5zs2ovhxZchpTzV5ot9+tQ+ffUUusVnq2HY6RjsjE6D9E3IaNAVQ2iLXvd\nIGRPSahDCNxGawb2kI5M9jtxd7U/Ay7xzs8GBQFEzL+ZknJVUXDOkd0Y2moW\n3oIr91DllXH9XSn7G/uSUVWUcPOQ//CDoHeEB5QqT1R1UuQi5xDFQ7OBM959\nMuPqSzaVGR+dB6IYDrhY3ArVesdcIF/uHR01vVaYBWUQyfKvKFZoQaNcbmvz\nBhtVoEidgh2ZzVTc3cu0d7Leh5+x8wZ4mvd7n8WiDk3Kv2/YqeZ7ReeQUB9i\ncjMRmUWWWahTMo3W6MdJ+S2K8g2XruFLoZRa+c8TmSqD7HV2TfsXFFJyrbeP\n92WuKh9iTshzVP2IUCgWIxR3zDP7XZ2evQB+IyxFNbjAeMs49heX5kwAk3wV\nFo2zr8odYjaf3wgQ6JZJkCYwuYt3qsQpuOomRdciDpKdcH9cKiPV+B0hhwC7\nwJwEdydgpHMQvfe1sHBZ1u3oQNifUZd88uQcKFoMSvF+nX64KCoD6FZjymat\nDj/StVx54w9oZkeRQ+gtDKowIDAnrsQS+YQiyBKzlOw1Joucn3ea6mzYJ66/\nUSSx\r\n=ML7+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"89642b90e3140aa72e4d5004233cbafd6af1292a","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.13","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.1","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.27_1603385721450_0.6205737919565546","host":"s3://npm-registry-packages"}},"4.2.28":{"name":"@truffle/contract","version":"4.2.28","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.28","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1cde9706b41b77ac9070de1aa0f1bd7663705ddc","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.28.tgz","fileCount":21,"integrity":"sha512-fjHcrVx/ZsAJD2ICNbn2dytwAqzcQUjHBB2k9/laCnk0S59TOK2md/NPGdapzXrbmlRzqWoWBNJXvbPHPbuACA==","signatures":[{"sig":"MEUCIHN9Qd9RQCgEINojkPKvRThFLvt3ltVd2WM5FzywoCqLAiEA3au5Dn7JOxN5sZLy5TzP9PyzmWGbPlMGJqVTtaKgiOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18229328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm0sYCRA9TVsSAnZWagAA2VcP/AmrtlLE0QTe3mCUhThJ\nenuRAnEt8DB8Rc/Ja2Nj2/XEvgh5Lq1yZJygKL4ORgtnCQGm2MqUcrLbYmWL\nX1Eu/6SZgZz8JwgYtBS/ZqbPoAcedPUbug4EhX68L4xDrACCU5dSkWvsiIxH\nyibT+ZczBPpk5DEoxBluhMN0DlE2B8bMUOFaHdCpI/N74PNVl0jKS2u8mSer\nCEte5XlBIQuICFEK2VZFATep5SJl+lLYV5UiO0mWlpRUNa2lh1y65Hb63f8Z\nluCl8W0lUfKjFusObHB+HAis+wr3Q5ixAPSJDhzclaE9oHXSpovgXZL5t4gs\nmZ2Ydz3QijxIY3dMx2TMBEa0tSEdGM2k6+9+xd/Y1tKiF/5sEYnY2JKRQNFZ\nmVgsJc9WHN5+9jPYKEnZ8gXRLnDwfOR090PuNB4nvJxh8UhYolLoYNFGB32p\nAL7q1y/K08/JIuYU1JpaJsoUP5QdlcNGTE/wQKuOtlVYiAhWigHZNvTMW0FW\nBhGhwdl5uqIUEdc3Lr10dJmieCJCt+uAVoJdbEaEdFoIEd8tR9/GG1/Ua95X\nEqQ47l+/cTKMUkQ/PRutyi8TlRuTxyEZhQHqK+YD6uMwKqryBXBN9Dxyj0gi\nLVA1ECTuqVbLD+U5vutI+YTUWi7o3+rJgvverVzlbnqnO/kJmpDyCcpmXKj+\nrlb6\r\n=Mjnc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8b5cbbf9c463272633e0fb603cb10e57c4ac2cde","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^4.2.14","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.1","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.28_1604012823329_0.31374972509620336","host":"s3://npm-registry-packages"}},"4.2.29":{"name":"@truffle/contract","version":"4.2.29","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.29","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ace820def695ed1dca2a1537d0786637e8295324","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.29.tgz","fileCount":21,"integrity":"sha512-pJx9LBmT9KrF+n6zl6J4AYkR3M8QGW9shjkJ9VWVF96bQ1uOrLP2DkhQknkIkVkQ+4NCgge2Q9cncFI5QAE6nw==","signatures":[{"sig":"MEQCIFAVfpycSMTR4uL7BO8FNqkFgKYU0oZ3o9uI/xsYS3CCAiB1eS5daG3Z1OEezVyS+1/fV5A5qcMzQGb2rwr6YYpmkg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18235482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpOBmCRA9TVsSAnZWagAAMzAP/0tZqquMZawke11WZu2w\n3kzWIDPFJLM/t+mkz7aIW1U62H2Pf1bMUNYo8WjRY3OAGwaG8A40O9Cl6GzH\n3lFUl2ra7At2Flg+IuOHzEV6HNzg42kPazzZZKJyxzc03NMBZ3q7BCSxSzGR\n1gd1vDcmrPdQrRkNN5VdbroEc06FWRCpdNufpfSjH53CAQu884Oc/77pDGaR\nDnrv+RXpQn1GtK4BuGPnm7L0BtaKe/ZyN1g4Y08HMax09xy4LcjKpPsBGvZI\nWnmPvMeMObhJOZTPJZ7H13XeOIdesIXtyOLUiZktcawVRSZ7mH47f4uLwgA5\nQeUYmcbo2zLdEbqrbxZjjxMnkcyy0/6gCQhGBoCuorSIESFq0vPwKTwbCCII\nEIKVfrjse5oPxQ/D3UR21Q70w8yRO41LHM7T9aMpe6LI86bbYIXMFvmjqwet\nXOScC5LUaX4kgEESoMebDjhYoc2CEOr9gYkVl6PZQ5yqxJMjZg1gFqlmWjdp\n1OW6+t6KppH9QdMTuKZ0x/ece8Xg8SQeNzGwWkMlhnew37Zvm7FTuYZtRPwA\nhRbgivBCAGdJroN2TAfHT/u/nK+fkBj8iRRZudB1+TK4TNa+j0znvomqHtBE\n7J/sEHyU1lorz7MTTOoSEzBE94E5/TOGnKhM4ki86YoMQ6IFbeqVlnbIrMQz\n0xZ1\r\n=E5cb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"198cde0e2ce60647bf80c420c053df32da7d898c","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.0","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.2","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.29_1604640869513_0.9640667292721772","host":"s3://npm-registry-packages"}},"4.2.30":{"name":"@truffle/contract","version":"4.2.30","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.30","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"44a2a20e4baa6b40cbb0748a6bce997c22865bcd","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.30.tgz","fileCount":21,"integrity":"sha512-BXQC+ddH18W9cVoRTlKH7hqnyrOo0HN7/Hyv7UiAgPh4JNpkZVUxFSd+/MLaE5r8NEG2hykDusOVJ3OaR9wvmw==","signatures":[{"sig":"MEQCIAayO5PhRjMgAQwQSxUhm5LVAyaqybv3q7jsVXIrEMGfAiB4h8MjVqpQwfbaxikhem8AYO76rYzD2gEUcxvngum/mw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18235307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrbeECRA9TVsSAnZWagAAFfAQAIfvgj9MqRwP9zrWIzJg\nfK3LnWHIdUYqSh65uSyAj/SOD/Uweh2U4VI/UzlUnLAnZs87PHJvcdUHzaSd\nFmsNCBBqkQvnPheyyCmaE1IKYHCuVTEfAA48PnjtPpKAgXj1HFipwTN1x/S/\n1KUSQBrElbuNCQvS55daMVvBHDuyVR0w30wR01UAKzwaqWdL6ZhkSskkvMWy\nQxJXjy6Bz4djgNe/ZQ6dbqAJ1RBL5y4NAaBLNqxQuZLoysBX/0v+h/Vfim9E\nzYArQZVcKMjzA87mWWRKxkXXhSOZpzFIwUM6h83ruZ3QbGkbpDMVco5+S/RC\nRBFldPsoj+UPnmU7wo+XgSs47ipEjPySXzcEPFEqd+1Fn4ePSbWXu2fj8Ynm\ncdOu4qzVUjupJhd5zKcmtuU32lZGO2V9WJCwxfBOYmrvDWTUrP3qcqtHO+Qb\n01+pK3iwa5EwwFiQfW5S8OnHFFwJK/Uhh363YTjPqlKMi1gD4THAgTF7Gjj7\nzRPTP8OWoxJLwLcManTEqy2kuJSIlQ3vpoPiIq9TdxJg6uxvYO5DFlpZftOG\nyGyXPa+cMgpe5dLxWsJjmio2AxpYULp1G0vkylTyCb7cMXJjDy5iyJ0awWDW\nvFNhArzSasWpMeDjfKKOsPBtEIJnMTNb7gELJ9V3gwxgKUCpFRk1dJH0i7Qw\nd3S+\r\n=pCm0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ef903cad50018438be36d9ad2f2a59ebb7d130ac","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.1","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.2","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.30_1605220228089_0.3328851617283628","host":"s3://npm-registry-packages"}},"4.2.31":{"name":"@truffle/contract","version":"4.2.31","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.2.31","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"85c6559a699a67ec0b2609c303981f503d97afec","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.2.31.tgz","fileCount":21,"integrity":"sha512-wifJ343skGQpFJQlmRQyPRquguR0uDSIVaRPHXVsGnX+6p1BOGP2zhkSUjLo8WUqyfmw/1bZ/Z9GJZ7XM8PVOw==","signatures":[{"sig":"MEUCIFRJIqx6T6mE6RG5lMwsTBCWYtXyHdilY9egWqvS9DlBAiEAis+UPh0dpY4gA2JXLuIDqPDB8gwDfpFXaXv+8qAEL4A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18235377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftu7nCRA9TVsSAnZWagAAdiQQAI+r6ykrhhVSIJ4qJKWs\n6chPW+LdotYoboLQ1wdtqZqlwjB4HQtbFKTXT23lsUt68LiYVSSNHJUV5EEV\nXpdPBnpohpmLGbLssArygU5kc4Uokhn2fZA9h9s1V09mJa5JvD5E/hXAx6E2\nAzBQvS9JtmOtqsSVJGfSkm/9gZ1LC/lsF/c/vCu/Tw60siyYhR3pBIQpFy/N\nBsljQyc4Su50Ik/KVBgpBt7ofTux8Bbbaxyv8TfJtz3dCF8DQAuGaRAir/qb\nUcNcUKu9qkB2w14RUdxL4syAv91ZfHEE4/4EjRivFnoDLYM5B4fAWrlQ3K1j\neew7AnOAdqv/nzwsR72GtQ6q9QjAHcP6Ot75IkfZSFkt0A+7dPo6UogtNxJb\nmgR+UcL4cD20ZraVFE9QgqERUdE9mFHZr82sSB5eprgJPQ6b4IGqF+7aMUZ6\n2Br13dDvvAF/DsBzzbUvVo3odkFgYqzdfJ5uh8HYlDDNAYztlhq/MU4wt0oa\n577qcU6807e1eWlwDY0EMk6uT4HjTskZj46ASj/NtZGDGkm9S866gzrqUU9S\nce64DKwALUrWtJiNL8i/9VrKhIfXsUEas+qFIVu7J5UdCjH1LHsPI7ND2Dq7\nf6l4GP53cM6WyUZlE6NvhzTLc70fiqgJqnvpB2Z6VuP9UCglEmvwKwgdyogO\n18sX\r\n=/X0C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"1f9ab16819b7e0ea994a9add63d35d6a74932985","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.2","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.2","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.2.31_1605824230222_0.4053749821832522","host":"s3://npm-registry-packages"}},"4.3.0":{"name":"@truffle/contract","version":"4.3.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.0","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"37458d9f9fbf287d45130a09d855f68a1923cb77","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0.tgz","fileCount":21,"integrity":"sha512-3x9dhBuDElRixR8bxknPfuGH7bBaOlYGF2FsUsuK3CoXo7hblXSQg8VZ/ns55oTSxDzRkwmI0EnRtwzGObaoGA==","signatures":[{"sig":"MEUCIQD3Sg6HJt+64E/zf19N9kOM2gVVIXaGhXbWoY7lhQXmjwIgbrRphlqy68uPoLttWhHXxtW0wliK2EvKh36y+zu5vUE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18247696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwbHrCRA9TVsSAnZWagAAfRwP/iiwOzYrEB01FeFJUTO6\nBMjU6rAEh23MrWWwyk0gS8KEyTFwaQg/3cQXqgTKC6RgYMjzoEb0QMKYIHnm\n5lpPVZq5rF6p8uTJY59NAAvD14uLR2dN9Q0nECppr4EqkQTtqyiE3UBOInJ7\nY56bDWfD6d0Fk+vQrp3DTTYV3Ks6DFXjgZC3+dBRI48riT/OhYKOQJblFWZj\n0k843EqkXI8xayexiFF5ipZ6zzFe+aAgjOSG/tB5zoyvUY3u43YkQmK7i1wT\nIMOVJniHiGe0jSgdWjpH3rBxbb/kUPxxCCwwbSyyM64288lvi69r4S6YxiW/\n8FmPeXHdSq21lTUZaxp8AkbePBiKTAPIF4eOxko2TbV8d1aOZVL/Z1EgdSfU\n9ohMk+QAN3eRN2rOWTFIppPTV2kvp9L3SXBFBoXpCuy9uRIXiKKJkmtzxKWj\n9j5OwiILXloC7An8m58ke5RZ+5uOgSmSn9bfGtTc1UzRyNoY1HQO/5lh3n9Y\nEMnug5Cf1J5Pmu3Sk0AjS20QOP5Pldvq15Iq1wom88W/SK3KNmggWWn6hUoY\n1pVjdV+zbNlvg6oPoLuDgMJhryGTKJCvHJyOEQG2b2EXU1uY3oIp7V/1g0sB\nZe/y+rLcVeAmgdzBeRQPpz86knXYo0gqnlhg9b+zdViT7YV/NMYeEul1r+NJ\nyRkk\r\n=AgaH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7b6c7c4296dddbc2aab7029941e381221bb5a3a2","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.3","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.2","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.0_1606529514390_0.9449873894490173","host":"s3://npm-registry-packages"}},"4.3.1":{"name":"@truffle/contract","version":"4.3.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.1","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"d31e696809084778998e8cafeeb0cfdc9212ee81","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.1.tgz","fileCount":21,"integrity":"sha512-bZJibtNzVapBeEfBF/TSSnTPuZ6yrJid37TPxLZk0P12XarW6Eb6BsYC+FNXZQmw36zx79OAF8QA60UxItZ8ZQ==","signatures":[{"sig":"MEUCIB7UlY1EJ6BTkKmCQIKKmHJgXRTB4h+u5rhEczilHQyvAiEAlLPw1uqNs8onSMsFIHaPnnY0qbNCfBD5lrcJ0nxMZZw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18247820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyUgxCRA9TVsSAnZWagAAulMQAKJJG9QLYwlf39pfsYlL\nmGPiYpVIIFnuFi1/McOwHt6Atzq8A3wVu5ZA4h0CaD2Sk0kwM7CCbTymT0sm\nkQCEyfpP/gFwEUQ/eJQQ3kGa1CnOJ0BgrjDi9j3j2YH92wLINAW/hW53LVOc\n/PidgzgrAVh/q+K4q+ctxG/hgjnzmIgyZt+Mj8nfFWAA6mkfX72Fzw5yPtvd\nwF+qY0CzoRsVhxHsLl0yI9bN3MXjbGE8bdpwPL50uSOzXZVXv3uyGbVovQJH\nuHs9GhQ2NMBUnU2gVQAAa7H89X8rZiwNAwtsCW6Zg3sG0avCWp8QG2oPj1Md\n/LNPxKJM/mDF0ZjvCnPCD0Zr10RpHACxHxhkTgaYkxf+1GabuTnjnNtyfrJ5\neHn0rPnIhDzdI6tazpzqdPFe9FJ0KP+OkjTMfk7Mwh51DSoFdX/JqdHUnN+g\n5WX0CNOCqOB5mzz+zG6havw/GIJR9rj6WgLJI04JNpz0idbz9XmJa1AwpNmf\nbubd2JEdSGsFKDAJyUH9rt33DQdVhN2KdWYS+qol5c+FVyE0vQX4jr0o1Wq+\n0YPxcYzS3YKASHWloj6c4yGTrBKj2jHIshn1wSjaFohJoFx6WbDDhdTiWfKT\niwPuhfKmwQV7Ja9aM5aIAQ8OkI8Qv7FWykz1oLb7CcZJ/F0oVOaylP9VXpsv\nab18\r\n=9xCT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c9b9756b91a8f86c821a54d3437bf9e3894c79ec","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.4","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.2","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.1_1607026736814_0.9101042183777432","host":"s3://npm-registry-packages"}},"4.3.2":{"name":"@truffle/contract","version":"4.3.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.2","maintainers":[{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1009030a6dd393a62a99f6904b2926b82d3eab2f","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.2.tgz","fileCount":21,"integrity":"sha512-xH8rwJ94KpJAE+bYjZJ8W9eKB20uxxnOL9RDUEpN5DjN81zedq3Cp8C8o9FR3SgCxwEy8YLN/RAlLRZX/UDpLg==","signatures":[{"sig":"MEUCIQDDpwc/P0j8QmJoembowjPlvI14NY+5ggPDnIrXCNK/NQIgIR4PF8jzT85bFMXezpbhpjrWdDRIXGuwhC2NYJBqUo4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18973608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0sj4CRA9TVsSAnZWagAAQ8gP/R1THX/n7+TQyoJ2zNCH\nBSwM/46JK0LY+QlDzJsMalnQBdNimr7wg7uw8v64mMBcTHAgllfa/iV8RHXg\nzp9WeA98Xvtx1ApvzjPTafRjKmxxwgGbkJ8rj0HnTPor64oyRgumeIoKeNja\nE8K/tcHZ3iJloNULu4NvZD79TXdGYwmhfyxKtlxG4aaIyjh74JS4F50dqKr3\nAhjtpjgbh7/hAgkFnEVA7cVWv7ulkfEHT4wnO5sKc011Dkl8LSYLFU4/4lsW\nWR09Nbaw3ambZGJj842/ZK9X41waU0l4wW2R/5OV8hNrScNCWXUYpVXRGC56\nppfBNPdUTFk/qoSo/L+UHyZJYbIfuTjhcNdxSwZgqhOaRF+wWvB+T5Gw0OBh\n8NJHjLxV3bNQWycA9d2uWlMy/4ePIsqaobX9LgOBdITnf/wp4U3PMhNu+Nyq\n841IM2aDgMh1up9Slxz3a+b/EFR9L+J1YBsmhGYSOO0LxsR8OBmSnBbHLGsf\nQqqs6NsNHu8v3Y/p64ARcfiJBpV12xmj7QhkIw85QpdTw2l7ajj0yaDjr52H\nuLiU5ScsjIK5ofRy4ny8CPTs5ZlkEmPEbcfdYf6US+a6N8nt8+tMF56XqCW6\nM1BAPQ5jODKAyzy1LJf6tAe5wFOUyeaCHFsct5hyM/4wJm07l/6hqMXO4dN2\nZ8on\r\n=CSFt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8565e114bf8e52b2930f5f7540e3e1b89d5124ef","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.5","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.2","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.2_1607649527642_0.09765146553201798","host":"s3://npm-registry-packages"}},"4.3.3":{"name":"@truffle/contract","version":"4.3.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.3","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"629f0c70d9f3c3dfade8ed95d407e63030306000","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.3.tgz","fileCount":21,"integrity":"sha512-pY4G3CxzbVd46lm6AEmeLNa4qIuLcdwBfMcYARlQ7R0+hAoLT694lYC9ucAPA2VEarm4e0383dD53bHES4TMbQ==","signatures":[{"sig":"MEQCIE1Igt9A8RY/Ge1zNV5K71YhddE1QyKCk3FD/ofZtUFrAiBPj+ZAaPtG/zBYMThO3v2BFI/a1Yq06ujG45gSjYRe0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18978630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf280KCRA9TVsSAnZWagAA+i0P/1iL5Oj9OEAjFjI8YCpa\nKrcxWe+PHLEZxvMnVf2ikOc055XtimvfjW3/RzFEdvOzIk88lafQdFFxqbCm\nHgz0TPphyhOiFNSha1WY+kZdQJOHcnial9BX8obAP/RnmzFDt/gugrV0ch10\nxscOGpBlQRqcH4nSVQsRVdWpn/py7toz4xvK4uL5dmhLlDfjqalp20/O+uvg\n/3fm+D+3tFkN+RSnFSwDYFA6VKOaIleXQCnDWsSNtjtilxhV7QE/jBKahcOc\ncx5kSXl+BT1+6tclslHpTC6UUY3NsPA6U/CdPYljGIAkChrSs0jd/MiUi5s4\ntyujDUbPb/w1rP+s03/h2ekezGewSnGHqFG+7m02Y0M97jaGD3+OTQGan/+M\nHAO0GPHFT2bf2WIm7HCP7MpWuVNA2nc/Rw6L8ZJ5WV0cBO4IjgBxEcwyYPq+\nSljbcMD6lQtg4VXkteA3bUjINqvgnmzn7zKTnNNlMSQV9E3lVKugDRyQfpFy\n4IJCWGqBRfX2K8HNBKIxzugStha3wirzBCEpRx7BDOzZ34jDKpc0WVaQgcQV\nraY/GETqHFvJuZje69vCFZ8UbMBMqas+is5led9MOIUfFn64dANHHSdm/TW2\nJQ+n5oJKV4wuipSFi9IiwtIwzgwqm3cI/63KNbp7sUc1VmbK1BkqXT62eHUM\nVEjw\r\n=BAiM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"06bf8933851fe6e38dc4c832d0a68fc05817b8a4","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.6","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.3","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.3_1608240393591_0.3221986048273717","host":"s3://npm-registry-packages"}},"4.3.4":{"name":"@truffle/contract","version":"4.3.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.4","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"4113d32950f117fd20225b755854a67accbe4010","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.4.tgz","fileCount":21,"integrity":"sha512-6I62y+6z5gqvbYd6Vk9wWzmDUIbGdWAPNtqWA4W3J6hR62aa3+JUkPVIO8FxSidQbpOBDMRdFQl9CI+MfY0bxQ==","signatures":[{"sig":"MEYCIQCo6ySgvgTXjE55aBpSzPsjDY2HqMgpfZNuMYsdLVMdwAIhAPO/9GwN9euDy7WgFgbEzcxRv2RdRQQdbfjm98GcRfph","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19310334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5+HACRA9TVsSAnZWagAApB4P/2P2sJG29eLOUDfYC/vs\nqLPHuQCJRyiLoF8EtA0UNxl1WlMof3ntnK8yFvclzxBE/47hIEhUjzxIihCg\noKKjfpUW5MaTxkAMpP6/AGGo1vWqBfdS9k5C2zvOOOFWMrdiO43NwWkpVYA2\nH+Ovki2hZyJlqb56VbBKtls4Ao/x/233QoGjd4HjOop/aa/E76SpdkvJMNuo\nrHjpRVg2byz1VeORahs/DX4RGWLVB1eSZr6TCCfEoxO34L5YrcBY2zzOi23a\nMiXJYwl6Ay5xowjCwj11maOKNZqukHQwkgT7Caayx8WS1FT9/1RryItytM1c\nibtzU2rNZrXPqapk01wPNiov2jT0frPpmSM6y2lQ+/t64pvmoGfGWLLimEQq\nfGJ+ztpuB2IEXnncqQ262/5CtAXVwkhkkOyM1GaMtwZ0kuBA7RxgfjEpQVSx\nsK4UijTR1SNcQ32sn8jPPUpMtFrUPxTn6XNThbNL8YD8b5plYez8odqf0VJX\ngfZuS326yKDPW2Rhf7+XNd1L/WWldQvB0nKBKX71nKl8VLRk+K6q51z17I7I\nhVOttk4V1yIhK06BYxO4nz/QpJQZVXkALEWYFbPMUY6G+ShPPUBGgLQgQB4m\nhbwDOBhbu4xOWFUo+iW/soLjx584jZ4o9S3nzO5T0oIDWRDS4+X/b6EtPoCu\nncmB\r\n=J7C9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c520367e02a7b2d95648a7e4bc68bc62f9a125e8","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.7","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.3","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.4_1609032127743_0.5622742926188895","host":"s3://npm-registry-packages"}},"4.3.5":{"name":"@truffle/contract","version":"4.3.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.5","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"360434b09bbf9a8d34ed2f7075f40d36509b180c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.5.tgz","fileCount":21,"integrity":"sha512-08gLSId+spnXqdM/25pOiurNcSBeCBa6KrplCgojy1RvqlG8JbEa9jXHWt1DCACZTtSnCsC2ywSNxAKRb4HqIA==","signatures":[{"sig":"MEQCIE2L74TZx9e+AyRPG2GWXPd6Ka8MzyePYXFh5je10mXkAiAjZ0UkqrjYd4uispk58toHdx57fg5DluWU5/RJq5Hp7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19311463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+M5XCRA9TVsSAnZWagAAQpAP/2sgB2RUoznF4KZctUb0\nRw73V2H7qZKKIC4o0Dom+M1sJ0YV6of5Zer5vore0ExE+v8z9D4Nj03hrczP\nK+//z0k5nPxpZxElOyYt0KuX/B9jPo1BqXwIGK+aZLEagitFZA+GrjLEBsg6\ntBMSTbcPHAyoBGoZV9cWyXwIxgsR3G+PoSuphTgK3jfe+IgozDA/x66QjA4s\nwgMwIckgmBJmcj6xLRU7Pbe7o7iDkhkag9nSzTKB22DRRgTtCbS5ev8pnpT9\n5zq3GoUCoLcX2QyVS0JMHXG8nYzk/38lrziyyhj1aUJQNddN+XphXY4JitFb\ne6RL1iDhL299840lCHQyWdUyXA7vBhZhZHl9ZX2kemkcsYOB9onVUqiRjXPs\nY9teHVDIRepA1DQgR1v6beVWWz0XyPUl3QDeCpEdmDlqELKgtBK6WduKBMBm\nQ266/Wq1RdGpX2h88jkzzQywrN0noZKFEggTQqIZwYJQMEUjyY4+lIrBhMvp\nKR/PE5tigCvEADIk+sPN7tTOMhV0HvUmEErIUA+B2JtNUMkT2v3nt/hQU/ed\nhCMcpCvhOz8VzgQv5vHFvd+3blN5wjGMye5u0Ne5tacqmMAVCG29vk4fsQCI\nEv95Ti00tKjVzENb/o/gKt6P34QIvpStzdUUulVSbGqwt/Xmk3Fpt5ZWzG96\n29ST\r\n=CRwD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4dbbb066891674336c28d9cd31f3027d64b8db0a","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.20.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.8","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.3","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.5_1610141270958_0.2938888209191921","host":"s3://npm-registry-packages"}},"4.3.6":{"name":"@truffle/contract","version":"4.3.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.6","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e6a77ea8dd5c4832c41529313b0dfa092de65208","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.6.tgz","fileCount":21,"integrity":"sha512-XcIZ4eG1BrkoW30ZYTEqQGskmB2a2CoFJOLDjo2heP8xx+mKAPI0ceg2Ym4PbBUtqPBL6CiWE2WRh2zpFWPrOw==","signatures":[{"sig":"MEYCIQDiSeCXO3vSQMtxGyKgH4eQZ+iB5UQV/0qfk3VrXxnDVgIhAOYNYRag4W6CGMkNu5CeDxogtDciOFbqGBjZkGMFPvmR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19311351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFhjcCRA9TVsSAnZWagAAInwP/RKxY50IDx0El3Nvvcuv\nqOdIE40qRxk2E6LYjlXgedNUblGt/R2cp1m5yWZPFi5TGs/LHPwL4Y2PtaCZ\nUAWCdT/t2EeyBWOXLws7Ow+/Ny0wiUGPzqhxOAkFEJ+fNaGHqvuOYB7c0kRX\n1i0CIaocwItWyrCYEOfxJ+9HysGiSDWqX/GeLyOBz/1vpTJlDzVQJiC6fKOh\nb/VYVJBD1a5sHzWT2FezblXRSqwwRZyXcCnV0twU7dNClLP8yxNkLxw+6R0l\n7jTfuHeMlME8Ar1bcId6Hu0pTLJnC53IyZ4C0g28IK7T5RQPVijFtUZbTikB\naeO+9mZsx0eu7Oy+Hz6zIQPhwtiUrgfCbVQZtHRbiP4tRVG6kJ1tdScoHWAi\nD7M0q+ME6GcD6pBhoLouhNAuthCvC4HkNpWDtB1fGgzAiKbFqSb+OK7P3Bce\nFDZ/XtHSPJG7ZUTJyXAwlRAHCJXkthv/RQgHB3C3cdfa7QUAc9oiVYbB7Cjt\nnjoG2BkMo8Q1jgRDXAlbXDga1vBBXCNFmCmEN+LQroXhVH9QMSr1leMpDhyI\nX11IE2ffhvBA/tgoUhTXMhqjWGooh4oAa8IMIsTmkLu7FR03ddvG7g7rkQi+\nrWn1zff2TSenDMq109beexPvabWxiKKrSV8YL8z8QEUvkwiQUkbHESAlLJjz\n9dDn\r\n=4gr7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"dce3085ee50de3ed83a55bd6fe038a843ea75e7a","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.9","ethers":"^4.0.0-beta.1","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.11","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.9","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.3","@truffle/blockchain-utils":"^0.0.25","@truffle/interface-adapter":"^0.4.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.0","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.6_1612060892223_0.511879925241228","host":"s3://npm-registry-packages"}},"4.3.7":{"name":"@truffle/contract","version":"4.3.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.7","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9a9a8bec9ae54722d9acce8344efbf455548eeda","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.7.tgz","fileCount":22,"integrity":"sha512-ClWwNBhT8xuoULjAFu4HWVY8fbe2LKSZ24LjTPcMwfrSEKMMoaxmC82sfoGEyKcfbckGLqRhmqBIopzMXxOebw==","signatures":[{"sig":"MEQCICDnRdD9oDrJur2e68cXK2s5uTg23OZQSxmxMSCdMnbAAiA2npbMhfJufNAe1SdikoVDkGrs4n2A1GbQi7KUHpHNHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20368721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJbcpCRA9TVsSAnZWagAA+5QP/1mnY3rFxjNo0zeeodHJ\nGll40jdeVqGukYa3g3LamuZ/Q3VLfMutj4y+DCtz0q32yGvEEGTyk22CzJSg\n5H2r31G2THNzxKqjIgnwodZ3gbm/+Y+E6XkEVtWaIOF76KWXLFpe2PeydWhT\nm9j5RJtR3aYCe0XayZT2dSnHsuxSLJpbUUgLS/lC7cFylhIWSbhSQd9p1ruI\nVnHN7bRAt07nKeaggpO7e6sFTcnk9K2QrAxG3IzFLD0V8298CPdan2Jcb1q+\nhJIXdIgD4NKBab1GG9Bbg4tArVUuZLNwzS80OpI/bjqQUPnd+TkSPWA0pNwY\nWwk8whDj1v/h0XvrfcpkPpFvOUMwvTjC3zqfnSGtDivMltjJNXuty8VBkL/0\ncWck3RiIoXU/UkYcgwjtJMnQC/OOVwrogMyRjtt+3BgJUX+S6R1eruJ+Th9z\nr2F8Oal4NNSK/BGMbg/5M4aBQX6HYyE2991BAjM++NvhI2nKegJVniIB/sy1\nn1ZQTnDQqCgGS9UHmwzR9Sj+CgkBKVn1HuuhGJFO4RsjTvBgTRwKQ0IG+6+B\noLwCT9N55RqhOz6LlsbX39oCn4PcGax5GvNa4hknEXM3kS3zO5MxKKFAPbO2\nN4TZ5BjGP/Cp7qQNYaVroqq0GEmJi5pBVtdCtySxufx+P1JtoswfCzUKTfSi\nFMVf\r\n=pmWh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5f8fa364c8a0dbf0e07827035b1c335901549097","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.32","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.12","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.10","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.26","@truffle/interface-adapter":"^0.4.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.7_1613084457202_0.6699501852926979","host":"s3://npm-registry-packages"}},"4.3.8":{"name":"@truffle/contract","version":"4.3.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.8","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"806c63d683be81e5fd09d54346b52d7bb3940b5b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.8.tgz","fileCount":22,"integrity":"sha512-pQjRVUQ9muV1zT/bzhCvyhQXLHQVZobhe/Dwt/sIoj5Alea0ueNPQTeLN6DmMWusNDSlY8fNM7mgXJ+izvdpxw==","signatures":[{"sig":"MEQCIFI0oQZc5zre7Nut0Du75k5DDwttst26xigtsQe3ZF+jAiBEI9ZW2M9/9hWx5SDPdl6GzTzWM8lU4Q+ksxx8VIX0lQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20369592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMDsnCRA9TVsSAnZWagAARZMP/0qIC7oarmSs8y1TqfPN\n4nhwwOiJbHfKCT/7LvdLa7qJAWgTmocUo6Eg6XavA+HLkyhL9oLYP67BI5hP\ngt4FF+ymypxU1FpxOLcPI5UkwHQbrNPpibOuJ8ZCc4BmNG0Bg0kTKrmCbYc/\nhRUuwnbVmqCDMz5OTrimIZlkVCwgsetB3BYfb4i4Clj2dl/8yeFwiLj6ro7p\n6L8vLO3xCqpkD+zT5hPgw2QdikdGsGwDOQ515OpGRkleN4jCnNECASiT4Xis\nUcKxIo1tcsi3QYamacj7fvaQPZTlTlV1yCc2qTRawUj4SzCUn2YvePQUDnru\nueMfqDRyq8btr6eHKiswsXem1i3Wa9awjB8idTf57mqwlr4Q7s1ZjG4NY+l6\nn5GwMt7UAlFY10XEysBUoCiFEWqyKe+xQuy1zZmbaBpEJwAbXo7+u1xxouZA\nhLOjGBPdXpyooNiLuZH1Gi3VzhM7TYGFMfOEIqXw33ZXJnpjFqier3dq5AZb\n/btxkENqdoTLQhMNo7l/c7GbgNCRk+hCX8H9xA5R50IHfAzKNvzNVGl6tctF\nqAe0qAQPeZwhFLihK9PzdjCH5/abAcvhLxYLs3fW+mi5lLKGqIVnq9GPOb3m\nQwvo1csrfqoBYoPbGpMGIwT6nBZusETnivQTJHPWFpeQgE3HekMUFKgsAgPO\nReQQ\r\n=LWeb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"63841f5dad1c35863ea25a50cd3829782e7b5298","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.32","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.12","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.10","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.26","@truffle/interface-adapter":"^0.4.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.8_1613773606878_0.7008679078690496","host":"s3://npm-registry-packages"}},"4.3.9":{"name":"@truffle/contract","version":"4.3.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.9","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"caf515df359e72f207edc6f1d4e7b8bca88566a7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.9.tgz","fileCount":22,"integrity":"sha512-yd6nejsKEReJrPjOdRHkypfsMr337yc43qxu5b4TF2JAf2Kz7ZAWasHhY3j3xRwra3AqNOm4p3njkq8T+mKytg==","signatures":[{"sig":"MEYCIQCjRygRCbsBUyVz/i2sH1Te1aNczhaA81KzIOZgPzKvWwIhAMz80dMwvgbmg7RW+JMyfAoFutN+3bC9dUgeEbNOXbk+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20369584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOySGCRA9TVsSAnZWagAAWjkQAIje4xZjHQGhtdojpjE4\n0jMqWGB+VFjqb346wgkUgx+a8IHVgTWjKSocTZv60P4hmPDnvAMEK+Gco9Fk\nrs7E0n+NJDVOVjREH3Gp+9aoLb9SiU5H+QpmgKkKM0gEE5vokihUdD/DvC9o\n2HvHRl+b4KbfKrzEdsr8JoAG0ImlEwT+ke1YJmxRW+2XWVDf05kURlZoSoyN\nsu6VJfLnMqJ8xc4MvrUpooMrZpwivJgMStmshO8TYXCEK4+O0sTxu6IbYmdm\naVsLMLOlzPt3YGrrTcn327rYANC7NcVYAqSUKV5cSpbxxAiElKvMmX7NTq+H\nBeVVz5oQJncoyb2fLkGNGaTzPPJnc9tsqTmEkjPNvZfv7wSxDYdFzVb/X2ui\n+GYX3ThfY+1KTSeB+z/8QwOph2k3idJNtvDUiKyVyPLJqbugsRhGdZMmTlTa\n8o65yP2Fd4Q4PpcMGENwCHJGSq6Eb7C8Pf2IifW9He2w7XyE4xzMxGrBSkkl\nk1yEDSDi3kMDFuPr06UhmQBTD3LW4I2gZWhtGIqk4HqMQ7cRg4dNjL4Y6OHQ\n9soR39BKiUKrvOGBWgao+xSdK3Ic74O+aOWIjOCmR4BhNEXFgkspb7g50EMn\nO5WYZEqQ92NLK1u8KjUmb7I4aEO+sZULdBJfzzcoP+lnm6puIToejOllr2F3\n+KVz\r\n=ag+v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5bb77e271a6d4a6982026d5d5dda1054fa21af09","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.0","dependencies":{"web3":"1.2.9","ethers":"^4.0.32","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.12","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.11","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.26","@truffle/interface-adapter":"^0.4.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.9_1614488709961_0.9035799158717266","host":"s3://npm-registry-packages"}},"4.3.10":{"name":"@truffle/contract","version":"4.3.10","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.10","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7853c80fb2f374b00c06b32e919905a92b36c00a","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.10.tgz","fileCount":22,"integrity":"sha512-un3pbyXKY78REdbFjFeF2tzrGoUSEkmN2dsSwddJjz+cXlmeesjXbeE6hAJCRfCp/V3e/WANx8lGP6lV2I7FPw==","signatures":[{"sig":"MEUCIAeP013U2fCVlwZlU2jLET9kDokuTyMmeZVc7kuvwF+9AiEAk6RWDfoGpsBIaqXSuh3M8qMGL3I0vgHyi9ZLMsBAiyU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20369532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS+6eCRA9TVsSAnZWagAAQXgQAJgVlvmvPPYiXaoObX24\nbvO+225+63dtm1fF0c/fgD9zrhhN77aaJ0PmXRn7FKPrJMejGI2Yp9rxVTSC\nqEX0Br9A9ooaDSt6K+sGZ2opheliGQYX/e/4ch9X63X4SmirrraSmCNOtgts\nrRFxTF/wpDUAscIuv24/Vvi+u/PzpEalEWkAOVytidC6zG9EM/RcVCrnewbt\nV4XDeLgQty9aCYRv61wCBIqom0qDougTBA+N+WznvmnsN60ts5rzo/RHwRNz\nipZQfi9/Aqli2QxpdpPx54UP9/9TkG0FO+Fwk6ByeDzjZeLf3n7Dro/UK8Io\ndwulRhD3iULZTYi37K5GG4rZnin0xzOcyWus3GmWfTb4UmgKl5xjtjKXyWCX\nIxCmnuP8M5OsLpwWKgrduY23XyS0/J/zCofJVNC5SVfaUkRglsKwoW8QfWGj\nGop8J9QnzYm1j2qAGde9tvCKAl7bkaCtq25hynw70T3vrYfFYvEqnQOoBqIo\nTK9tdbc/PK0AI3gv4Uz3x9K6C265hgoX0K8pH7kTctBXTPQBwGlN775XdfqF\n1Hgua+fp6jatK5ucbykzeGl/o4EwY01HHOXZcakyJIUHGwKSp3jWtQpexmKk\n/HcMNVaJO/E+H+GkTl7gDvxfpRAe03vxLlKj0hLmgpJX1zPTQYrPN30Pk1t0\nLjBz\r\n=sYQN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2079746a5e3773e0023f80d8f95a5651d8be2b93","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.23.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.23.3","dependencies":{"web3":"1.2.9","ethers":"^4.0.32","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.12","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.11","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.27","@truffle/interface-adapter":"^0.4.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.10_1615589022081_0.8059577465055188","host":"s3://npm-registry-packages"}},"4.3.11":{"name":"@truffle/contract","version":"4.3.11","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.11","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b098df9719ea7134320a3608b86efc278a31ca79","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.11.tgz","fileCount":22,"integrity":"sha512-SrE0HnfwjF+a/gJXdOzcfma5c5jPE1ONPfsEO+f3MERRZj7lRSoJDrOXTRgASOzhnk9BGzJQa6oMBI/k+rwIuw==","signatures":[{"sig":"MEUCIQDxqsqN1WpKNOdYpyOQc8IZJGp4TOyZ8iDkSrVGkz5U1wIgVFUPb2viZFf93RiqhL6TW6qMXZkhE6tC1XZIhj0RryQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20371169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVRkNCRA9TVsSAnZWagAArXIP/2vU7M0d6vSEF27Y7FBm\n/zuotclPtiZGqa7USkwWcIYmXK4yP1lbCtYQnfOwVuvIk5XQVqQjwdCT/LJQ\nkqs1oIlQGgiaS7J/Qsx1jlPc3dmQecsawcD3nS136+v3I8ExeC9ieTCX/DpA\nVfwRcrs+Wz9RyQduXplPmxBQLA8D+o5ms8XDBg3BUQO54kaXiVDO0HwjQwfy\nVqDQtdrZvde2aGXiZEpuE6yfp3k+p0cIxAXNEEquJAX8YgU6CsAqF8xQTXHS\nt37gpTr3CREB3IhKfd+PT9sekndW2LxKQLFxFcJ+/16X3Pv/rAPj549nglUh\n6YXqxveUBZ6st+tilNaAt6cBlv8/2aOY/dlhjySW/UAayadTATJ919oqAu80\n/S/byLDpCfx3UeN5c0HOKsjWtNKpAhbJ5uy04J3kdTFAPCQqNLrWL9b3pamt\nZPzxq1aCsR9ng2RkdkocVgWWOKIHHHnrZlPuJPrtOflp1gbhGRbD3Kh3wKcw\n+Cou3f3uzakKDH9qHsWIt/+kuzI7b+H8NifUeqQ+/y0acyL1oC6cIS6sBqUN\n5NKh62r7RGnBPb9YArEp1LFMtFeDzjpdATZmniuYc8VCBf3yNEE1Ybh7E0Ck\nHod8WY9pRW59pj7Sv/+hHrAM8jDfoqmxdiHFChHQQm7gAoitlzMk227XvqNv\np/cI\r\n=TRkS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a15a68477cfcc5e975237fe253d4458569a9a3b6","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.22.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.22.1","dependencies":{"web3":"1.2.9","ethers":"^4.0.32","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.12","web3-core-helpers":"1.2.9","source-map-support":"^0.5.19","@truffle/debug-utils":"^5.0.11","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.27","@truffle/interface-adapter":"^0.4.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.11_1616189708879_0.8474954880842749","host":"s3://npm-registry-packages"}},"4.3.12":{"name":"@truffle/contract","version":"4.3.12","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.12","maintainers":[{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9c1fed962fae17a8fe1895c6e80314a00dc62cce","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.12.tgz","fileCount":22,"integrity":"sha512-gnOkZe28k/pwPkl4Ke9mj7UwLHDr6nq1ZitZOhukXvq5mf6Ll9hsHhGCwlzKnxdwKHHUpJ/1saqp6OjXOiJYEw==","signatures":[{"sig":"MEQCIGTF9N+qge0C9fXhzlIObGTn936dxVrxb7m60jFi9l54AiBkffo2bkJhAAgDkKEAXxpEUyFJaco3F4NuCzsZACI/LA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20047500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXOhiCRA9TVsSAnZWagAAbyUQAIBlmXfczA26dBHpcSg5\nAoLRrwsFMzaVvb4utdJcbHc2e7ifpLKwCFSZYk79Jp33Fzgf0Kivue2oUV2M\nxzfkFQSosRTXwN/rDB2/oj9gDMtFM22aKcc4w/KoiO6fsWyGo+a5WadjAt2C\nyX5f0lne1DWBhHTw+AnprHdcdWezUQqGrg+l6ID4RcDxEZiYy8KsrGDbxRAC\nSlpNrE5mXvThWoSEUysEMMddBKwUTqAN+FRJBYmpz7E4XMwo9tN4Z13Fr6XA\nZKE5vTxwX6vtG2jU0y7MjOtQbYDlfq4bfjcHAtS/c0VlF/1fMJqXBsfOaQYE\nFi491ZSFwB84xYoFXC4Vv/lzIHqpa/Z0IpolbDWtm85r9+CQ/CoymRXqqVKs\nhLeaQyC+312XgqnBwfJMR8LAvXw2NbOFxOjQ0OmSWnQausaCgjsEUvRBeotN\n7AaUroA5/HHYu8feDANqg5DdFauXf4icDXU4OtZbpPx2NT0U3YgXTmizlxmh\noewQNkyRVqf17DRBm3d9qPhpmr7dkxWEMSjrhYq9XStIZ6I5xAz9OmHD28Em\nLotulxsffgaTTMZDZn/kUiuSwebEYkQG3TDCYgqEBn9jJ8uDMUGDTqnON7WE\nTEmM5A4vUH4jLfeLezxNO4w4TfEf/bxd4ZUKkK11J3NtlXd95oLl3IbBCV2v\n3TFd\r\n=Wxcu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"677ca3977e5cec36357d5c5175135de01e23c2e8","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.23.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"10.23.3","dependencies":{"web3":"1.2.9","ethers":"^4.0.32","web3-utils":"1.2.9","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.2.9","@truffle/error":"^0.0.12","web3-core-helpers":"1.2.9","@truffle/debug-utils":"^5.0.12","web3-core-promievent":"1.2.9","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.28","@truffle/interface-adapter":"^0.4.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.12_1616701537804_0.6377463699622983","host":"s3://npm-registry-packages"}},"4.3.13":{"name":"@truffle/contract","version":"4.3.13","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.13","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"72e84bb5398a2bec0f28f9bc1cba7a8c8bff461a","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.13.tgz","fileCount":22,"integrity":"sha512-fj9XQUveNIDCQWwAoLwGLa0owfWlm5Sk8nF/PLXTG0Z6TwWa3D4itBiec8zEnZZIxS6yjDVBUpzBSMCvH7wh2A==","signatures":[{"sig":"MEUCIQDhXUvVyPe/VS8wIbiuGTWp2ciwBnb14FvohE41dCiF0QIgYZ1AitHeK9CY1RYVN9OOC8FDbrJ4FZAjSxv8Db+wx/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21001350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb2D6CRA9TVsSAnZWagAA8jsQAKHFNYd81fYRQm3VK/Ol\nFwPpvQi0cCWGGGxFVBduutzIzV8OErphYExpCjkti1EqmYlGyobggMPyr1ml\nzsCplSsbdac7Z5Qma4XCDrgxLKt2lA7WL6ia/hQKV8XSWK6ET2fOrI/jKuF8\nA6O47d9ENAp6VyAOHPurvxYF4bd2VEXd7EI+2gAeCZyYEmyY+K7Qrqo62jos\nH3Jp5pKSVfAreNJYKGWfQu3OOQZ81KKhNeh2tdNh3XDGB1IMuIUFfcBYfBpY\nRH8IgiUWRe5OHhT0kPqWjmM5X4K0miNaDvz+0qDGuOszNc4TDoznJ68G+EKc\nR+TWFcFylSpKqrt606wwPZd8IprHWJWGUWnzAqhgXfPlQjcyrvorDGKCpDy0\n4fQNbUgIbFSnPzOmkENCB3JRhXgg882Apd74h5pW2Vi+2mOyyS5Rjn4uioZt\npLK3n7Gyf0wX41dvbsByxxeV960H7i7bgcWQzWdcoJFahBi32vMouz5y0F7b\ntoFSrXvwogTs+0NJ+APEo0mNNqkc0R+BRhThk1kM4f45IfTJg3nlBy8D1kC+\n96BuOeg52PpN3KH6FHbj3yGtftXf3o7wR5ZZuRLB8Lhx2SEesbGjPMVeNErE\nkm1NUcmDdIQ8SFl6Lzs1DbA4xDgnKWpB7ksqOMdR8oMPkf7BDBtQRrfDHSjC\nrFTR\r\n=2eU7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c67bc3c7d39754bfffe01c633e2e8b4281fd69bf","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v12.21.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.21.0","dependencies":{"web3":"1.3.5","ethers":"^4.0.32","web3-utils":"1.3.5","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.5","@truffle/error":"^0.0.12","web3-core-helpers":"1.3.5","@truffle/debug-utils":"^5.0.13","web3-core-promievent":"1.3.5","@truffle/contract-schema":"^3.3.4","@truffle/blockchain-utils":"^0.0.28","@truffle/interface-adapter":"^0.4.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.13_1617912058105_0.5412147600606831","host":"s3://npm-registry-packages"}},"4.3.14":{"name":"@truffle/contract","version":"4.3.14","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.14","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ca47dbf4192ec7037807fe18c1deee64f79cd13d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.14.tgz","fileCount":22,"integrity":"sha512-F/IogCpQetrx8BBtKhfA4zo5pBpnMEscmiDGw4qQ+tUPZxam1KAOiTZ3srYoyxK8wHw/136Wn4CzzX2StgFaKQ==","signatures":[{"sig":"MEUCIEYReRlQ0zJEjoT++Yuj/Vs4Nai8vmlIGOpNkKbftyA+AiEAvk4UNcNM51h0B6G/MEhACBppEgweRjqNgD3/S6k1yhE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21004107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg1G+CRA9TVsSAnZWagAAsw0QAIFECo/ZiazuYCC2gGOa\ndIPl6fzjSZLr+/HYUk3KONAIm2gJ8AQOnTFmXInvwjza6wfLwVG0RhZk0hLj\n+3ogRQZZoBcjI/PLQl+VCoZJjVoRnusTHmoSNTaUpZowW0Xn9rDXOiT4mgy6\nvAL56xM8w+sRXpZNaAce3nK/J2rF/fYgtC+Jg1O6hc8UEvivJX3sk5KRtPxK\ngF9nLMkXkR3DF/JqGxzYOTZLbmNpc/4WQfX4HmY62ym/ZRH0Xm/jWP+b6GMN\nmiBNGH5pI2zz+wUpqhbvh967OwCHG3KZu5ZQHmwtjY//XP1/V/FyuG0hCXV6\n2XKc/XtyKCYaktvtRwnsg1Zkg3iEFOj6j6JhI91nsj8htHM1juhi2hEPNMd2\n/qR8a3AJnBwguTaQJJ+zLTtppIh3tOW2OUlfNRxwjc9/thkKSJ0rPctmLMQR\nbpwgkLJhrpeH3rpjpSRFpmq0OAJXCdVXahvroCGAFpVzpuHn8bVZHgrKPtxK\nLIavOBiT3T9rm00Aj6//itHtBQhzP112DhOFjisc4KMGWvQnmsIW0GD0ixmd\nEUx+lm/bFT44Y5gf+eA4j/T1C/LYT5DIf+34Je1QbFloRBpMni5b//82s4cZ\nOZLFPuyzSO7J1Tk9sNLaAMybnfMVAbHxpBmBvMCw2p3DzF+cDW6tL4t8IFu5\nvkV/\r\n=kfMz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4fc9f371eccf3f8518ea9437d9eb479a760eebdf","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.3.5","ethers":"^4.0.32","web3-utils":"1.3.5","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.5","@truffle/error":"^0.0.13","web3-core-helpers":"1.3.5","@truffle/debug-utils":"^5.0.14","web3-core-promievent":"1.3.5","@truffle/contract-schema":"^3.4.0","@truffle/blockchain-utils":"^0.0.29","@truffle/interface-adapter":"^0.4.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^1.0.1","uglify-es":"^3.3.9","browserify":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.14_1619218877907_0.4262574589565282","host":"s3://npm-registry-packages"}},"4.3.15":{"name":"@truffle/contract","version":"4.3.15","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.15","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"bf3d48201446eae30a619f6f9b6e83f3c3832345","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.15.tgz","fileCount":22,"integrity":"sha512-PHM6tCF/GB3r/t5YbeXagtg9XPtjFgbc5YnRcXs8m2Cp2hXFeU91n1dxmIkBVJklia+tWGqLuVxvMqI88tcWbw==","signatures":[{"sig":"MEUCIQCN1LC2gARfN/lyNh93OaOe+A9JPE+aqE1gdGMOiJmFJgIgR4r8xioIcnUbnX+CgQJ1oAoxxsX5enltLonW+Tixl5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21379469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi0syCRA9TVsSAnZWagAA7uEP+QFAF9dgIv30dUmg/f7e\nXmplMYYTNxc8qv0aawtMssCQeYuZg2ZfvgjW3Ij9iTxloobgMI/egqdREiQl\nIHgA9UyoSYAATuQu5Pvs7H4tHMKUyvsMSPrZegDbL2Hn2OkC6jYmBNHjU89b\npAF/JiE/PB55OM/mA8ycrmpKE5SiDtgeeY6Md9zk6aWbTPKObY+lhjRfji7K\nU8/xHDfsGexq5GE0LDv62xq518/86ThuevxHM5SQTU6euCGKhR7i475p1Qe7\nYwEPj6hO7KhMPLnbzU6e4SFgB9YiE8d6/6IoShJq8XNJBTvA8D+t/FUXvztz\nfyQPme/IezzyNYjrIQSnehaAE6SwT+KM3ZVgx/thkU6aSpPfAxhZZbpawotw\nNuhhqtC0kLW7M9tDKoHMJ3Lad9GComX5VuwWYi5mJPniIY5H19iKe9Y7JcF3\nB2QexEzSbRamp0qizW8v7p0G6e3Qb+e22k3WoNpHHIReeDpohSqpnZXvkLgq\nmItdibL2xZcgJjjDUEMFq+v9ft9+KhPA3KqZDIGr/QgbeVJbl8zD8pNE9luJ\nsw1txMNHM4GYjg9GQEkU0XkxksNpC70AvXV9CxrI08N4zpIGa/XOJwpKkHmk\nImnk7Qpa4XZLyFeVVF43fX/3VBdDr+XteriWBD8XkjlsF66x8s+IauqifXfX\ngmGj\r\n=ebch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"0ccf74f964a7f528405a6d8e5ce3942238190614","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/contract","type":"git"},"_npmVersion":"lerna/3.19.0/node@v12.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.1","dependencies":{"web3":"1.3.5","ethers":"^4.0.32","web3-utils":"1.3.5","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.5","@truffle/error":"^0.0.13","web3-core-helpers":"1.3.5","@truffle/debug-utils":"^5.0.15","web3-core-promievent":"1.3.5","@truffle/contract-schema":"^3.4.0","@truffle/blockchain-utils":"^0.0.29","@truffle/interface-adapter":"^0.4.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.15_1619741489778_0.921001015083732","host":"s3://npm-registry-packages"}},"4.3.16":{"name":"@truffle/contract","version":"4.3.16","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.16","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c28b14a0c258f0bd6e0f739f7cd081a75270bbd5","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.16.tgz","fileCount":22,"integrity":"sha512-/GhDFu8pu1TMVev5WTxQj87Vo8Di5Uo0LXvdV7ESdUbEIzMlm9pjfkf2uWg8Jx2aSBGgfCeLXw8GVScBk9OjlA==","signatures":[{"sig":"MEYCIQCctplDehdK4Hqjvh3Nl+yMYM/pYWGeWzutZYWcmJ5b4AIhALSUwk4v8ZAyo2qv1VzcBes5DpzZr4lJovki5FArESfI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21380002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgldQUCRA9TVsSAnZWagAAI2kQAIyqH5pezDWkdVXMpUDP\nSmz86KCoEtNcSr/IYHUuSapiP5qw5FGvKxY4lhkMv6LMGj2CFcZk23CNBgol\nvGMT1EDQFWYw4waaVVOQWshJvj/AwCvITBBTb/1nPgxsqdWUmnCYUsOG7mDc\nYUu+tIKLMjYOlqvNcYu0noWrKPznCANZIdZUZ+x6dYPU3+9nqb+Fm7tx6JyQ\nFaTX6Tx8n0rCS6bdNKMOzl9vccY37bv9Y7C3+qsPL/tiyZwok1810zYNaxGK\nXC8veBpMdsnAFFEKtcmrcBnt/+38EPEfw/NjY7+tLuFVXS0W9TRQvMtal19K\nmnepxVCbQGoIVriWDNKHpq0R35AwBFTngAvctWpKssOVYjrPJL752sv47nuR\nXHYHBXJRm1F3+YgxHvFiatbdFEXJgxdndlBC0TnyVi6QWyUrFlKFDvw9hezz\nLtQD4vDmNE2G5DvD8l0dv3w6e1P1on5tWHZ3BOxEt79H4rnXTLSeVtYdzQUT\nrpcuZOtHz6vLnazQFaoZycNDNfMXgeecjbnnivmh7NPqf5IkAZ5CWgduv1lK\nB+s2H/Lc5v5jqKn0iQZatP5Y16F4g/4MU3nIbOT/ccIRnJv0Dly2i1XZXs54\ngf5W7RDnvz0xHX4w3gBdvIhAz48yvV2AAKrXr+5lNoTZrODchlLvzuqtOTIU\nqWny\r\n=Ds32\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d7dc01aed1995edf19db2c621df7ed03bf05521f","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.14.0","dependencies":{"web3":"1.3.5","ethers":"^4.0.32","web3-utils":"1.3.5","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.5","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.5","@truffle/debug-utils":"^5.0.16","web3-core-promievent":"1.3.5","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.4.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.16_1620431891770_0.39521916772593846","host":"s3://npm-registry-packages"}},"4.3.17":{"name":"@truffle/contract","version":"4.3.17","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.17","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"bacdc19daad439a5351fc76747bae260f6821ba3","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.17.tgz","fileCount":22,"integrity":"sha512-O/an0UdKgHfsPK9sdCEsbOAPE7Wke9s4pjh9ceXKaqMFyTYIhpnb41dXduyCgepfabZfUEZiwsOa18xy/YCdTg==","signatures":[{"sig":"MEUCIC9BhXF3rsxZnM3taSVoGGBoPi5uOVAoMSc5NzvS+OJuAiEAn3yUFqfoh1owZShkm1wA6p8pom/pLwqXvdO5CGbEYWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23020662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgptgVCRA9TVsSAnZWagAArzwQAJrjCjRxOsgWpE9njq+S\nl7Tvi23f8APNKWDNg2PMflgxHqpyGlNAqt929fcHqhi0PvdQ+OXh3VgkOzwR\n1LWAIs375H+Bck2BftG7c3nGa9fS4YM9a+jsOjIt8uQz5mFKvAb9sEs22HY1\nBoy8WxyZ2P6MpRNt3MRJyDpdUsVTFSaeHF/aU2I6M/nteZtKQhsOl1J0I9MU\nm8tr/wlHU5hmg8eSgDSKXIa2otY/fY37WEgEpW+0u9MVfVut60bAnv94pK1m\ntfrbg7YlHgIy6Y7jip+evVj7jxGeRy/bwdFYb91vrl/HWFwBS+2b6c4zRzec\nntqn3PR8ANEWcNupYEQ+g+g0lnMgi8O+4gnSj6AyJOfJ/MksO478KHEiCacI\n19CARewdhMVGxbrR64P1p+eh/N8H+Cw+v3EW4FsbaL8OQWngM+0/hqPuGYPj\nbQi/xHjJI7VGLODdud7Kx97gQXWUmtXWAyLpp5cIBAXPh7mpZcG5FQby5Gc4\nxM7G95R7askkwaUeptHX71t7yBwywTvaCemTKoRaOGR8wfC9/Mu6WEtyzi+o\nhU0E0tX7Os4rl8RW+HhQTKncWAAjzspsKjFSiJYkLzU/Asr+PLSA2Re51MRT\nVkPUGoJ/+r1F9ZeECnxRaCK3sPBCX3eWrzfOaJfkJwhMk76xvp8I0v5DpPc0\nb5DP\r\n=MgQz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"39e0c4eb14fdf0a617687581d49b8f969ba3103a","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.0.17","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.4.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.17_1621547029019_0.5930339917988534","host":"s3://npm-registry-packages"}},"4.3.18":{"name":"@truffle/contract","version":"4.3.18","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.18","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"15c60ff97480ca4bc4831e4b9c659305acc358ac","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.18.tgz","fileCount":22,"integrity":"sha512-CvP6iTC/sz3rAfy3awFdDsvE6Q8xfjfW/7oM3OMD49nZnBNHKGQUG5CVKeAa180IVxbA8MGFr3KDCPtN2p0zMw==","signatures":[{"sig":"MEQCIFhjc3eilyXnkh0kTQNPL+IPZelEyegUVhQ7I/cvJaDvAiAPDfgztUdSLK8v37qFvDVhKvY/NxzfNnQDGUyVrYLArg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23027090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsV5nCRA9TVsSAnZWagAAbYIP/icmQ0htXFWzq7ctsKtz\nfDQ7rly6UVRY2bF2yAxk1kMyj+Sq2zIkAj79mz2nAwkACFQe5YMWqJ4mjegQ\nDYi/AYkWc554ni+txAmFXkTbZ/Ojx7xbctTY9IYlhod2hxKlEZsgLGMFU6MA\nJrlX2p/YsJtGcXwVgoRmrrsEBCyf+GpQ+/+rU3Y2SSql0vchQGDVC+TnPUNq\nPCl5jvd10yuJte8fmlszBpGhRgR6PrA+t7d3CSAyXXjys4O7TfPWnRA3/y2K\nRKMcJU5B37kYLMNpiTZqOtdHzxSVsWsNCibJmZHlD1SRsrTVGNL35z6k0Wg1\ncxWT5wT3dXdqYTwvtOoCMTPdJ+tt2UbpJ9HdmrZ6lpAzgyhQBQjEuJR+HnFF\n7qZ1Pc3/NVE/sFb3/NdDFkxk5p0VVnjGsOCnNsdY6XtxOcWmQfYE2MOjSU45\nvXaTuoJWj+mJDXSqrojh5Llj8HZyvlEStKoVe3NUzW99RvBAyTYOym0rY3Za\nB6+q6aNH6UZl2Fnj4ixoqqb/ZZsSV4fRcYTX6qLauHV7uiksGXoyOskIuyZT\nzuwDn0poLMSrdX4RvRJxQEYE6/7QiNFU7Vqz3osoq+VTQFrO2FQ05Yl+FtTb\n4fM0px0P1g8mPNQ2Lbrt0ux+rsW1tj2yj+40G89t5PJhPC6wP9KpX/eX/jKl\nF3ir\r\n=8hsY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a525ea96ca15ad7b8a3eaebae23e6a3da071cce5","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.0.18","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.18_1622236774366_0.35041260477325853","host":"s3://npm-registry-packages"}},"4.3.19":{"name":"@truffle/contract","version":"4.3.19","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.19","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"cbd6b4f08b7d3bb5e7cdaba205f17c80cc3f7b60","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.19.tgz","fileCount":22,"integrity":"sha512-asBwoxUePLwNAuYfHO/SvyZyqFQ9QMeUieJ6PXD9DBrUdNpjgJvk+WHYnXH4bWHgHakbTpL1MEBa1qmcAL+LMw==","signatures":[{"sig":"MEQCIFACrYTP06o75wW/ai2q9H4des66lAZkyNcqifGWkLoUAiAvFHTB9yvE+57IZrLYmk9WazqdlWLpsz85LCitJDUiTQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23026556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgumddCRA9TVsSAnZWagAAr1UP/RTSHsVJMlkgN48Vr5VC\nkQRm7SKHDLcBAzSgsBFx+DqaI3sA4sPEvmWuz+gy3gMnl6Tvxye0ZH5pPaag\nJxEdNLMoV42PVPv7c2WLCmffeWh5Aez/5uoMezg7+3EMCOAHJsLFkwZodt29\nQM6as7z7qFMYWVvST9YFAZdLsgaHc8YrPoM1WUuXBzjed8dy7+z38tx0q09g\n90SfEI6x3ZV2gsxcMMAD6WRkdWwnuT5to+BQVXglU1R4H+0O97xzcSCPc94C\ncmRTOM48+IDKUQJfq4EeeMdZT9YvwE5SHqeRmQHNlMtcqZOcEyHnut+rC2Ua\nb3og5AwGnvumxsiarzO7DKtRGashtojfU3E0IoqYR5/5W38e9Wqbevyih4zd\nrmlSQiwcsmkxFOntDRwA8/JDDmbnQeQl4mI7cLQPKmsuunKrgh8bPlifAhHo\nbw2PQel/3j5TcQWjp4KWzOMIFJXwnQmgdhYrAWIHa9JZIUZDEbQ7IE9uWY3f\nK+sNq162mLG8lc03AEGHFLZwn3991ZAvw9DufqM/wJL8yG3KcvNN52U3leay\nKuS0H/3V5WrqymB0APJhq+jvRObYBtcoAgTjlrSB0U5AEtqySYr04PdfQDJc\ns1pPOwC+CcS9rhKLXXq9bVTPnoYveVnr8hvaN/rSjCB4G4lIV6ti96Lr2sA4\nELT4\r\n=dNSo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"9b5f5475aef95d93580dac07e95f945021386894","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.14.0","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.0.19","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.19_1622828893318_0.8585828423594377","host":"s3://npm-registry-packages"}},"4.3.20-decoder-no-web3.0":{"name":"@truffle/contract","version":"4.3.20-decoder-no-web3.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.20-decoder-no-web3.0","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7618c367883dd5429a6d4d79081697fe5964f79c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.20-decoder-no-web3.0.tgz","fileCount":22,"integrity":"sha512-wdIArAm3Og7MFhMOZaNTzYTPY55Yp7qBFclrl615eADTEAWhWoRkdr06iEWk8zf/n9hww3rlIhJl4T8i2ZtoXg==","signatures":[{"sig":"MEUCIBDlDvRg6rrO4kabcEdJKVNRZPrGyMvHR538XCO9LO2cAiEAqzHJGWy1lqYK7B02nggPa06MURuhi6zUJFbDeGEYPO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23063304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwDXzCRA9TVsSAnZWagAAIyYP/Rpu7yQ/hQNXeATB8Fix\nBedBw9ELBhFGyknMHNNAVj1yG0suyGT6MxYDDNT5sYXW+0ygRRS+6iBVcWWI\n9b1AoGmA4strkZdBl6HAHDSaET7vz7Wu93pGplgq8lWjJqWyrZHwklCXeZ/J\nkxGaMCdx7rT5Ev5Wy6lv7cmhWHeYFAbJt6PJaf+xHVxXrdFxw5scMcFjOln6\nxA+dfNSJwLLFkJ/KKHmIYt7jm3f0EmULSj9puQysxfoP1MmqD8ImIOibNfm5\nzMQ1C6PyMJYcnS02cxMObMuRufzfrOnjz7t9hRZWlcMhaTxLto3DcLCcXEBj\nquLKIiSbUFJV6FSob47lDHzEOAIcdlemRwCwmJIGXXOy0hdB6LAl+BZ+GfsG\nURG4jdaX2/AU62R2W8yGgKQ3z6HiwyuqxLXQ9Z0gjoshXqnB4C5AqOoNsCeh\nbUzs4UkVmDpwysnstItsVlxtL3AdD2DzJnM6GVSI4SOykGqzIm19hCRH2pFE\nDO4v+j+fWv7QhNFpOJnpd/ILGBV+XhlBkvGKUfo6BW0sDzQADsVh9aXa2C1d\nWcga9GPXvYiY9rU6+Pdc8Kx4uOgZ1mYUYQ0yt9k7JcL+chB3iIfY6+RxS6Ry\nsJ6SaTuyOm7OK+Ys1bexh7qGHKKQMHi6RmQWH5iZzUfavZsM2kFHwycwhgWY\n3iI8\r\n=JTwm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"05255c0e3499d5ee81727740b54a84c60f60968d","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.0.20-decoder-no-web3.0","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.20-decoder-no-web3.0_1623209459048_0.6003229497666107","host":"s3://npm-registry-packages"}},"4.3.20-cheerios.0":{"name":"@truffle/contract","version":"4.3.20-cheerios.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.20-cheerios.0","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"746d8da0421125329c71705f083cc7406c523600","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.20-cheerios.0.tgz","fileCount":22,"integrity":"sha512-PUnGFGRGlyOHqD9I77VpXrfRkfOY9u9FZRIZf3zMKGNtxq/Berr9tijhfI0U0MVK5tsO/+A1py+EEpg6keJ4SQ==","signatures":[{"sig":"MEYCIQCHMjuWVQZdXY+tyakoB8c+UwgPKhQU8v/B5FSx94zIxQIhAKsuQ0sz6h8fpMAfNYaOuZcHLTi0DSxE23CqCMZbkfET","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23152803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwUCtCRA9TVsSAnZWagAA4pcP/jjAM1ODgJJIL+QPsGkE\nNyhUQXjOPHyi/Mmlwkwv1ArzC4IxV0tDxgCWqcropxTjg6jM3BCZQ6O3q8yu\nrkDDv/ZDzV1+U0Ur2A6IzZA+NtaIr161zlMHbYSg9mhJ50q9X+wQShDQGkgn\nb81/xpUoR/6esuU3cRwNjmH5HRcKuHne6zZ3ng4p4LG2xFLmBP/UvTa8q2GE\nXVkFltf78Ts/Yqm90ZCcbj3foWuAw6SJs0seIfC1I4X+PQukKscfyMmCO9HM\nn2szK9je1SmsPJQZCNfv+9q5Au292ZtQY9Q5W6kezhVvYZ7TVnmAIK5POwXr\nURD7+eZr7/pH60XNSms0juc4w7j7hV3DOIaWw1YCv+YacZpOoLFWqdN2ANIs\n98rqQR7QMM5m/Id1D7fxxmaohKCEtksGvUEEbuQ42I96cbfHG6jXsDZeR3UA\n/I6HnfsdR/vsInUJtUHy3KOYXs0Dzecq/er12Q/RRzqdbNilf1VrJEtKtgWT\nOsqsojrUJLccAmXNL65q6IGdh0D+NGsqboAyPXnCfG5dVQN3NVr/t97EYUzC\ngewEzfq/WtSHk7UxsdOH/p+vqjJBQneEh0bjmtENhtenK6Qm4+EGFKWx/pD9\neLAF5kaEx/MLrgOCL5fUpFTblsWdm+gAtSdl5qVjprq13nMm+0RgtFgE2Fyt\nR6yZ\r\n=UsZ9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"214075ed891cb61b300d997ed4424ff6675a1c1c","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.0.20-cheerios.0","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.20-cheerios.0_1623277740793_0.30583268090426596","host":"s3://npm-registry-packages"}},"4.3.20-cheerios.1":{"name":"@truffle/contract","version":"4.3.20-cheerios.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.20-cheerios.1","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"fa7cd9006aab891aad728ef17647a80504a65b97","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.20-cheerios.1.tgz","fileCount":22,"integrity":"sha512-TpSWubVFVTzGL4NBsoUdHBhnuwjJ2WTUoMwsHcuQxjL4lyjFFrmGNXVD2bG1e6w8KCFXu4K4AevGSOiLbrLiAQ==","signatures":[{"sig":"MEYCIQCYKXotNRv+jSyC5Lf3bYlrpaHqF3agqexTCQvBLzCsewIhAJF0Znax9lc4SVFisQeVeWhW8RFoY9dJIdpZcf2V2BxD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23152955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwXjqCRA9TVsSAnZWagAAn/cQAKH39JRmlPl3EaUpxo7e\nVMaw+yofDyT6NjCtbKYEhQwdXONEG7rBOmBYJpOAqHOdX5lWqYRyCYImVJAf\nd9ehZ6elCdilXvkjRzfbpOn4DfOzkFeyrpZao5DE902+dWURiQEAVR0e9CDo\n6lcI+7yZj1feOoM+bSlhRtU2zaJet/BaeD4qG0yguzY/wH9Iq08boQUn3SZJ\nBNCRbnLHqFeRxzgEeyQKA8NuP/xkv66s8cN7e0UbjWgKoGpG4ku5Fo41miwj\nr9iQ1tyGycmxDYI4RJDPVt8BMLevmVi+HALiyHUnt/S12TvpH4E0Ud6W2pSu\nDI3yRPAW3AtiS+acSAs82cL8Ttbz2wIjmuWnOi/WVwuo2R60Ntcqm2nOkodw\nAuVEJENOoVljK+IrQkC5Hq1oWpaVrNhuq8aU9BuNFksLQuvYZy2l7GBkANz0\nBmwgUsPcMYBX7aeRn8KGmjf/IQvV4EaMofb/zSsc5mez+vrpttFujHPcjmVJ\nENSJqh0BZ/YyQyp7m05x6XqniWdMMQErYtKuhrc+egbeHgEZyQqnHr3GwYoh\nZQUtjrYa9cYMj3WLUm4OnVxKFi3rb2Mq2uuHZEbbQKaXWQZs4kgnDmxDVATy\nc6oLGnBsMWdH6aXFS1YYYnuYk65NpcJgx5FhHjN15PzwoqWZyndi/bpba1yI\nL5k+\r\n=n4NX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"cba7d6b7dfa874ffbd3cc7951d747438b958cdfc","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","ethereum-ens":"^0.8.0","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.0.20-cheerios.1","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.20-cheerios.1_1623292138433_0.4354295035010307","host":"s3://npm-registry-packages"}},"4.3.20":{"name":"@truffle/contract","version":"4.3.20","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.20","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"5f5fb8bbd3b224eeeb201e1544b75dba0573e237","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.20.tgz","fileCount":22,"integrity":"sha512-kX3l3nRBGqHPfIkcmdVQDis3T8sR2Rt5H/mFs4A6GRxRCw5oj92J7YFkM5J8BY698GsmD8qAGUKFdUwHLcOPGA==","signatures":[{"sig":"MEQCICvrfdE61hgOOD7IZXT/UgU5cRMpviJnBUeJw031foNaAiAB8ngPwg8lOBtlQVxRk2omUtim+JIeniFhY6Jp5h11xA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25369627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxRkhCRA9TVsSAnZWagAA9RoP/2pCozE2nwOlFPg4HjXa\nwjnSML04pwCzngnqDUjLAsPKvU4+iIyCej0PFkcuOnOuW/3yuUg3icQoAEw8\nYwwcNPySjACRrn367crIjiJblzkbUtzaZWU6o9+MbWcZedZncg8jV0wUcJhr\nuaYrZ0O95F0O9DeajaCZ0Cn4usrBirEZvq3Deh4Oxp+SV18eBU8MvRulD8NM\n67r2imtH64HiwxD7LdJSuoPoQiNqWFKjBZcipX5y2lM47x0HqcAG4+xQuJJo\ncXsMXNUr0/ZZ0hB+qFHoZhjRR593QPA/0jpXhN36j13hEdDukY62nc/mZOd0\n8I69+TLKB5Nx1DLI5gLNnvEuJqGCGqr24/QjnC4066r4rbUkNi5J9oM2M0nC\ngn6nQHPNXcg6rr++o3/hIQbY/Cv2Jw7GYLwCdWBFd7vqIXMqN9urkQfnmA6k\n900k25ue+YMwcTnWP1GMtwLRE8ROH2YQ7fOzrkMOWjqNgMFY5kLuY0Cym5Sf\ncXafWfWked5v6U09Dg/AKGECk+VxUZyyzKxSddnwa1r41r3loJXtS4LtdSWM\nWvNg9I15ZMaeVfXV9SkWKGGWGi6CqWpTKSWJcEa2QYrpXQWRldu0pvB0XE0n\nQ4F+nI6DR951r8zZqRDCU/8FfH13JpZ93HCiVX4h+MTIGu3tJJOSE6R4jLr0\n1wpt\r\n=ytXv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c7b6e027c0460a67ccbd7ca007919895411d8e88","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.1.0","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.30","@truffle/interface-adapter":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.20_1623529761663_0.9421428253982189","host":"s3://npm-registry-packages"}},"4.3.21":{"name":"@truffle/contract","version":"4.3.21","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.21","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"a90a363564ea63ff3a42550cb0b97ffdd4972880","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.21.tgz","fileCount":22,"integrity":"sha512-J4nYQVoOL29G7Rg2rmbHbsyQUx/Oj41HBHQOafjltnxppYuFk8OPW0EBm1o7gOAkfgFy4oJPhOVFucZ6JqY+GQ==","signatures":[{"sig":"MEYCIQCjTPOMHHMLSmoxe8JafXbN0Ag+UV3MRSjm6zDmf513sAIhAPoni0ElfsvEOaPzyKVcIKQRsRzzuzs4QpwVbOo67Nmo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25388867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzPUUCRA9TVsSAnZWagAAKgIP/R+FZqtRP2dL9N+Xu6p/\nwzAQsX6pMg1+FNtqhII9KdKfJJYCQPyQkjLKGLFkQr10RTMz06azp3dAlHN9\nBaoy58GgOHpO7gFteviCM+6wEFEdqhB+VTG5VN85ZL8ByY8CyEYL4D4sbFyU\nAbdA72wva6WfX5a7jLspN1prMwuxksB9unWfFnSIanYWJDtGvBllvEi3TyF6\nO2Xm9J//9xsCspyPlTYOprtCbk3ctIZiMIhnimcDjXiq+LWpFzhengSWWi0/\ni7SbiUndocdaGRyrcdJR7VdXVjxAhPfeEFZH+3nxdDCt0DGRu0RSBzwQ3Hjm\nYTL3zSjCf92lOtIyRuVMHzdtPhjCxbTPJWgV6Iy1uE65CrPuCct3ui479sCK\nt5VC1GqQQR3tq38A6CBDn21N2Xrhzmfn6Ji2jJ9Wy44kYRVTSHZfdU2jsUwj\n86AsjD2oeWvQVUPF8AwhWHfw07/Qxfhetc4tGBxmzBx6z/eNeU/ArSNGjVCA\nDE9ajOuqVYaHzDP6mmjukv6mMgVB5nMgXzm8HC65TrLgepYJnWsbcIm7B26X\n++SJf5ovOdQQmLLxWmuTteRbbGZbLptqGTLa6jJswcJJS6mKGYEXj7B4FBCT\nso/+ScLXkLVC4eqeks/1PO2VNazjyGLnT5jStoQtFWLkQKUifr2B6RKOzK4y\npiz4\r\n=KQOa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bd53ee4a4bdc107c12a2ddf50bab81036ccfccb7","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.1.1","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.21_1624044819419_0.39510179994763694","host":"s3://npm-registry-packages"}},"4.3.22":{"name":"@truffle/contract","version":"4.3.22","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.22","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c7fb0565895ffaa1b9d7c57c32e0f080cc1ce3f3","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.22.tgz","fileCount":22,"integrity":"sha512-Nn/OZWI8vAsnfxvumx5ez6wvBtuYtuS59icYTSG5V9qldgt462zwqIyf2Du2UM79x0FNkhCU9Ru4+3t5rzrUDw==","signatures":[{"sig":"MEUCIA5J1dM3XQPUip4N8hATGMbVspE64FAotcM1Ea9J+ZInAiEAxkgzzHLeQdS8vRN0TWeSOHDUAfOhtLe7LcyRYd+EB5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25397989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2lqWCRA9TVsSAnZWagAAp+YQAJ/CFnAvGkiMyPwWyLHW\nAcBqYmCgR3W/fDtXJNcfYhZ4VqnFaJMozjBy/ln1wRbpr9fnxQ3C5vJygRik\nbuyRwAvHHoakTzkYgVQ70q830w8Rov4ryCP1wEsZsGorHf4yFN9ZW1XmKPIk\nBnsutMzkGe2N/L4cBtKUr1PXQVI3HyfL3Oo6+mCImePWMnf821vrPVDvgyUI\nssugMQmEH2Jk+cwK5fAtJTakP3dAu+3vB5l5ATNKWpHlS8YYSsaFu6W40Xpj\ngjL7PdF0/HTGwc5lDvDrMF/a0HCeI8XAso+X6bNkGB0THHUSAx5UOjuyykAt\n39dZpYCXAj3+DGzwzg2b5CYQ0XF+ft9r0bjhUdXG6qr8LtWUZyQLhcqsE1UP\noQHAEKAFlzzP9mu0xF7HENan0Ox8J4Y3kCpPUEj/AgPYLhFmRI6DDajqp1K1\no3RQBdiTKYXL6A3lUX9mC1DvOQyWASUkCW9dQjrMG9SJewK+wijHI094GNZM\nOBlt1Z4/DUh8/O5GsjZ8p4Zcuq6lGFeDdKZ2RBWOwYdWrcCqtVTCB58oxIro\nyrKRAO86AXp57Zi7Uef/gDsRkirAd3x7kTnJgL5ltdSAoPp8fJOVFVH38iNg\nhipJLzq+8UFtKOeADcQ5PgT1jOtPelD1QORuswUqp9l8ES+ormTfwGdxDXt1\noZnK\r\n=nZKz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5694199775717d8404c02b208dfe70c12afd2103","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.3.6","ethers":"^4.0.32","web3-utils":"1.3.6","bignumber.js":"^7.2.1","web3-eth-abi":"1.3.6","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.3.6","@truffle/debug-utils":"^5.1.2","web3-core-promievent":"1.3.6","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.22_1624922774281_0.2844247481954205","host":"s3://npm-registry-packages"}},"4.3.23":{"name":"@truffle/contract","version":"4.3.23","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.23","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"0e7ed5f59cf2c733a01f67f699bcb362d3f10e0c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.23.tgz","fileCount":22,"integrity":"sha512-YqoFmy6bFMcFnbC1OXNBF1MrhNGYf1JEvY65EsbNe3cjkgbFfk0wVwuDkSYqXBIyWAOQBkPL+GTq4ouvnjVlnw==","signatures":[{"sig":"MEYCIQD/XpkNXmRXNUbJ95Ia9VbMke5tmAavgiDQk7fglAEWfwIhAL0heVa1kDJ+2oY0QBsKc+9xfwVBSMsrG7zMN6ajAk+/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26156694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3lCACRA9TVsSAnZWagAA/OcP/jr7cUovolEeFmTTL0N2\nS6fKSv1pQm7UrcKJ/9mFPwgB55jmUkk+riGi0FQp6KI0mR574MkvPXbp4EoY\nt9EoAm7YFOMMxyUA8Xs51CgjnqT6Oci7Tu9Lh98Bkk5IX0/Q0FjqhBvsg2O8\n/iGik8X6m0D3boWuQ2sG4mXMYmOQcieb91SKzOA9QpJ7FG7qsUt2uGweuzTv\nhzcaORaBV256hpoKuizWJbxZCtyGLgiSemwBh21R4MuwtsytoPaf7tv1KzzM\nVvXTy+6u1Vchn0WEz04Rq0pek41K9ziuGgCf+fpjXQOpdcurkODoBWuVgK2i\n2puqSf+fOXp1/TIsiwPkPCeUsREb3YEKHYr3qCAzkrHt4gdBqANndlWfeIXP\n0P3SCFDt6sSXugaEZrz2VP24mFoi8fU5epLsI2+mh285xx03gTTTD/JCMT5d\nRB4TohRBpZWncIQ+K/caqYIEYxwXMpl5ci+v3Fhro22rt+lF5PV0fHIoRBSu\nli/SWPro5sEcjG65r63iq56gnhhwuPRvj1WyqMduAA9P2WjcZW5icr1YmACD\n6uKxosWjcWiSn5Kzhn2PFtri89gBEJ+qnEigbHRxlGy7XGP7dreQ1qM10/C0\n6VlfCUrB3rkB4yYWHKsRgnQuBvhEp7rnV7Gv+3gOAh2mtpkPss2CRPh6K9na\n7vVx\r\n=F0EK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"abfb3646eea9d57e0a6f9186c12bb51680c181d8","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.21.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.21.0","dependencies":{"web3":"1.4.0","ethers":"^4.0.32","web3-utils":"1.4.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.4.0","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.4.0","@truffle/debug-utils":"^5.1.3","web3-core-promievent":"1.4.0","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.23_1625182335442_0.7913923645785885","host":"s3://npm-registry-packages"}},"4.3.24":{"name":"@truffle/contract","version":"4.3.24","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.24","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"5a5f9a5b2498d5374540b735471d5ecd08d38d9a","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.24.tgz","fileCount":22,"integrity":"sha512-cKijyDzJLRu96KWb/g7soHJkBXgY1HkmCeVhUun9iUJpA93w7StInCP+SPs0gd8Oj7GfcoYcCcnA38l/zJBEsQ==","signatures":[{"sig":"MEUCIHQJLVyp0DMV1uIb8GWbcwaryUiLU9qf2k+vZ3n5J05OAiEA/RiGzGserYhbmX0SIadcnW/g2KNHLO9LQRvzaHT+3og=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26156896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6MCCCRA9TVsSAnZWagAAMecP/3wY2E6PL4HV/BjjEXv5\nERGenh91chg74nmtOuDLUE9u4bWTYm43P2/qeuRKM29VtbNVbAd5PzpEkmEn\nhBe0lPtFC9NLOG64fSHwbsfuzNPGGFiW5Ri/awHkKBb4eLPT6xPbDzLDRSIe\nF8x7D2naKbmNwkru6juM6H5pfRYhwDVFc1dT8RrNiUxgIEW62KBmxUPoPPKm\nbVDUrmuTB8bsQN2DGXacfhY6qvkqOraRY+SgZGLYFpH2G7H/ryBDwjHOmd8e\nAyVtczwciBnnRDo9Wk0Wv6uUibHlUGIh3zCQip8N0lyk1J5PJRmbM7dYfCi8\nPNtIc3R4wmsPZ5ExxL77H49e0HemE81RuwrKufDfPH1RQDsnEMherjQQ0t3G\nsBSnfE74t1+NtsYmV6mYp3x0BzbBaHzoT4A1HrWvdKtGxyApJyrq+FWnoSan\nDDx19BSSi7aiVTI+AU5ChlJqM9sKw/6RYN2fYMlyUGnqg8/S7o0P9jS+vdUN\nMLtfvlkDe06lE6z7B7QI94Toy4nNjC71qV/hGWB4kQ6FVhAh1UHmlyuAcMPm\nV7lH9lDJGkcw0jEOYFYE+/haWF9bslk6T4E6mQxOGkYSYczYlCnf+52KqHy3\n/yABtJbDds3I5KRjHCbHucTnUALhA7bGGFUd2fbXGPCiWmmH8cME6SokPcEY\nrONr\r\n=Pm3R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"46b6a05440426e664ec65827e90789334783edac","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.21.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.21.0","dependencies":{"web3":"1.4.0","ethers":"^4.0.32","web3-utils":"1.4.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.4.0","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.4.0","@truffle/debug-utils":"^5.1.4","web3-core-promievent":"1.4.0","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.24_1625866369421_0.10691831340394975","host":"s3://npm-registry-packages"}},"4.3.25":{"name":"@truffle/contract","version":"4.3.25","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.25","maintainers":[{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"048909d87f9a7c0b58222a77ad084c5d4f5c654e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.25.tgz","fileCount":22,"integrity":"sha512-RFtuB6CP7WpVHMYsEisWoRDtds8IoU05YhMnvkHsOQz04puoUz1YB1fxShH7P9pesDUqQZ+1+WFcUJrUrgb2JA==","signatures":[{"sig":"MEQCIA0G3ysdu/WSCvrZIh8GvYRLDV+FSP/6S0JgHJwzs2ZFAiAUlasY2bEQFJB5+YugjVtC7qtZBZ2xpVD+CropnOAJUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26150562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8KElCRA9TVsSAnZWagAAcp4P+wZj+FYbji22LsobZwNt\npecVZPrbi8qUo14Dx4NbP9+tb05pnu8x2ZkLxK4KiTPX0zFSztG0NnnmKMus\nKxofuft5WExOgiDwd3iO1ea9WEDa8/jv2ttISfncaRX3L0Oxue1vKqPMyR//\nSRM2g/XWr8ZdlNoEoljs6m5cVPSZ+lyYfJv0ajaW9Z75ezd7ReCVuWbIIq7A\nzjGXJxyxTIo0SO8ivarpBdD4PGLDXtYUFs8b1It9ST+AX/WqtPQUCIycMKTg\nPp+feigART8AteWTHjByMxo00Nh7S3aXk3NfyQvJhCL9k5wsOtiftyw1rJDD\nPsTsgGDsRvT7dh1nr4cx/JDfP+mbvqzomZImUp0U0+b/kQ/lptUaQs9ipLCW\nlnHYkr7iROIuQcpwWdDIuegYv94kvsQfRGZLUtELuzGX+D7YAOpd/liZvCXn\n1UZAwQwXmvlxoj8uaD+9csk6/aO+1dpLRfqK9dqFODyGXgil82SeceRgA3Is\nG9teq4Z99D8aYkyEnGLpFww9PPXkUWCSbmux7rP97CSBOryOe/T62AAfkp+S\nmowxyseClYP0WooLoVMyoU19apGL9epFagn5UozNqXyOWebyTsrEbTj98oRC\nEcoCxwCyx6a2XzU7sRytpJEUsixsfhfI/26asnGERxAa259p8290ZJ3v+y3P\nfDDd\r\n=cFSJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ee43a9a8391547a1e607aa944ada006a41bcf5c7","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.4.0","ethers":"^4.0.32","web3-utils":"1.4.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.4.0","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.4.0","@truffle/debug-utils":"^5.1.5","web3-core-promievent":"1.4.0","@truffle/contract-schema":"^3.4.1","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.25_1626382628941_0.5816107086240856","host":"s3://npm-registry-packages"}},"4.3.26":{"name":"@truffle/contract","version":"4.3.26","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.26","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"822f258b235d0a1ab43a448ff36896e4b04ac13e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.26.tgz","fileCount":22,"integrity":"sha512-WWFdIAIjnU+jbfpgOcJSsPA2Lo/gRE5XjZTKLuMVy+5cSdltClu6/Sa1/fKd7Yy+msecpN2olHXaVks9DDuNUQ==","signatures":[{"sig":"MEUCIQD7HExi4wYWtvqId5d/BMlRUnlRctaFYUXsKnb7U2lWHwIgVTKFCavxL3JYsKa0hZnvak7hyKPkYBGDn2XH+G7z31o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26152914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+34gCRA9TVsSAnZWagAAzl4P/R5+ieaKHF4I9BhwVjR5\nv4hSvMic1Efi2Xh+DCeph4PI6VM2OUeluGeP5nFJucCUR+Zr5Qzx6dCAYSv0\nzVu0qlkHh+bjlhjqCXs/eJCZL1stPZQInf/dEiAlOJ/+3DeTCfS65lRIiySI\n3GjrZ0r+pmsC2ZFSBU9YH/jLyjKkhJ/7V+JxQ8zS6qVEa3O8Fvcxuc1c64/W\nZhzpnUsOorNb+Vwi6aNON/kwEGahhDwIELyLx2q3+siCxdFm+QPi8/FKpX9R\nLatsWntnzrHfYlMq+4UNaP9HizZXVti2Fq0eVJCATaQdudypVlT5jLMliFRo\nRWdE2iWzUd75Ql9Nst1Qlo6YBvfNWVzjbhtwDU78JC5ri6+WpesbLaqj4fVR\nwirHp7YSjhzVadVjlUzauwGzs19CvlLQfKsZOKq+IXpBMDr8/5DCLxCW6Sf5\n6EUdm+VVAQ5K3CEU/fAk0vxtTUlJJcwxGWDWHyLT74g8BxVgMToPt2XLTt+f\nQXaaeYIeeZ0rHxfKCgirXJjjjFvlFMH1tO1JoMeJucB0F+OjLws3J/Sdulo0\nNbR009lphlClCwbeKGkt2uxW5stoPQtrqnXRKlcjmxrVqNaWI/34ZKqPCYzE\n4PdOkEL1S0m/ECNyUV1NtSd8pLbgYyrtrBAApT9QNqSreZ3nnJc59Z4kdNXv\nQHCh\r\n=G5xp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4a67c2bac87e6401e18a20041e6947e1fcabb3d1","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.4.0","ethers":"^4.0.32","web3-utils":"1.4.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.4.0","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.4.0","@truffle/debug-utils":"^5.1.6","web3-core-promievent":"1.4.0","@truffle/contract-schema":"^3.4.2","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.26_1627094559591_0.13123887130449274","host":"s3://npm-registry-packages"}},"4.3.27":{"name":"@truffle/contract","version":"4.3.27","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.27","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e9d87bbb92172fe0d8649c13328a334c82f3d985","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.27.tgz","fileCount":22,"integrity":"sha512-HOP9PUdj3S0w+S6NeNDhn2jKQWKn6PcB6umRLPkYR4aeP2xtKgmQVK/i8PK+7vLw/ZcXAmfHetkCuNHS1f7Hiw==","signatures":[{"sig":"MEYCIQC7gE44Z9bVqxJfdmtoF1ytsKFIX5CHxRFy9wGxzEUPNwIhAJdsIF0Ucy2OER2l194XGIbc+iEO9sIUJYbOuGJmVWJP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBGGQCRA9TVsSAnZWagAAkuUP/3jitT3pKMWlstOmuf2b\ntA3zcI6JUlOVA2tbYOH+Yfk2iSU3/1uHWDwGfJD6S9WEDEdyb27bIld0QjmP\nk7yZcMVbuyy1Zi4mXcLnEU1U4TSDBVMzeVmgbpJ+6b9KxssGD28t0yY/SM7D\nkmG2uer9H4BeJaUz9Wf/n9+apAthpl+ikZDu3zPpO6P23jOVhwJbWtUjrnZz\nBvW9cudCrIEpcXQc9CretIpfIjejCMWxWzS7dtAhbKlUj5L4T7rl/68+FDsq\ny6NxtBrNUGRYcftNKH7D1bUi7+MWs91E99tH9/asmr//MoOJ5dkK/1QbrQKh\nPOI+fltuU11d0fDwi07Ceq5K3yql3dgh+S0XnK+niE2UwH9bs68m/1bxNtHY\noXqkGnrcmV/1O2PCsCjDg7Cdr6hB7SYxa1UBjugZYAmloKKGE7hPADDIpN35\n1iALpfcO4X7t6ipVoBjtrEQTuDi1N2cUV4qAN6iWOD1xHl0JrP9w1x/bLPZn\nbMky29NjLuvcSVsQK7bQ4hLG3Mr2OdrKy3baIWAlp+CHFiIfX2SUL8ZZAme+\nDMmu7g13ekrY5GWkEv97ucijRsl3HzPl3sibKEMBRCiKrDaweXg1+4kCRWGx\nejC8J0KUVFp3ijkErIhADSlYEHTGEw1t8TvbYAcJ+ovMp5QXYQb/ZQ9rlPda\nqHsi\r\n=vTtI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"9d27dcba66f8d3b9ed398076deca8459dda80100","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.0","ethers":"^4.0.32","web3-utils":"1.5.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.0","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.0","@truffle/debug-utils":"^5.1.7","web3-core-promievent":"1.5.0","@truffle/contract-schema":"^3.4.2","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.27_1627677072163_0.29534232073641764","host":"s3://npm-registry-packages"}},"4.3.28":{"name":"@truffle/contract","version":"4.3.28","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.28","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b5bbf3393c7bd6b19425665ae9f9221633b780fb","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.28.tgz","fileCount":22,"integrity":"sha512-YyWfkfEKY3Sydlt5QzUGcuuWHjq5vt1oAT+/21PdfMfiQ/PNWsrim6fHQVuUMKlJ40VqkBK24Slgh+Yf46hwwA==","signatures":[{"sig":"MEUCIQCW/wOA5VM2VUi1S1fWB57s594asQbNX7+sF6IAg+WlMQIgQ3bHkMqw87CyVi6GinAvfasnrJu/NpnA0XS0Oo9qzAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33629315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDYjbCRA9TVsSAnZWagAA8MUQAKEMNcImviu5yAn7680n\nu15GuJ3AdtsZQ997rdqFXy3h6eFe9NlPqQIbi1qjbMncTVr3B/2BY8N6HJko\nh29XV5M+DU84rFxKLilP4wmUkdVv77Z8/eWwelHSeQdD1rGTfBb0DqWQkMmc\nw+s4s1T1dQUqe2aTrMzBuDSz0oLw4PTTWXhMKhHpnRkYhAyCVjrIZccxAVJv\nSHQjAfJ1dMRNYkdtMU5juDi8Q98q5O1fSsOlzZwiPROI0Mi2PWEwva4GSyDY\nag5YUOdu6BJw6liZoKwwVCdjKhiIIRFQQnP5TJrtlHCO0IHnveMySpktCfqK\ngxfXvMdc8J6fXpt+Myzos8LGGuoTF9YGTqE24oNSkYIlwk8g83CsJVmaWbcc\npaGL3wI6QdOnGG3UQDOVUJ3LbSbXyHGuop7yefkxuJrbBP43pOPHaaHPeOc7\nNkBNoUcStluzOReMWwVYYU5hr0IcazAY0yRh7y97NCTC5V11sK1Sd728b9fr\nmT0QEETgre6zykBBeR9Qg1pU3wySixzzI93Lk6GQ0t5cZnjQiUyhmcNPPlEq\nwA3ygxUjKEoQCMyoSRqg8zCfrPvPzoU0pnSXCqsPSsVgQI61RfrvVcXVXOl1\niL8yGbs+Co8g//kppczmcIJkINSjEL3Js1+h8pjOGBZmlX1qublfhX16erKs\nbOFU\r\n=P3De\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"92c509dda96ba7e98ba0bf85030edcb9337b7346","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.1","ethers":"^4.0.32","web3-utils":"1.5.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.1","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.1","@truffle/debug-utils":"^5.1.8","web3-core-promievent":"1.5.1","@truffle/contract-schema":"^3.4.2","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.28_1628276955485_0.5990891600536454","host":"s3://npm-registry-packages"}},"4.3.29":{"name":"@truffle/contract","version":"4.3.29","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.29","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"667e4b2962c1561c1ad7785ffc8ae2dcda420e3b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.29.tgz","fileCount":22,"integrity":"sha512-m3RC94QeErh3tgq3rR3WWvhoKhWAv27TzyR4AIMqh/5aPKSXJvDffydX6HE6sPvR1icMK5ndtGQzW4e+/sYaEg==","signatures":[{"sig":"MEQCICMLXX8KWpKjWJ6nCU8LZpzMXNBiSx1pEitrtStUt5iqAiBAV/ccQcbbEF2GHDt265PZ2bOnC4P8fDxoIteE+TW8Ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33629315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDZuMCRA9TVsSAnZWagAAbZoQAJ1BIo4g/u11Q4/b4fpV\n16RLSGVEZEUgOusS4oP3Ov6cen7Z43BEtJznFeTeTmZlQoR2cUvfpewkp1bn\naCAj8chTD+8pjx4FdX6QlcYqKUtCMQTF4DP7xfuJc5lJvbFpaR8a0mmy2OA8\n8uTu+ltrJNHbxzMufIq1XDnvhtXfRHasuwtGPuEVCvJmkQpkRjhm+ymo8Bvx\nACsGkX48WUtxDtMlYaLxwJbaUNTgQ8MfgmljZe8EngI61iG2h7hA30l6MZ3o\nE0CjYGmdbkaXmJQDJvwRI43su12JhAnPNLQR4O5WcixBc6UbznATW8eqVBvv\n9E0nyOyUU/9FHjFNJh0RHvhyuMI04C5pfAMnwLZg1h5B+NV1tAKrjBHVEZdb\nMPWysYP9gwymGOMQvr+jmXiqu/dO/jatyRgSH4QKgY20oKIf0QlyjdczKGoo\nt3hGw/mp4M8TBrKhYCmYsktPgjCFIhZ2xRSBOirgPp+49LRG9t7r+2fPz/JB\nUQxCzzy61+CDBL84RGhj7gq0dWDXcoya1HQiAnaQKLnFU2nIiyLpmwnX7XfV\nb+TEGlFtRicAmsdnuK2gX3hfK3XWQqE3w3nhz5SU2R9q/fsktouzn9kyfp0Y\n0G6nOaIcrVqCFVLaVNQr+bXO8OzufY5lsShiLb6Xkrei7q07ZNcwAxLWEQO7\n83Dg\r\n=BNoX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"199c589965f6dd7d5cf1308ad95b2d3f5e28370e","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.1","ethers":"^4.0.32","web3-utils":"1.5.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.1","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.1","@truffle/debug-utils":"^5.1.9","web3-core-promievent":"1.5.1","@truffle/contract-schema":"^3.4.2","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.29_1628281740075_0.4217417584222105","host":"s3://npm-registry-packages"}},"4.3.30":{"name":"@truffle/contract","version":"4.3.30","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.30","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"d5ddb0b3baf6d7719d861143733ba5efac830102","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.30.tgz","fileCount":22,"integrity":"sha512-gf+Mptv/11XiYUcMSnje1LFju56rBnDzZXS/kHpGwZpodEXzraEBmKXU4l4gXFNWSz+2bt02650OwgYnpX+QPQ==","signatures":[{"sig":"MEQCIDZp9dcIBl6wYJvhZGI2NwK6ymQLrQnncg9aIDgDk0SPAiAbfrEGzh0PFFe6AMLhd7H3GYljaSrbocdRwMyLuhsaHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33628462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFZGTCRA9TVsSAnZWagAA32QQAJXE1HDqHHi3QXKnz7kv\ncMB2s1g2zVZtf7OI9w/Gy7DmZEifOsjEYNf5Zj0be/N1uMML2EvGv37Jui/T\nKupXb8V84qC/BBS5aUg81UXf8TkkZjPOiSc7N2WdSIOmC92lNsRLlh1Hiy9s\nA20mmnNaKMqWW3Dfot93Ipk/GxksfAw2OvC3NSyU8Ehw7+FYpqUHdjz70ghi\nK7vAKAkOhJV8uUB49bIcUnqyFO0rO4JN+ETnpUdQstsu02VVsLeWZdIwkeCN\nFBlzc7p7md2U8cWLEjP60KASybxbJaDERJHd4CkGs3dgN6bwDzwe9mYNsrvc\nbpnuNBRYjUtC8FRchqkOylxJEcWK4xy3FxFKYjmvVTEhlaO4IInQChL7wKZf\nkJ1zjhfmFFWUqk90HRHbs7Knh2PVKMcm3HYuWuAyjYroEwOyny14Gd/qDAX9\nTJDy87ncDx4vmSKQ1YDtJ7VyrJtcO5wkEjjZIANpE/5eU37cu/P6iPbCzJwk\n89twe8dZGh4MRc70BWnWKtIuEEOJuMR5d4BXDcg9+8UBkkTUaFd6fXgEWyHo\nh0asonE92uW/OSM8fhc6LJk7AC6S1Fga7rgHUmpxsSWgBXX0iHn/ctEoOSGA\nGQd4bBoDct//yVTXdbVeC10NKcTB0WS268JozE3wgEQbqLBR/iNNaDTTEkvQ\ng1f2\r\n=KA9L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"dee904b194cfb391b4cf2ed470dc596a2d503898","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.1","ethers":"^4.0.32","web3-utils":"1.5.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.1","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.1","@truffle/debug-utils":"^5.1.10","web3-core-promievent":"1.5.1","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.30_1628803474754_0.32370614057156466","host":"s3://npm-registry-packages"}},"4.3.31":{"name":"@truffle/contract","version":"4.3.31","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.31","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9f801458d264fe1cdddd4d0ed422ea8dbca83b2c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.31.tgz","fileCount":22,"integrity":"sha512-x6UtNLWEyZFaryvkZ6kbsFB5UzkA6vqRVji1idU3W1x1eHQEpQFS1zRinxgmA3NxnfqetK4d+T0xGrtnNQs4ng==","signatures":[{"sig":"MEQCICnJrz/9VcZyx9j6ujduH2BN2G5F7I7MTxdXLavuZ4f8AiAUz8qcd+2gOci4Nw4MhsciyqKaB9wDrH8xUT8nZV29fw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32249422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIZ4cCRA9TVsSAnZWagAAxd4QAKSDTrfFOQSD/IfJKE4G\nWWvD7tEig3wVuZLzN7qVRCG2qdHA/PX/lvhYoXJC7jgy9sBssVq9p8ZUPHFa\ngsVAhkk94yUEOfD+0KnK6Po9JDfBCW/feqfjsDvIm8O9OnnJYjUPROddF+th\nzKJdG3Afg0SLjnpF1niHSUYnaw+IFEw+DdkFu9K+Y9CTUsAhdBQqLGwrTk94\nqAjvYvqZ6GyyLbnEm6vGJ0JxeDZkXNM4H0NlXT2fhLpgffOUheKtTl8L4Cg4\n62TEJ/ntAf1CCV+7GbOGdtpM3twS8roFmHgvfshrQDyENyCTCbighQicsWs5\n3yHmMHG98ayl35/y3R5KWj1K2vUI3/Z6p44ClSWGjPjUSeOxxTk5ydZVvzQ/\niK+uXKsdqcCHU/iyIpNT43WX6g9MBQe57Zn4lYGYJoAGisu2gNjwKk7MJogX\np9uAsiVqKzE8BPtvqJRjEJD3D5P+rKIyj9Pb6wOvS3d5BVwgEWsBBJd7NQTw\nJiRzGpmmnuBOIIy3YHb7CCN0nH3HTZxd7tgMqNt/aZ1Yk3WqYQsZVMk9/hjz\nHmE4l7CarTwyl7X6HwvRWawGhXFglMFFO24OYQ9+xx+A4+ON40hMIOm/nrTU\ny9GGm6P1JxwKBkm/sZoX7PoH5Q+ocU7Z2cIdqP8OrMTAx6TtGTCnv2OsFyiw\nRemH\r\n=fZez\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"97e2378442da45508fe6823ff0da6fcd8d339f81","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.11","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.31_1629593116604_0.7572410364082238","host":"s3://npm-registry-packages"}},"4.3.32":{"name":"@truffle/contract","version":"4.3.32","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.32","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"515d8836f80de1b35ee79077a45888e7cd55fc5e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.32.tgz","fileCount":22,"integrity":"sha512-PDeYNccQvtl/Q0LYwmR+y4UhxjecwcZ1Is46ysgs0/HkxvqAMXjzwAhhHb0Af1IJvKyabI0Z6aCp7a4qVtT+Ew==","signatures":[{"sig":"MEQCIFDU02+XxmydXWEP9EbroMnuSqXN6S6IhLktAQapek2nAiAQsuH6jwjDJDu5lN8lkCCveYllR3z9eLPrJxKw0v1s9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32253578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKSE0CRA9TVsSAnZWagAA5P0P/j8QOEA2z3kEO4EZQGQH\nr/f6v9tx9yOXvUt6G8+2oW3JGQ60K3Kxbw9Sav2wGB9ykexgxMiT+MV2/P/x\nvr6owg4ZEq4MPsi7aasWeyFt9SGAtj3x0AVnfHgglGQ2Vo49yqW+tl8tp3TY\n18gaxaaKuUzusuAi4xS5sHZholmsyIGaCGJJpzWLp2w6FUCq/yb3bpeL5ibW\nga2pzOqzmtz21PJyOEpHWbpSCim7Cf+kJzF1gyykc7f5ONZoPR3U1Cf2f9fV\nIidayxJRCG4sdZ5k2qRh3OisDmX7XRdO0jrEWyay3PIz6Wo+fD50hzkCSpwJ\nvkktt9xv3H+L8MIiZqmuea5BODVvfHqw53RsMa8qN1lfaFyoOALwckZ5W6es\n0SAcd9hf7hBxb3c/cVSKIeRuA85HU1/7m471/qdEW+Evqy0IQvIWkmKzVemS\nE7V69kZf1tZQKwc0jXJszKWBK5A9jd/ZuYxssA3cNeh9z0igaoxo5w8Q3eqI\nMQOeF0SUzJfzF+W2U4bn+kL3tUk8nXZe64UdCf3fLE+3Eqlr77GGVcSgjScJ\nDI1L24ksLBWAUAOQ6PeJkScEXV/xGm/27+AyhItxo+ASfZ1mzotT7Ow3cLPd\nuPUCfrQhkYtBcpgao29dd1nvSZQAPmiAouW8mBOwqt7G99xOFgc6/3n8pxpv\nuRNA\r\n=nBZJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5c85ab4daa724b553767a8a3e21bcc4903244e06","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.12","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.32_1630085427693_0.6830503681065605","host":"s3://npm-registry-packages"}},"4.3.33":{"name":"@truffle/contract","version":"4.3.33","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.33","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"65078341e885a1bb923344d96c2106682cdb5cda","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.33.tgz","fileCount":22,"integrity":"sha512-6qW/iCkBflMS7Xzq0tKTVLozF9kUG4N07qmXlJDPnWNOz8JlQjeCZmXktyu9zHvp02p8mruHLZ6q2/3IA6acAg==","signatures":[{"sig":"MEUCIQC+q9FVkcJx26cgGQkCiHUeN6ooYJ9QYYYpLsab9zkOWAIgSVaPNVPIskCxrgx8h1pCh1Dtt5zExpIPA2cr3Ay6UHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32262211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMSyNCRA9TVsSAnZWagAAhBwP/i30ouyZV1Pi27muuZ/i\nZ8XtO+Ugjx6Cgh1ldLjRCDKIzXX1MVdLaN0MPUU2qFTZRM24+aq0c73ERRx0\nyonfAIxJG0dRQkZ5n5aXlHRmnnl6AvM1wv/WiKdNQiuYi95178tl/6ESS5ET\nKYzgZWrlM9+F9A2+pXKKoxyI+NF1xQEJiegbmDzQP8e7k9kWfxostXdqCWyU\nHjDaX6nVTTiuzwp2w+Fk7fJ2MppC510B/LB4sV9JNin6vu5DlRZ1ZbHxXD90\nBIC3MNdqBtSf7y14LwoaT/iZaEbw0QFQdtrzMUQHDcU1eOdommQqQU1yx1uv\nz65PmZiDAP+Xmr9gJ7RlPpXbcvbncF20Sdl8dja5XOywgJAIkEzuLfRsKVIq\nRLLkV+ML1zVnscQWJG8TFYB6RpNRxCfK5Kz1WkwRfY6bXIqH4ntBnKFMwI51\nm6cWKfWOFy9gC3t0P9+/bIdHyxPXb9YiR3EvcViTCtjZwugiCSa+XBT6TbGT\nrW+L8Bhhp2s4qIdgzSdz69i0ms/KA05aFyuGeihI7HdmJF0Nyq7xRYZY2IwQ\nXOikkCi84Mx9ZgVzRymxwLCJbAARpD+BJTxpKUkKQNj2fnI33VbFDCAeEHBn\n9PHtI/+EO+Ps1v/Yo8TNa7dx2cF/RE2dm3xMbN3+9rxygRC1/e5rq0tGp6+n\nF4WE\r\n=m42C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2d60c74a2e2daac8713681d23ba2925e431edc5e","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.14.0","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.13","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.33_1630612621385_0.4118926751206047","host":"s3://npm-registry-packages"}},"4.3.34-alpha.0":{"name":"@truffle/contract","version":"4.3.34-alpha.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.34-alpha.0","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3e7caa6be3a8553b552d0d85a9271d35c198394e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.34-alpha.0.tgz","fileCount":22,"integrity":"sha512-t/g/5hpTAgSwKwKWrGIsZaEzt5goap0SAG4ntqYty6VceUd1VgRA7W8nt0N7rKx4FUJ93ExVWR3xSEbh1t9jkQ==","signatures":[{"sig":"MEYCIQCJfDRWqPTFYG8BaQrhiOlTc50uyUN0TlNdAdKIRDi4awIhAKfsttOSXwqWcoupGmoMZM6OSkbNeRyB0qLqCE7eTZvL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32119321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhONSPCRA9TVsSAnZWagAABqAP/j6+2JVIR/+XIDiRYTsz\nm5rF/CYbVtxoqIuJRVuQbLoCheavXVoVhSBTEQLrkYB4//KoWEqGVkMLsDbF\nGztwJFPFaPbQLAQxeXyw5xsgLNv8zeRaFJlB8kH3ujg61sKXtmcaHxhhzAYP\ndF3LthESHL6ngvvdlbKvum5CbUnSf2Swbxn5LmkhQjKWe3hUdO4jRd5fl2J0\niQHIe0aFZ5Zw6+AmrK+gw0W5NIiDwbhs90HkO40yqZQLQPchbKkAEflTPQyB\nEiZBY4zKIFkEeUPyv5e2wvzJ93cG62UNS4ES5M6wm4cI+NISJyfd0Jw2D3oo\n5bA7QfqwTpUZtk6XvKgp7JlZLh42yFxivBjsDRyTya0fI/rcq78w7DdNmVJS\ntYSwuodQs1xe5bmB0zgqRW/6kpIy5oxq8umZgIJ6R6SuNCQiWJnfRs7KagQD\nQI8tnFPPtBBye5wPq2hrM/Hhozt5uizjQyZZ7Hs7vsbAZZw8S7yZZDnirhRL\ncVw0BTq02YiZSxXb5Q9zmrvG25EVb5nHBFr5ALbQmgFerg3IFtYJaYbh8QbW\naNGrngHS+626IRWVhzLSz1CVWZBZ7+5gHP1xTber2C+Xh+hVoy3NLkDTR7KO\npLP1+akOa7n4/rPUeqOmUkqSCnVJzzCw01z30CCJcuXQp2d3SrfU4dPG6bzt\nE7mR\r\n=+xYR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"a75de9db72a7bf4aa75209aa9732f766275806cd","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.14-alpha.0","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.34-alpha.0_1631114383364_0.2553368658466295","host":"s3://npm-registry-packages"}},"4.3.34":{"name":"@truffle/contract","version":"4.3.34","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.34","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8836bc369a3543995c52da120575123e44a42723","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.34.tgz","fileCount":22,"integrity":"sha512-JjGqi29vXGnNfjery7VueIO7MFUS2/MNvTAQEjn2zMhUYpIoanoCgXiQAA/TzM6wIy6vTqQuZSlbFAx27C67pw==","signatures":[{"sig":"MEYCIQCQLa4bamX8VYKa00axu/fmM5D/NmTIW5O/jYuoMUXbDAIhAOfqXmaPt6L+P3UCwvJw1/X9eHxa1pB83RR5eRG7j9dl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32262618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhO/WECRA9TVsSAnZWagAAITgP+QH5piDlr0WzhkxfdGyL\nDI2LPKLHDgV7AAMloh8sS56ALfF+ySXvxtJ+3Z0fbmt6SfTTApJfiAGTLRuY\nrJ9mEAS6D9Z7w2pLzHFNpEEt9LrLFnZqufeEHlZQYhC3WKGCP3fdX39mfEnC\nnIDsBlcVWHo6w+OrUCgSdk7nQWTkhwHmwgjG/LPkN1XEhdkGZGjO9xMz++yU\n/IhNpVwQGLKt+PtapvUASNGlbFqijLj52LpuBniiYT0iGY06jbU/1Da+zlBQ\nDik8IVIIo74mLYmGjmKQeOekDr2Rjztg/CLa0qdjhknV3JOYhgGVYG1N1pRW\nmWgBta4aCVWuJeO4WnPfymjY8kIpcyANyl83AhFauSt9ipigLh1y9n4BRi9Z\n5W4O/SXBbrK0lgeopEpaFZF9B/W+w0p/3I6wVnp3tV9yJunDd5mcMaJDmZFB\niSd/GwYH9ueSoM0bX2S+rUQwUXlC0YwnsMbZAQy0qqqXMfS3Hui3xdXteiVz\nvD9mZPB6o27tEOeRF5kzQqbkC7FTm3I3rDeZ1AbK1kEv12gznQPJzEvXTFsI\nFJH3om5VuWbAXd3sv+jZ/IB1CkijMnCpwGLsOzkHJhtRl8KJAPwcgAAJTzQl\nXSD+/MHSR7gqXeDSK7LCeNxOY0gOMarI+C3pVGRl4pTg+E8zdHJaE8mQpnaU\ndraY\r\n=Os8I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"58c7036f8992e11ae305e8722ddbd66ddc84b68c","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.14.0","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.14","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.34_1631319428191_0.40497063709465664","host":"s3://npm-registry-packages"}},"4.3.34-alpha.1":{"name":"@truffle/contract","version":"4.3.34-alpha.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.34-alpha.1","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9ebba5e98c1e4f4a4058a2f02669e6605710626f","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.34-alpha.1.tgz","fileCount":22,"integrity":"sha512-rlkwN9S5k90a7MuyIln2k/yt5ytB5hO3H2yLJpKP1fMQTILQ40vltuDh4e2XWP2dqzJpVXs5herezvMAnwgp+A==","signatures":[{"sig":"MEUCICi4uvrKgzhCr2kmH2EcYICTyTr5yQgBsrY4jg2F65wxAiEAv0f2EmfCmhYGExoR4KMD8uaz8CIszYK7em9FPFNgsmY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32119301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP+WCCRA9TVsSAnZWagAAgI4QAJE9oJzxJl+jS45jrjQ/\nwLukeuTHLHVz2Hb2I8F/u5n1oOgl70M+gCyUfglpJrfgc8VCw4nZL8lrKKJS\ntLI/NFaZAN2F6awYuemIYNK8U9a8VoXQebRewpxWhEs7WPsdWkzQ5W6aBhZn\nYNJ3AHNGcB8S117yKn2Klg+4itpQVlw5DAsokejQ7hu1Ved+gcmwtbHzyU9n\nDkHMsyLccw9mG7yRUjv7jgHUiJJ+OWmN+bv6YFKbhqRG5CDR5Q9JBwVquImX\njrnsTPZnE52xe7tVzFfjRNvsnmNiiznlWA8+UFwk0kvjKozKyV5PTw2XHClI\n6XGyuc8+hxcupfysqKj1Oz47KMeaHIRiA6Xxcvnu3ryRkQQUpr9LFD5VghbN\nSxUJWXpOxviHRkkVvuU6I4R1QBD8r1zK8fPWeA2em7XaUjAzeif3svBiiSKm\nFU//lb/3t6rrqi0vM+7u0N18ThXoSKmmbUErbq8GHXmbhZjfBIX17n6FvHWB\nOhNEBBcI87LB9Cd43mn4kKkg/fDT4hphbpwN0th24ioe/wL+xCrm7Qn4FGVw\nHQulHHbKgz0oCffCAkSuLgW0j++xj88xxmzfQp/JmoQvDHLWoUjNUo51u1jE\n4M1WNPVBAy6JqobJLXYWcg12+ibVu5q3OW5OFJw5txO6QHkuflyADXbqEmkd\nO7I1\r\n=Et7Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"91c563b03474699217ad55108931b9bd3744ff46","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.14-alpha.1","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.34-alpha.1_1631577474283_0.5810275524711974","host":"s3://npm-registry-packages"}},"4.3.35":{"name":"@truffle/contract","version":"4.3.35","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.35","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c9aba14a7fe95cea5cf68d5bfe2298027d8a4439","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.35.tgz","fileCount":22,"integrity":"sha512-n/U/CHG5c+Me6U+JsQqI1J2PVmJdKdWBxZzFiP++SJwkK+fuzrYclw6aMdgfONtvyAI05sfd7Whpvxia27IXOA==","signatures":[{"sig":"MEUCIQDSPoVi1zIUV6ul/moWwwlMBfoq0xEk0me2J5DHB0J9tgIgXyJpRJb2deAKmifaJ/gcUbK2a8s3l7SNyQwstXO7gE8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32261473},"main":"index.js","gitHead":"6fdc616cf4ce4265ea288d640047ee463a9568ec","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.2","ethers":"^4.0.32","web3-utils":"1.5.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.2","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.2","@truffle/debug-utils":"^5.1.15","web3-core-promievent":"1.5.2","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.35_1631896183276_0.7666146428407612","host":"s3://npm-registry-packages"}},"4.3.36":{"name":"@truffle/contract","version":"4.3.36","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.36","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c48ac658ba07afa2a8f89577f97855e8469613df","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.36.tgz","fileCount":22,"integrity":"sha512-GguvXERc2Ey5rFNFo4lcpKSnnt/qH5wymJd7SPspTf2M8FuTY5ytid6BDrGmAZ18/l3HQIKMN17/++lKTtb7Ow==","signatures":[{"sig":"MEYCIQCGt1uM4VNj5iI50zcbrBqsJywX6ZNMX4y0UT2IpOm+CAIhAOOzltEHt35+Z+hN4M8+B00wNJPvBvk+8SE5nl534aCS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32261746},"main":"index.js","gitHead":"ddbb2d1550359fc545a1411eb1a30915ae695980","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.1","dependencies":{"web3":"1.5.3","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.16","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.36_1632524133896_0.6367988881570723","host":"s3://npm-registry-packages"}},"4.3.37-alpha.0":{"name":"@truffle/contract","version":"4.3.37-alpha.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.37-alpha.0","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"73f733b72d3d6ba490754dfce8503a21e513a72a","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.37-alpha.0.tgz","fileCount":22,"integrity":"sha512-1wpUaegp705Jx7jw816cllqpke6gKal26nxIZgEvFy1fwnEXyk69Y5+5VI23VoT3107kUxIG2SEHw3kvqtYUYw==","signatures":[{"sig":"MEUCID1zpzpuEk8bxnUnCki5/OQJGWtCthZVZq2D005EZ1/jAiEAg9SIinXzRweSNlrYKb7L+Hm48KBDFXnuZSYhAlT0CRk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32261830},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"ee27c14dffc19ebe79d1eb79f6481ed756597f0a","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.3","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.17-alpha.0","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.37-alpha.0_1632863695095_0.9244914996643196","host":"s3://npm-registry-packages"}},"4.3.37-decoder-beta.0":{"name":"@truffle/contract","version":"4.3.37-decoder-beta.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.37-decoder-beta.0","maintainers":[{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"38754269493c9456eeca0da3d8a406f01292c0da","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.37-decoder-beta.0.tgz","fileCount":22,"integrity":"sha512-na/vF2m3+Mp+pzf/Rg9OLM9TSQvraJZiDVaMRXqy1LwTIDcz0QjHDBJnMGkTYAf6xGAw6MlSGntOprwDpVKxXA==","signatures":[{"sig":"MEQCIHr7/q50IfOR0SugUOcM19GdSPTLdhco2fjHMR5ZEN6qAiAPGPBkHlbPIJL8guOtvKJF4nx1AsqXaFLNTqUE6kkjnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32279516},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n* Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`. The input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all truffle-related projects.\n\n```javascript\nvar provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nvar contract = require(\"@truffle/contract\");\n\nvar MyContract = contract({\n  abi: ...,\n  unlinked_binary: ...,\n  address: ..., // optional\n  // many more\n})\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n* `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n* `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n* `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n  ```javascript\n  var deployed;\n  MyContract.deployed().then(function(instance) {\n    deployed = instance;\n    return instance.someFunction(5);\n  }).then(function(result) {\n    // Do something with the result or continue with more transactions.\n  });\n  ```\n\nor equivalently in ES6 <sup>(node.js 8 or newer)</sup>:  \n\n  ```javascript\n  const instance = await MyContract.deployed();\n  const result = await instance.someFunction(5);  \n  ```  \n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nvar MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\n// Require the package that was previosly saved by @truffle/artifactor\nvar MetaCoin = require(\"./path/to/MetaCoin.sol\");\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nvar account_one = \"5b42bd01ff...\";\nvar account_two = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nvar contract_address = \"8e2e2cf785...\";\nvar coin;\n\nMetaCoin.at(contract_address).then(function(instance) {\n  coin = instance;\n\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as account_two.\n  return coin.sendCoin(account_two, 3, {from: account_one});\n}).then(function(result) {\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  return coin.balances.call(account_two);\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  return coin.sendCoin(account_one, 1.5, {from: account_two});\n}).then(function(result) {\n  // Again, get the balance of account two\n  return coin.balances.call(account_two)\n}).then(function(balance_of_account_two) {\n  alert(\"Balance of account two is \" + balance_of_account_two + \"!\") // => 1.5\n}).catch(function(err) {\n  // Easily catch all errors along the whole execution.\n  alert(\"ERROR! \" + err.message);\n});\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nvar MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\nYou can set this property to choose the number format that abstraction methods return.  The default behavior is to return BN.\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\"].\nvar Example = artifacts.require('Example');\nExample.numberFormat = 'BigNumber';\n```\n\n#### `MyContract.timeout(block_timeout)`\nThis method allows you to set the block timeout for transactions.  Contract instances created from this abstraction will have the specified transaction block timeout.  This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction.  The default value for this is `true`.  See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions.  The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier.  The default value is `1.25`.\n\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result object contains import information about the transaction\n  console.log(\"Value was set to\", result.logs[0].args.val);\n});\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\ninstance.setValue.call(5).then(...);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can *get* the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\ninstance.getValue.call().then(function(val) {\n  // val represents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\nEven more helpful, however is we *don't even need* to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\ninstance.getValue().then(function(val) {\n  // val reprsents the `value` storage object in the solidity contract\n  // since the contract returns that value.\n});\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction has (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\ninstance.setValue(5).then(function(result) {\n  // result.tx => transaction hash, string\n  // result.logs => array of trigger events (1 item in this case)\n  // result.receipt => receipt object\n});\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\ninstance.sendTransaction({...}).then(function(result) {\n  // Same result object as above.\n});\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\ninstance.send(web3.toWei(1, \"ether\")).then(function(result) {\n  // Same result object as above.\n});\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\ninstance.setValue.estimateGas(5).then(function(result) {\n  // result => estimated gas for this transaction\n});\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"3eb505da95c5c876e57303e6dde7401c8145c060","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.3","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.17-decoder-beta.0","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8-decoder-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.37-decoder-beta.0_1632927572125_0.5940020948737215","host":"s3://npm-registry-packages"}},"4.3.37":{"name":"@truffle/contract","version":"4.3.37","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.37","maintainers":[{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8007b97650303dc2576ec90bff124ade95e61cd1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.37.tgz","fileCount":22,"integrity":"sha512-lMPpyez1FFXEKbfqYZ4yDqvEEl4m/SiRYm+x1/yu2coCi5uaWaIZDE0pJ++tVDueQN8tJVZ6oTN9i5oAvjShzA==","signatures":[{"sig":"MEQCIAYBSFpJkkL4pzFlkruW3w7LIflAsChRHqB4bchvf0sXAiA1vfG6PzJvy57vglLnv+CFBCO/0uG3JcOaqJ6al+kZVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31914357},"main":"index.js","gitHead":"1f05ab28b0007e6fab26133d573c4a1ae4b5ef6c","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"leeftk","email":"leandro.faria@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.1+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.1","dependencies":{"web3":"1.5.3","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.17","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.37_1633038078504_0.7387854707373649","host":"s3://npm-registry-packages"}},"4.3.38":{"name":"@truffle/contract","version":"4.3.38","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.38","maintainers":[{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"51627cda844ed123f609e49a56016ecc0ed870b1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.38.tgz","fileCount":22,"integrity":"sha512-11HL9IJTmd45pVXJvEaRYeyuhf8GmAgRD7bTYBZj2CiMBnt0337Fg7Zz/GuTpUUW2h3fbyTYO4hgOntxdQjZ5A==","signatures":[{"sig":"MEYCIQDLsw6A901QuqEigxF84astTy8iGAJ3F0BdUYQ/tVsdeQIhAI6RISA0TJuP/9dC24sgzBNuOWO0fKeRMJjFAwePXa4v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31809042},"main":"index.js","gitHead":"e0c903d47cf52f10da74fd0348f8bdb2ef973818","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.0","dependencies":{"web3":"1.5.3","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.18","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.3.1","exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.38_1633638220347_0.6425517251228798","host":"s3://npm-registry-packages"}},"4.3.39":{"name":"@truffle/contract","version":"4.3.39","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.39","maintainers":[{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"a462b5ed251e50a5e445be20c00de6ea91b6d8d4","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.39.tgz","fileCount":22,"integrity":"sha512-ZBCrFUWaTtOvKlJw2J2bDwaBghGDvb5AeVU1WxHvwLnzGqCHzIE6dhZixItdFQgbuZ2gJAxzFQVT38miiK7ufA==","signatures":[{"sig":"MEQCID7iV8mM7Tm01FTOfxdv0UcXzZ94AjXg8QSalFoGhE3rAiANXJz6Dlt07VDxT6Q+IZbVYnOsMKLw9ZvQGk8hlCKV2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31810058},"main":"index.js","gitHead":"b788e582fbe5466334a35498d63fca67dca929de","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v14.18.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.1","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.19","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.39_1636124719038_0.4848349687600335","host":"s3://npm-registry-packages"}},"4.3.40":{"name":"@truffle/contract","version":"4.3.40","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.40","maintainers":[{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"5c3fcda951d806fd753aad3198786b44ee6873af","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.40.tgz","fileCount":22,"integrity":"sha512-VRO1CrNT+pdsjWBu/F8dZw3pAdJrpSx9hogBkiJOvikrz3ZEQOYA9cAMC4Pl+677Q5Qd+4DSxEtB1ufjpSThIg==","signatures":[{"sig":"MEQCIGOd0mn+Pvazfum0zqlCyLhdTYHFo714C2nS+cyuJ3C3AiBMBjeNK3f9bMaNVrB9H8YcuvpbGtbKx8CbEwKq02ippw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31819984},"main":"index.js","gitHead":"77651ecd10d95a4d86f386b7f8bd21759400c122","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.21.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.21.0","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.20","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.40_1636672474236_0.35183867388545864","host":"s3://npm-registry-packages"}},"4.3.41":{"name":"@truffle/contract","version":"4.3.41","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.41","maintainers":[{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"17a712e438d80e447650d6179601fd3e64906ebf","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.41.tgz","fileCount":22,"integrity":"sha512-g3a1IwwAVhQuRE6c9OTA8NKOLSFR2Qy8iJgOy5eOfbtjpxYmWGl78Ho+0cKCQmGvEyECsLN1VHIzmZJJF9gQZw==","signatures":[{"sig":"MEUCICJDU9vjXcMXViJs3IZY6SKbGZ/MY3Iww9LOPPAxHnidAiEAshOluGc/08iyy2sldOjCXC6Y0O2SbN4hxQX1OsVhEgQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31812988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlvX4CRA9TVsSAnZWagAAx+IQAJf0TZZu13E2TWgYrDn9\nfcBDU0Y9WUkXoIRmEsW/v0jsOl4GrHUGTTv81kVvjEyuxchm1JCYGo1ubgEI\nezVRdEvMe1h05wX4l2KCx27cpFIiI7fnsHIVl2Um34TGYvGp022BoHLWTh5l\nn1rV7bToYjfCDZsxLaFaWrNjQEoFpkm2xZlxLqrA/IPJyl4SQAXQcmCgS0fZ\n4s9uHsH886csEcNGWVTVvddCEnmLuF23AuORW37WXmgjp0QkyllTHj0t5vuO\nAD/MjIlSCso2QiRxM4433u2/kAtwfrBpRHBlaK7AW6hL/W1inaRVFn+apdGQ\nbMFhCIcBKt1OaZtJDQYi8Kvx5pAeLBDWc5Eifndzx7c5Q/TMylpO9W7tWL17\nNdB2srKcbVkmERChvTGfoQgV8rq/BgNXrv6F6Tp9Pcw5/Jz3SzLhK/QRrcUA\nE3NSgIZtU+Z0cpuYLhlWqXyOVkL7d7dOQqP/cz8JP2hqnpU3XijM+5AoOWgi\n1LrzICwOF6nEBgY8/gZcfjMaWqojuTXYGExmYvKlPtjFS8s9w7FFOvGoL7t7\nTu5tLI0/ChXLJXDrKdNNJAcsStoa6SsNLq6N9AwpnvJyyMVu4kRvJv3FDXVw\nh4P252f8jFvzkuaqF99tPNTL7jOsFQNAiIZMHoc7enZ6a7IhxcPckFvrS5N6\nSh5d\r\n=AHMP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4ee88a3d5998856602a0a734c50e84b17306fe9d","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^5.1.21","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.41_1637283320209_0.9626736681998038","host":"s3://npm-registry-packages"}},"4.3.42":{"name":"@truffle/contract","version":"4.3.42","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.42","maintainers":[{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"75965224814e7c1efedfd9d0ec5130f51f701365","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.42.tgz","fileCount":22,"integrity":"sha512-CWbKz3L6ldAoh0JX14nNzOyXxWsLiGX5PYpswrwOy0Uk4JYpbVtpSzoQxJbnDTfLUciowfCdG/4QMZ+zo2WVqA==","signatures":[{"sig":"MEQCIAyJc5OKXbd226SCFm4X+G6yfZ4hVQOCUSQGQhF5EPKwAiBjG8Ev0lk7CcgTNDLfm/Q08e2VKSbbM7T1FdkDEpWy+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31812976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlwQHCRA9TVsSAnZWagAA4cMP/3ZMsTm52+0+l0GgpC9J\nrbDNYbii2uxeNnsG/zH7qQLzYulxeW9ctkxfn4F37v9+uY03wpO8bfGTl7jA\nclJS7HWYWEsOOH9PyxxxX+UKK/pqUCzrmXaayJtIAOPiyZc9YFB1P0U2oAEw\nMMy0DHa/y2b+dD99SRueyOkQ/EzX2cD0lDgADSsKxVb95CwsQXRa3OubjVM2\nXc/Y5ScsiuU+CQh/Qpf44V3SVZ0cV+GVO/g4c+23X8dD1ZHtbZzbhpn6IkeD\nsRmolz+Hnn4jZhjjEPB+HNrOKyqdThG/6cIbkthERaJGOwtM6X6nvIrvm/Fs\nZ8VqQC2MHNv+nC84GnSq7Ns9QyLIlCKEwPahU/1o9TY601StH1KxEmAKqu+O\nCKzPaGdSRfb5tIYudNtPbUykX1ZH/Wl4PDMgxWJ6cQdBIjH0cWEl8NLMxtB8\nW0iSn1Gtln3BRngTaFKVD4/0zJahGX92GxYXqzQ+OBillkTtYzoY4q5a6MUt\nUb8Geo/6AZQBcRiRz5TEh4fqb8Ck4OUAuKBcttWwHt+b2cxfMV+E4foo5JCw\nt3KASzt25IiWSTqJ73x0wrTTuTQEFXzOOPiEtLriXW18aFz4RuNkCtga/3eP\n073+1/lOyKXOwIoVgQxcTiD0HSGMDDhQv5DkcyUo87oWHp/9vw0J3fTrGJS0\noaEA\r\n=+7R4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7891a9ac28b89fb85329e1dbf01f01877de4a449","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.0","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.42_1637286919363_0.4987792383780214","host":"s3://npm-registry-packages"}},"4.3.43":{"name":"@truffle/contract","version":"4.3.43","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.3.43","maintainers":[{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"0d3944d98e9924809283f8fa6adcfb0ffc130590","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.3.43.tgz","fileCount":22,"integrity":"sha512-F06lBURJ3Mow4fov/9O2rI2giVUhlCskpfESjLSuYnE5ZEDwTiNF99P2iv66EhUqNg6JkUFd9RlDZE5bDnZzJA==","signatures":[{"sig":"MEUCIQDe3A1n4P7wPbZKvHK5TtpEJKRQtH1QOVO5aqrQOx2rNAIgBNnUtb6pQsCj0J47HtgvDxLLkleLiOpLJyIHxyMJxrw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31805694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqUnuCRA9TVsSAnZWagAAvtwP/iIvRdMmFreMgLIUNJMZ\nSs0PiPjRLYGmRFRqEVnGYCyoSlaD0AyLvjL9VlUF62eu0DR4QxTendMFKBn+\nHtfat0Zra/AsWGFqGPvKw+6LiJsGsxknIfMctP+rdOAFXQDGUahMxQTWT1Gu\ntxkr/fF7fxzjrONir4w82Soave+8NrsGJFi4iioTkMjey27O5K5HhILrnuPB\no3qVIDkq3JX9yivy3/46IlD8SVHsV3hxEoN6Z/iCsSj7jmtg+qMDb/MFNMQq\niY8JcldqsoOB3jfiTW9k/O7g3cPEohzbkRPI23nYQrGpCd3mmfoL49fuK/q1\n+bFIBCUvZFds1ccKIDJjCUe02uhvc7cmc8rugJd3xDWMAt+xETq4vMqbaetD\nBaJ1dxLKxjndXZML4z34D8bTqazQciwXiubhYUMQt4JHhRf3vldXQTE/RrRK\nynMhOLK38F4lLv1EU3X33mKfhuJMYDOg1TBJVbaw/fnjsjinIxwLPNnI+uWZ\nPS9cfhqs4ylBfcDeLCO7UCpcWK20pA5O7mAvTWFff1BHj7WdSDsyqZ5SP4/m\ng6pJin2PJ+xZfmlIgxqoI4/X5w4jMLhtiA8ybYIlOfC8yMqb9v/IG5EsUk8l\n4NXBNxu03R4cUTpdrNwdwtjjMHfxO4wOX/w44q62vweEmKfgo8Lt2lYA7CZO\nlPg0\r\n=v4Xz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"51b747baa1761bcc892533286e50cf78cb82eebe","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.0","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.3.43_1638484462336_0.42965180014458415","host":"s3://npm-registry-packages"}},"4.4.0":{"name":"@truffle/contract","version":"4.4.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.0","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f49c50292e07cd147001899914dc58f08c351355","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.0.tgz","fileCount":22,"integrity":"sha512-k/YbwIOJsRAn3+VseG/lOlFiqjValHYwXdEyCT5D1HRQ0MQZ7JPabR05+dAlY88BK5o9ejUXCh+TDc0CRDn/eQ==","signatures":[{"sig":"MEQCIBKeGh//W7jrWiDd24ysAWY4QDfQkoR+fUfFcSGFTJw1AiBqhHabK0jhazsoC6k/uBrY4BKiwbAFjSK4u+vehhQwJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31809411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs3m5CRA9TVsSAnZWagAAtq8QAKHwtLQks1PrtWv3p+yy\nuVhiOZsoZF5xz40fnfNd3pm2zWHY+ikiW9BAAv1IHXo7LIl8AMiXyOPH+CGj\n88KqDHqV4G6X3uhwwif9ft2C9lL4T5LTSRFrAKpdYikdqiYtwtq2eXrbpSTo\npy4/t7IbFjcxrw3tLK1agwoIwDE3tS9Yst43Cnrf0DiIQAOR/c/y39/Gw1gR\nYwJ++dWyV2G8V8Tzkx5LODdU+0TAAu04T290KmC6D78I89vc0O+8+/dnTGNq\nK9nE80LCkBEwh+w1Ug4IAWDpF2nn5OfnWO8LW5cMZxcNd6r++Sw/Oc5CrBf4\nR0pF2lQ4MMDG1La1fRi8i2hQNGm3LEXZZx3/hz/f3Asz8ABpwj2tdkjACi5V\n+0XDvgX/ZFp97FfHhkxnjnMgw+qQmB4yclLOiTW4I7Mo8USeSbQ29m5IExhq\ncDHCuHupPVJrZg8bqeduUm02axerZuFQhwmU+i5ffEUc1h0zynHvz0TxM/Up\nnwtYwbZ7ccwrL6yKLPIIrt8CRXS47nZAXTZ22c2wkevMET6OD4ptt5/jXgJC\nhAyeT75cO0NpaTKiLWl34xqvH+R4g6TTX3jIoDbhhp7X/EVe1pPVY+h/F057\nW2Km9jXTMDelPZZvVOseJR5U033uQKuYLAYv8A6TV6OoqyDVH5TiJgozdj/x\nuNsP\r\n=kJ8O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"b381167f59327617a2648ced9926668e248856c3","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v16.13.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.13.0","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.1","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.3","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.0_1639152057246_0.6957663319055174","host":"s3://npm-registry-packages"}},"4.4.1":{"name":"@truffle/contract","version":"4.4.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.1","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b561105c412bd8e2f916edc59335218940883c30","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.1.tgz","fileCount":22,"integrity":"sha512-KVpG9alKxdNzWOcRN97crZXXmmnnShq1SkM9hQN2fOckszzrmy6ctOhnZKNAb8tzfHBgODDCmiGQbTqaYizcrA==","signatures":[{"sig":"MEUCIQC0ByKMu8LqhX6D0oeg/nUvsXarrh7BW7s3AmqH7EfxuwIgDzv7uchh2Mzuqtik/0dLPg3EofpY3iiCNbl2dQQ57z0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31821760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhu8Q/CRA9TVsSAnZWagAAaT0P/0hK4jIZk00VJAqSvSWk\nmG2jq5MYkFw80uPO2sxcIZE5NmSaw6XN5Cuq2joXxke1AZMwveLP0hairSqx\nSlnCe5XmmUFGTnCbni/G0EyQlJoLxCzsQkJcA7fYt/i8Zwi17Rl1DrXkijX6\nKbF9oy2Ku0Bi8yvgzdn6SWk8lnenj+Vkp1q6Y9KgQ704bFijuoaRgMaJ8k/V\nZhE7OBrvhtwMAUYOPyuCqWfdbJbFAjFdEA7R8uUsXbMcmZfmdrkCX69J0FfJ\nYc7idDNqg6YdT+XXcn3PYEp+PjmtLRyVsGeLBkhZRU3V5jK5qDpABB6OAweq\nnw1dnkLBTmJDYLsiqd6FUCLfxZgehOG6FAELR6omIQ0uUAjRTtEt8ioB035J\nMmoPoxXDX84Tno0E8H0asaP7DqCZliVydrvEx6CtwAtt3iyMHkcQgi57sxgD\nyVNf6nWtQLfdjeKRlZ+PO7l+i+UMeyhpDWYkhs9MX2pHp8519jQyEyfcWZAp\nZ5XWIAMxL+yqdvDqgQpC6fJXlWodWwL2dfDOwWKpH6k7fGGzW+znTqPsAv+r\n7BWIQ9co7In4NOP5lFSjdCHpcFW+Xlh9plVgCfzAmCtddaJbkmyqumo+GlWg\neFx4Np1/CNal4GCDu1A6/Vbstg8R5K+jXywU1aOI4v/ivrObvMZW33wX/pz4\ns1nw\r\n=DuJm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"653686708545be12b71f9b35eb7a3ca66510c54d","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"leeftk","email":"leandro.faria@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v14.18.1+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.1","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.2","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.1_1639695423018_0.10468262899773118","host":"s3://npm-registry-packages"}},"4.4.2":{"name":"@truffle/contract","version":"4.4.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.2","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b96941435ae0321f6a61fd02fcc453b782ba2015","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.2.tgz","fileCount":22,"integrity":"sha512-w/iyB5dZ3KnIuvX1dqD1Z1SWFahT9/nvA1VAsK+eIy+zvtI1phx365uV75LdIoyeBtR1GmbqAO4F7ZLSfjkP+w==","signatures":[{"sig":"MEQCIBXDoAG29TJfWFSZfTxTvx9t5vOlytjsC3ElRCNRp5rpAiBTPh3lEOBig8Hdwh6cAVBi2MGEOEFTczB1WxhFAQltDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31850594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw7/MCRA9TVsSAnZWagAAfn8QAKL817sc1Cs46+J5T1hf\ny9Fm7ViyAH3D9sEvTXQAM9AnAxWCb4zKgBTvYZdE96PzK/0cryxWQboiK/Ix\nHHjsjRRE9vPtHYEWZm9LrQLCIiSeMAEZmrGnI16VATfoJN+/VI2IAp9GIsiV\n9ONXqEB1Tq2KgVy7a4DAfbnZD6PLDempyk/qX5wPmwMfLKxTrW+i5ivd6s5w\nUADXY8qzFrEBSrOBZl6ZGeDgqM7VNGbV9zS4cTV9tSta2OEUhPvNfV/jhbIw\nuRp5YiVh0Lib7sHN/TKxqci+MBpVOmmENHS/PgEOaVzQY0wsR/UYO5kF52qd\nPWEgEzUqhgBPrpnh5TR60MXzH5I8Yr8GQ9CWr8we5sYbUVWF4QqpJD9I5qhl\noK1s/dOdXEVRNkgCms77CYUXmoYqa1c++W04a5AMYsiFBII5nitvMW43TzXR\nt/sc+T/IvxPmT8V+zWvBCUm8pQr8Qv6K3GZY8wF4iXE/+JXxyI+ByIImmtKl\nx0X12VMzxXbbNIfcksnEPNSdnQJIr1GXMV2lybc5xLYUb9AjJxE/RHuAlLLA\n6dPfhA2Mn6cG9lVqIiSwMKbUkJuRJcS6bp/0TB08kqVpu/03cGNb6FUTNGn6\nfLUhS1sEbMnonweLqONcWlFb2bv1l6puQY5lgK/2Dxw4ALqYT3GoqQWkmNF+\nq5Zw\r\n=q3+q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4d587fc4f70c6bb8f6372fe1d0489c23faed08d3","scripts":{"compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/3.19.0/node@v12.22.7+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.7","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.3","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.2_1640218571722_0.8784833258849454","host":"s3://npm-registry-packages"}},"4.4.3":{"name":"@truffle/contract","version":"4.4.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.3","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b6512ef68483480f980fda7775d9143fb1c60e7e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.3.tgz","fileCount":22,"integrity":"sha512-mydxiO8Qr8mSQ857vYQa80JckAmTHsc3u8MjFQZsFyuarHMQzUOwDlZa0KZS8sAQ8vTmFPn1aJbeNncqY/TFBQ==","signatures":[{"sig":"MEUCIQC6aWfNbHZz5zBuvOq9I9t16RpxuUqCsqA6UoqoxKw/OgIgD/ZqhbUeU+vOCIDdTFCct95yio8LuMQnXyh4iN8dq4k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31840942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh21o4CRA9TVsSAnZWagAAbWkP/iZ38rhmJ+O6aMyOgrZG\nhN7iafaEsVsmUVbPnCbaBLOo2o+ZQxBh95T/8gEipE/YQhLaj3NkcEE/s1Z2\n7n6G2AYvjLzCjDhoP4l3Hr0LQa9VnBf1xZo2+xfm/XMP1eAVRCGhKRUjpDi9\nnDsVvGdnQ3P4nlV+A8RqUstWwlHrYoW4fErGi/EFYOoJzvIxbT5/uZBY/wSX\n0REuSYCKebqAMmau8be3wKImLUH0uIcWbXHJBbS1Cg0IrTHyOCkgw4TOygOV\nxLOtZIOabULhT5eC9cFX5te8BS46SnEh0Yh8SBPmTdmtNtCePwtmlMQOZ+4a\nkISo5PFM2bdN+yWdvPyunFyDx2ttgo5XyI/EyvuKi2mdYSQ6qy9bINKvz1CJ\nbnLB9tOPlUhjvzWXlpFw/c6WwK0bfgNhC5XHXav9QpE+pfAnQB92Ej8U0/kI\n6HyBwqnoiyP2kVaw4l0dOo8Kkh8OFAqJa5WeoxZjo+Sp/4EPJ/QfdQo+/4nx\nQr8mA/Y8v8nLEjMV40c2c51jGptF8f8KfU3GI1Xu5mbMSDnPFcTzDJIhpBtr\nhnWMbQYbaA2KBYanHWsJyXMd0JqN7tyIsTeaC/Rmi9gny8PssRnPWjhrE1ho\nyzfgFg4CZfo8oYAkYVUIMen7TwlYEMncU00D9TqeKLziAkcnQ3R6wrEgkH4c\nNPWO\r\n=SqCG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"cbbdad403808aba996b37237c277e302ee99353b","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.20.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.20.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.4","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.3_1641765432327_0.6238643689104109","host":"s3://npm-registry-packages"}},"4.4.4":{"name":"@truffle/contract","version":"4.4.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.4","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"b668f0ef6ebfb0cec38a4f754e0d7bcf1a49b2a8","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.4.tgz","fileCount":22,"integrity":"sha512-OrMunu8vfHkBPAwZc4te9CIg/+Cc4txmc/iJmMwxZ6m1lf0dOG837IjMD0KGSkvpO59KW/eiqEK7VF/cewjN6A==","signatures":[{"sig":"MEYCIQDcp//eX/PyWerWMo4hVS0LZDMrSAzVpkCUDREY5niB+gIhAN00nHgCLoqhvFZKKQq0i3by1j4kcpesi7gvotl7yyoI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31851927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4LbWCRA9TVsSAnZWagAAxA8P/igQswGI/GGcMSV5Gx2C\nD///T4and2d0lanQc/4rv5HqFdyAhA9NFH/oqbYbwMU58k60zi/VgBB07UjQ\nrfn2q1RknvlP+8E+IT8d4vWUE5hOctmiEg6lfbEjelyAfebpMwg9D9ExKRtG\nhuTsD/EWFm8ZQ8UibiDDLtXbURZTk2n9EYT5S4G7ci9k1RGDNBfbA28kDlP6\nFNrHE6+hX1DUZK9EJnr8GxjdnDsS0/M2ADqy6Z51m2INt8yVye46jUw28OXy\nIhmkZpbkiem0toCQHQTctBGAoAuiyOMIQpAuIydLfasYDlxLDgAIhU90e5Uz\nnpRc4s4U9hIaN875WjmKHHRmMR29SKecxnE0B4vWKJBd+UzTcx/qtbywWO7y\nyAmDV2ZjwPVmtrbT+pfcFvSTpLoKlEQfWQ/SjkQUFCprOv8wpPo3+7V3ncQG\nv0mfVJT7RxxeihUJE2w3J94MREerDd/R5WrVEL9owVKjYkgShKNf1Am1Z8ug\nrpv/it+K3HJFJ1DaYprouiVmmU37kSWhV0VC8Q+CfxtXm2HNafQG6cXJGHoR\nhIwcqBOWpw30eAAMA+p/e/B0X/Ke/Qv/YtC7naCSw2di8Qx6+AWycyTKgOuD\nVTK41XxleFE7d/ATlIXnIPZJBDqrct82XgK+OHi2J2UtqiLdBh9y+lXKRrak\nqxgM\r\n=kkkl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"79d1cc27aee9918f328565035c30428c4b3f25d8","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.9+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.9","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.4","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.4_1642116821672_0.4590033908636213","host":"s3://npm-registry-packages"}},"4.4.5":{"name":"@truffle/contract","version":"4.4.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.5","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c30f6aaf1c6ea6bcac76320be0d028fa1c0b7353","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.5.tgz","fileCount":22,"integrity":"sha512-VxraukgvMCmlu8Fp+xzQJroqaPhhv0ozYVs9e5TsFTTwBSBgTjoA8ptbXgATp0WlFGYwPfkdVMReN6m0kP+POw==","signatures":[{"sig":"MEUCIQC0pZQ1Q5KQiWa5xsUwmZPDFWJtv2JsgxKoOIwqexXZzAIgFi99PrjD9CdUKLG7qUduJ3MEnW4HONH1GjW8qr/c31A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31846457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6eIoCRA9TVsSAnZWagAAZiAP+gM4eD4Kp+m9AUDXq4+z\nL2QxCLnZn29mpsennsWi9ytfGnT1PmW0s/8eduULF0JqvmdCyYtehcSXKYep\n3b8/K2TillhxhHKx2LT4RDbvwTBykplfSAEUGFdmHLpf+xvfXbq2wjGjqKot\nOYvwlr1XaWzPF80LbTjx1W0b3KK1NW4aNIiP8dzO86r/NVdfLzPua/H4a2iT\nDYdhlffYGOWAFyDJVSvKAGKRlQRJWWAyzafANlx/Gm5LqZ4rZ6nyoEvHwMdo\n+ft2WunMh1bGIloHcBE/qNPAZNBCAdiLo+z+PXmjF4w26ytHGc5Ql5k2dEjq\nTfehG9Md6ciEPg0ONuWrJUguh/SeYAXov3zH0LjQzwiBQ6P7kOlAeFMYuf9o\nnH2xEIaXznO+px4k+ozCtkBeTFFhnsYCFBjgqruab87UQwYX2Tvlvi0Qmflc\ngwc0joKcmN2nNSprBkh7H1y80RmD9wd0Ag/jrOaDYTu2MCQ+5Mv4kOHt2hgy\nISQMpXXH+Mwk3S+jAb3cadUtTdGnR+H38fGe8CyERUps0I5E7y0AmjToSlYP\nzfWhR//DzRJ+Mqtn9O2kt4DaKZpN38tqKJBzeQGpnymInYKtsvBu/QObfnOZ\nTLoggvkxqtgSTJ44QkLzW3/NqfcmQCNwET9xytAxztWSH6FId2uIyUcs05vY\nuz6I\r\n=iunl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"f3831fe5b159db57f59b9f11c4a41b56282b8884","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"leeftk","email":"leandro.faria@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.1","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.14","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.5","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.0.31","@truffle/interface-adapter":"^0.5.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.5_1642717735676_0.09658422606488948","host":"s3://npm-registry-packages"}},"4.4.6":{"name":"@truffle/contract","version":"4.4.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.6","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c9e1cc70dce107fe0d5a575cf3fb698e849a9568","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.6.tgz","fileCount":22,"integrity":"sha512-gNTBDCJx0dF4S/HsIw8Ec7pXYbhKCZP1D2MGzx29/DoeFFp3NqCt3N8upvFHmKkyD9lvASGC2cmCQF9AJ3Tw7w==","signatures":[{"sig":"MEUCIQDLG0SkSr3DdeKa1RExXLjF8lQnKFDcNYrnEdcdfaCs7AIgVl3P3MGUa72RjogFYRIbDLa6lrBCdMEtpQa9cA+i+2c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31834520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9bkmCRA9TVsSAnZWagAAamoQAIFAXH+XpPi1TDZkMFAV\nut52Fl/+7gaOWtxt+zaSUgnotwq4KXinkXnPWULJ9VaVX1BCRfwYcX58ThXF\nK/2uN1uVjJ2+lQskPmdjFZsKulCLwttCqqtXY8H4tus5WNJFAcMRt3j9SyP+\nIKV4l7jCLzmwJIhQ1anMNfGuw0dC5uR7klmjqT/55YXzk4ByxY4GQhWBe3KG\nLrPYnfrxB6JK/2JZlNpcyt0jE9q2mHB4+cNCdIAYTpZ3H6ka7/YfKiwyHLsH\nTPAju/FuSxqJsWesWMYTwhbqL+xSoEyGQ2z91cCRV77e91KcAUNyOethxjG9\nzuHTM0BtWd4VhIODZ9jOjDxoZQCpTjB9fKBtxNwFra9IAP8ZwVq4nzaw1a8Y\nTYsNJmPWYPAtorrqKELLEMmq+taKh1vdrKUnfeCFlwfuk6KAE2JAhMzqUE73\nVwshWnhdlqz8qCv5nwQ5G+oqmrlOoCc5VUZ84CdxO+dqQEzr8hpNXyrbzkvZ\nolJGWrvWeNo190rYS/k7/sYq3nVnHszHHx1+7miyuBkcPUrb7aB0skKhbT0Q\n8M31XvWe71aHZ8TYfz7hvUeBSmEaPf0kv8PlmrXwOT/05CUxiqL7WpPHX17L\nw9nY6bdQCEi0WqLzCZ6teJ3jFxkvuBWZA89zQL6QB84TvH6/rXqu+cQNbw2Z\nDB7g\r\n=ABi4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"017e84fbad1f53f62db00483cb07fad0471e750f","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.3","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.15","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.6","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.0.32","@truffle/interface-adapter":"^0.5.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.6_1643493669876_0.30719029171941337","host":"s3://npm-registry-packages"}},"4.4.7":{"name":"@truffle/contract","version":"4.4.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.7","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"deea6d774a3aa08f7e14951774312cff15d81ca2","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.7.tgz","fileCount":22,"integrity":"sha512-327jjHAHmCfpmstUDVVFH4kLMpQh47/QyzKBiOkjaTX97wd0WrqXlCZYn1hMmcP08j4GnoIzvecZn3zW0xizSQ==","signatures":[{"sig":"MEYCIQCw52tyAlsR7R+YVcW+BDUoHGaueaPisCEDO4McqoLKgwIhAMeLIKVPvgl10efOhSakGwua9EqToF0WOsdV+KMsvRtO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31842110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/GLxCRA9TVsSAnZWagAAcIQP/0iJabX55Ms/TQY45Tmp\n3Mear5XyPLS7EGzAKKxgR1zIXRuudkPtQIyTcYhpZTIgjoOUXl4b9HRAMe0L\n4wv8roG2D79z9gagcJ8CqnpASRWdd6E3p6UZtUjAcxyzCQHu1EUWombQ3eit\n3wLlBsqjxKkHZ+puhkJnLb6yJNa0cVrscIti2bQP/SwLtrJM7Ifn/YaYWxlx\nbtql+mpm3KaxAE30O14Z6QfjFcNvDXdnKEEDhofp5pwBAoLMUekGUxPCEcD5\nGVuP4wwkHxUUeHboQUTtU78JVlRFMD0lMKZI958iSzitNVBIZHZwx0mLKT70\nQ+v9GzCYJOsgMSEE7W84tOmuwjTDdLSWt+bjpi01X94DJi60CVu1r88QK1N7\n2iMbmVrdfmVl0SqXq4me4KwEnHkmKm+UqKBRhipokYURT3z4dL8Ivco7Sj6f\n/GS0e+Tct5c7GuWs4Kg0tHqOyshW0apMxp4bAo/0CtQ7OPipF6Jz2bKHiWqg\nvTBxnsmKxAwj9aHi80Msl15uuCkEByYhGwzBVelHJNcLdYJC7ShrNdAXtc/s\nPvBICl2JC5fr6ZYmcR4NNILcCyF5kOMHxPEOt2/LK9A6+SLwrcgiiPnTbanN\n2i7v8/MQVcnKI8Q9RzihAWQMfqphHL709tw6EcGlWMM3KprTFVEREZzQX7+S\n8C7V\r\n=I7pN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"409dadef3759efac8265de7dfcbedf0c066a0a0e","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.0.15","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.7","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.1.0","@truffle/interface-adapter":"^0.5.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.7_1643930353398_0.6850072799114661","host":"s3://npm-registry-packages"}},"4.4.8":{"name":"@truffle/contract","version":"4.4.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.8","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e3e7043d1346db02ed538cb983913b982bf54410","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.8.tgz","fileCount":22,"integrity":"sha512-zZVgIJ4zbdKX1dWubX5m9w7StMpcdEXuQorSpPQ23SUD1RwzSgnRi9Iw2rmSLNbHcO+w6L6+JFeVzFrfmI/VKA==","signatures":[{"sig":"MEQCIBLEoibdu7WmjhDzHuf43cD/cFYWCqlP2KVEDbyOJxsoAiAyVSeFEiXZCnFlvdIwp8QYso0tXSrtMpvmyLAnHUr3zA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31859134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBbDECRA9TVsSAnZWagAAaDkQAIaETc7jypxqr/AR7a1L\nnBpR157R18Fl/buPJBsSfHGHjlKk0kqZntqJ07RAnaXla71pNnPDmmoPhjKr\nmbHZRNftfi1GGH5mDLLqkjwxas7GxqaVv0M5kvJNH8UubuiibOrFiEe/7rrO\nToBK+OJYhHpHVh8TuaKoy6PEknmjSSJwW+/2zdpeAHa5hvYg8Q0BMjXRDfEc\nzEXwpiFQWvRxsIuiUfdhubOL35BWteUbemLerY9A3BDA4rT7xRwimNoR/D76\nY+IYbnQrbaBjrxZZOMrx0Ai0vRK4rjkLCIKzYniV3bAjrDyd9PwT1up123dt\n2V9OxBoV5a0vZAJfQNJssCKSVAeEh324//prOGWd7y++YAKsL6223hFdky1l\nvfogCzlSd/Rci/JLU2s75fzhSYhqowUq4fjp9tg3cyx7gcf/9cJ0VJaWTFID\nC+4Cnwpd+4D+8FCxqG9pGMPyRnZhewGzgGFipZdvCcUdmQM8elR5VYoGEJbq\n8FMK2g8C/IJ/LK/9ZLstAksDSLu1Agtwp5DCJ5cee/uMI/KicP8f7hNlD/5N\nlbM+w9c1lnmnue8FFbP+zZZ492LBqd459rI9FBanmZNp+pOoNdfXdO/IgUDb\nTpLqQo7zbCKgnrpSCeo+2LHMKgFJvXioCAzRNwga50wUrlVibno0MGBAitJR\nj1rh\r\n=9BcM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"9a5337769e7ca9be112443d6ddba089f9c2c0f0f","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.9+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.9","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.8","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.4","@truffle/blockchain-utils":"^0.1.0","@truffle/interface-adapter":"^0.5.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.8_1644540099842_0.9954186883824669","host":"s3://npm-registry-packages"}},"4.4.9":{"name":"@truffle/contract","version":"4.4.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.9","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"dbaf7c0575049c42386fd2ab17e7c88d3469078d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.9.tgz","fileCount":22,"integrity":"sha512-LSIxnpFDr824wUp4tiw2UHmDPr8io5UnzjlZX/QKuNIq+BB+JPRmkzItjwtvWzzIG3QOAGiqjtIgp1U6Mab/bw==","signatures":[{"sig":"MEUCIQDFheLAF/18D5aT5ktXUWAykOkC5VJHQsNm5pvvtZRT9QIget2VPNcGT1MmelppRUx5vqPQHFk9fSd+OLbfTcdFSto=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32338661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDtGxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrcfw//TPmU+AiOOqbxwWIWAubG+MDq75ZCiVbcVw1lPQK4wpJT6GPF\r\nyDVYVz20/6gNSxmuHTH9l/UBIYyD7g1On6rHGZVSUW2+hvUXgcqdMdU56/pC\r\n3pX0B1+Oc2mqWBMc2c9MGJ+kMkiQcVI0W9ubLNFIbW0NFG65HFLngmqyKgK8\r\nWpL4RbEpK4KtLdT4ZlNXB4+k5EhIyATKXBimF4JoEOvjXyC4byLRw25JbKhE\r\nXhFxsFCx4CXp2Ir/JiTNlLo+vRvTMvcPXuu5HX4NSy2z22uaPuOhL81f4LUD\r\n6gI7EJTUphFj3GP1XupJ3CJfdGM4p/g1eb5KaQzjw/yXrDgp/EoeX9EQwGuA\r\nGzDPB6H+6PlNdqTqYf60kv5PWE92sd/ZZfkzmDlonB7x51dJ82GAviRMUylU\r\nmqJIB2mEmmLfAEUkV5WZuuXGtR5wiVR/G2FBzoHqJUg9RTqvYGUZIxPF95ex\r\nzW2bwrh4xSMFYDSS0fQnh39NQxRAjOa9z1y6Zx6jGITdZa0rEopu//7Jb4Dt\r\nFC8tjuawrR5uxUa/pdzWl5OC6He4bA7HX2B2LdgEXKfot/GiXiAYNKqFBEH0\r\nu41jFYV46D5pk9+2ZFyucSAxr5G7lJP7OmodrBBPe8UONQbVl6C6bTgxIEWV\r\nWgHJqAIDDn0smoWqg4WULKQSAKA63z27lts=\r\n=nOlK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"9e36563411876fbdf3c3bdf8b974b6702a3740e0","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.13.0","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.9","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.5","@truffle/blockchain-utils":"^0.1.0","@truffle/interface-adapter":"^0.5.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.9_1645138353512_0.02626001699303737","host":"s3://npm-registry-packages"}},"4.4.10":{"name":"@truffle/contract","version":"4.4.10","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.10","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"4bf7f803feb202ed3b80391020f874664aacbad2","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.10.tgz","fileCount":22,"integrity":"sha512-UsAZuVZ9V0oRNLR599VLuOQd5sPc5kjXRKRRGEYfB3mmnPfrJCnlSzfC5bzbGHanx6hmct3epD4Y/EFhoAit4A==","signatures":[{"sig":"MEQCICGzFlzgY5LHhLUyRS6uAuXC2HN3kh6M67glNWxiDRBXAiB2DdcIDYRTlJta/AVSnFvTuA/E4bOjYZdZQ7Iv7rq8AA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32324312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF+8ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmry+Q//czQAH2AHU9hPetpmKfaUTCyvy9aJTGzmRngyhnvdZaPzIZHJ\r\n1TK1JhAwyBJQCWdDsPjmqaiywcoY2nSHxgvYV9zx98LK7MrnCs0bu4VQ4vaj\r\nG7Oh/lmYnnd3/raIpoUT5vtDhOjLk6l1wsnZVh+FMECMTqqDL60dLVp2UY8q\r\nfe/tJf+4MwUgC1KgJXhsxwkxLtwv8/5DY24eqw/mYa55HyyL1SxQd7+oDjjc\r\nMo9/Fcy5zcLD2TbS/vLZhUbJ378/heU0HgIfo9a+Fy/wlLorL355Pw+Q6mmO\r\nJQLN0RMCGhAjqFss79Glyq2fkVWvgOGVPzrF7p7yGgTK1nEcBgBoLJM+DIOi\r\nWRxC4uYsJFj4GvuDkfsqPafuo+aCAQ5nuLRl/pqSUkYRy1ILzB3ARXEdriPR\r\nbAl7y+BC54a316wzoHv/bpRmNrLVNFFvnSDt9GAdCgv2+VFjqVt6AjuC4/NC\r\nuBHMp+bv2O82+73RX3TUDxDRUjIYEaPuvZWjsdLN27AI2xBwAYKkK4dQtLxH\r\nu6mvgKQ5SGGumxl0kuPkDaGkK3bp6rjWEyi/aAa/sfKQcingw5oxQZG4rbXq\r\n5HWPxeAgvv/EoyHbjiIy0/SMoY2toC44fz4Fs14pRqBD8fUJzLiOFQicsl4w\r\ngL/clavj5IfspQb7NTV6gMQwQX950YKid6U=\r\n=JpAk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a11dfb2b14ba273a4a2976cf8028a0faef0a3d43","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.10+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.10","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.10","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.5","@truffle/blockchain-utils":"^0.1.0","@truffle/interface-adapter":"^0.5.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.10_1645735705708_0.2562982447257478","host":"s3://npm-registry-packages"}},"4.4.11":{"name":"@truffle/contract","version":"4.4.11","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.4.11","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ab49c88e9448fa6a4a15e045fe5e5317b52406ee","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.4.11.tgz","fileCount":22,"integrity":"sha512-U5z2j3rU5JYkWeHGQL2518CKQE/arv7Oe3FVpIxUYW/d8M4F90P+/2edT/cRS+ftinMvD5svaI1lt6bO3xghBw==","signatures":[{"sig":"MEQCIDmy7RfFZWzi1GFd4QBOjRWm48bUNKCzGMKtHVkhr6FDAiAU7LN6/TLQoZmMjpj07RzlxJeHEeL8pFP2SPKDvs4JrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32090577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIUKaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXxRAAh2tpR0NFF1bgT0RtoIROYA1qwa7/z2h/mnA0XmLXlnsWLUJV\r\n7FcYt3yG9cSqHbFKBp1qAhIWW1chwNAh/+9nzUNkgPWp6g9y8Cb8qapkbQUA\r\nnRYWtQsZ/5m3RWNOEIJc03kPArdH/xg2qPVkZ2QW1Y60CkqU/eEFIf7IFjFt\r\nMeeyxvM8bzGWjNnYzz98D02AVzFm1H/ro0nLM25H97cMu6XoAQF3NmiZLapY\r\nmSzIXgArLKj9x+TqlnbjY0xFQJykLnmt7+RaUELMC42ivKJPl9ofuUWJkbQA\r\nI6WONl1FK8wtO2zakxHNuBrhD8N8WY9XebHu3qceIeENtEbS+GgFILQr3Ntn\r\n81rbOInmrSm6zRqQZ6hhHVigHhNgljElXAPKWx5vATJM2BbW5WyV5qx4DaQW\r\nLVJB3y2HqNEPxa8hRxl0qufZ0R7b6Memoe9MAzOZkCrTsxnT09q+CBYgPzAu\r\nhUH6Ylkhrh/NAVdcYVwfKUAI0g1jIEIhTbAVdus+GQYNzYG2Nm7uswL5HkLs\r\n0cxCaElBgpISFoIwx84ZAkFoMkoINAS/Zcz//Ue7aXAriBKyQuzk3LlbLrdp\r\nvuG6/W4pZRnKlXdUVQsygKdNdSnHrN0cE6jHy6hguFx3NGJvgHIDtWcoaTde\r\nzGg7VhpWuE7S8kLEq9kspAStaO8iDsGP2Jo=\r\n=Zi6W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"dddefbaf4811fd4652e57bde9b60455dfee17ac4","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.10+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.10","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.11","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.5","@truffle/blockchain-utils":"^0.1.0","@truffle/interface-adapter":"^0.5.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.4.11_1646346905877_0.502284978369602","host":"s3://npm-registry-packages"}},"4.5.0":{"name":"@truffle/contract","version":"4.5.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.0","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9ca53b888712da358713c6a2d99d1f8547501aa2","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.0.tgz","fileCount":22,"integrity":"sha512-i2sjrxGGgahGwVTfHG380Q8XveQoP+NbTlcKBYmEaeUjLloHIECt4zxhVp79e8svmtiYXScRytHbYlQdCqYRCQ==","signatures":[{"sig":"MEUCICJVsE0zp7PpSA2mWUMw2qeyykv3MSe+A+f5E5swQXFzAiEApUo1jluRS7+Y4Ett5Qxkz57FdhEXxJ/Mn7K1EqEmT/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32090799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKpYvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLCw/7B0W3zOhTZcwoulMJyBRL0njMD/mM9g6TKCQAr1YU0qxR1VKZ\r\nlzXnC7ynIi8XcKOiyrf8Kz+csZs1HOzpKAgvRrOm4xCoadwN+GjwPbHe2RPE\r\niHCCNtHRF5C6djWkMcjG98uk9jClL0q69TmizS4RKiiWicbchSPEV8l3gdq6\r\nzG2RHtuTPhs+OWFWTsyr+Nu9j3bS2M+xC7rvzYS0fmuhV6AtWDz9GaM5+504\r\n8cCfB2P5QUJeKn0iSW7+JndSCw38nPIY+vrnzCkb7AIlmmvw+VcNHI/KG0Fx\r\nRSwG4YliBVlT9S5P2jvwsIv0CpAcuZ5ijxc3Uw86FVmAv2dYWx6CPvUOvQQs\r\nc3P6vmjjpgrnVv9JnS7W41z5lLbiVG61nADgD2fzJIctmHFCzvTUac6HzXTz\r\nj385e1vMH8QH01BKUxx65vn7SGLYFlCwbpj5RYSI7krtPf2JhKYXYYd2O3pl\r\nXADOKE9swLf/uYHnVXgXoD3B+7mYj4UsAMciYLBPxoGBgjMCxzhRHC7pE+U7\r\nM2xLUmt2i2wXXlwKDJUcTs31jA80DQnVO3jQyk9td0bIYvuYfSY7X7isKV9G\r\n9kOy2YZr3nalQoLWq0d+cyABZlatT+Y/XMYUfV1X/NP0a8B+LlaiTXQ6RTbp\r\nnmLDObg1SVL0Tuz3IEO/gDs9xowou4APiJk=\r\n=w00A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"01c1d42d72564bf58b698742bf2ffe4ed0678901","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"leeftk","email":"leandro.faria@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.3","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.12","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.6","@truffle/blockchain-utils":"^0.1.0","@truffle/interface-adapter":"^0.5.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.0_1646958127000_0.33625387035758325","host":"s3://npm-registry-packages"}},"4.5.1":{"name":"@truffle/contract","version":"4.5.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.1","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"35f303c8e66d2b4a02bb69172cca308899191544","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.1.tgz","fileCount":22,"integrity":"sha512-r6MM42Bq7HdN2jd17ZQicCBGAhzOSyQeR6hras7N30nz2WTAi9GUj3vhprZ1lRiVMufOfc1H935jxsJz1hQipQ==","signatures":[{"sig":"MEUCIQDKYMf2y7LiPmxMpaN4eVuijzriF+ZEod+9mRM2XVn+jgIge1cQP2xsxeV6zLhGrLVE4Ppci4nLFdErg7V1svrcBWg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32150148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiM760ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnRw/+KinqXXeZZx6CdS29R4z2JZld82c1h+t6Gvt5F2Uzh7Clg8UZ\r\nTvJng/1U0LtpoKFGOENdo90kOn5bR4H0i0jCo10BY7LnoYzjjrTPEHopYgVR\r\nuZZP7+604J7r43aSi5V5nMG+Fn86136BdwuOpC2jLrxosZlv3YZvExTdMEzd\r\ncC247BHNxygYz9eRfeqvIwoVunH9rEgDycOsfmN2bnoL9H9Hunf8FNCg9ThU\r\nmVQ3rrnyQCWShIiH9N3D2IKI1jm+MgGl6b9bTgNjjDate15/cl3OUtnYbkE8\r\n7ZBZIbGz40Gd61dC1xB0vyJ4Y2q9G3YYOwAVNXmdw46/uViyW2op0X/SkUnr\r\n49H1KMfG3QEj1S5SNQnIgb12rF8etIsLXNBc1+fiK2k03zB4UvDQknuIsVho\r\nzaVPL/KgItnynASINXj2D+RvjwKWYxZdPwO2w/0ZmFPF5pRSOldq6p/EELRk\r\nJLtogYkUeDsp/1zIhrbqKfd5gO4DxYV14/aWQaTBpENR9K6G1IllSMPqZP4q\r\nVh0oQiQliRNAL93XNw9aKnMHVm0FRPNg5d2mMU2V2hOIm8RJrnL+DRL2FSMU\r\npdJ7gwpH2ssqm4vX6/YbSzJ7iB9CiPNcJFEfGY4P003BbpTiago0V36j+If7\r\nb9+T6acj2XalGzZONmN582JXH2HwfYGWkSg=\r\n=urfe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"125891668cab716d886b9d5e630a0b7b3295d2ac","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"leeftk","email":"leandro.faria@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.3","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.13","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.6","@truffle/blockchain-utils":"^0.1.1","@truffle/interface-adapter":"^0.5.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.1_1647558323945_0.830896316770765","host":"s3://npm-registry-packages"}},"4.5.2":{"name":"@truffle/contract","version":"4.5.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.2","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"770423294005a221824ed54b650eca7cafb450ef","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.2.tgz","fileCount":22,"integrity":"sha512-2QWs2uC5HQZxTvto2XkHyK6uzLAEH5Zyza5itMPW3Lc6IdbsjWTVaA/YCS+YJSFI3vplkR8NkJjXWG9//jxn8g==","signatures":[{"sig":"MEUCIQCaqES3WwJTBW4GvnrF5rt1gjM1cQutJ8bY0xOYORUllAIgavBSb64TdWP2mLGJpHztvSsBCYMkBJi3/uFAUmXCaTg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32150488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPQC+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqU4g//VQIXnZcKmsiI76JxM0YekTGKuYAo3v6FA4zwvq1V9MAETzVY\r\ntVwbc1Gqwvt7o23io5z8zR7G9ONXe3xGLfHdr88RbTmBYLSnlKyTY31n/aWh\r\nkvghbsvnx3mPWOPnQx5rcDzjdTRABnbClYGRvTv7zy/GnEZE/MTizXbHaaC5\r\ngR9mh5K8TjiQuIOkjjdc3BW4ilhKka0aIAlUMYCiKNxmUZ41ETJEJRqLd/77\r\n5UMtSq33wHveKG4x0G+V0rvG2d+SGIkQ7c+ZxgYXDlLK2RXbD/Tk9hg9NGi9\r\nLIFxrBwTBAQhSFwRO7m1ZFvoGjb0jiLsW1Po2cVgKyRq8qGFu2rZl4Dsknaa\r\nZHVBKx3ddonpLY7euDbg8dLXw8XD/4pshwjHv16m0fspJbF2I9Grm9YlVxwg\r\nOpBEGzs/Y9bv14ojZiH8UF0eqglxn6EhE2JAsYOanjm/+Z4rX0qlHJKWcaKn\r\nL3sPQdnWERH/R8mKDxc9jLthvMTtPVLCZbDe8MZus+h+lbjHAQOoMzu7R+op\r\nQH0iwoGbBlzS6GwhcfRauBJcWnIAO3I3ug4eR7l1DQR94bSY50eYn3p4LfOC\r\nMJ0CB2nUMX6ZlBbXVVxXKRZcQ1Ak95qo4H7o0hyRni5qccm0IF4tTHsjTE9X\r\n7wHJDf5I5radCJvfRBB095izQAmUrv/euh4=\r\n=1iBx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"e7396c1347e5eb5913ee52492d23e7653984689a","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.10+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.10","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.14","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.6","@truffle/blockchain-utils":"^0.1.1","@truffle/interface-adapter":"^0.5.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.2_1648165054361_0.38000755937912234","host":"s3://npm-registry-packages"}},"4.5.3":{"name":"@truffle/contract","version":"4.5.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.3","maintainers":[{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1be98374e4f5cd1647af303c02a46678ae238b27","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.3.tgz","fileCount":22,"integrity":"sha512-bJJj9kJ6rTEwiroWNozglakdIhXrHzsRdS2UxDPlBRWfN6D5rvGcBUZqC+8QnNqb3iWfcf8CmO7kWhj7OKqbAA==","signatures":[{"sig":"MEUCIGOqQpEH3d1NwmtK+htZOyx69aLCXtohxwfUpUhXvCUmAiEA2GAs2N0cHpR0oXaq38C3ZrqoZrZWU9FgnM0bUNjpeyc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32752271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRkoLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqrpg/+OswniG5hoko80Mt8Yg4hBLzBhYh8JyeBnaj/y0a4FQwE3r10\r\n3wN0I82T0YMVM4IQU3biCJ0kR6DrL1lFOgGEPyjm5dhKiYzOsoLbak9i+DgL\r\nKzXwUFohn0pMWeqSo9X5mSrpob6axrNfO3MHQYS9UC8GddwiCOY+DhDDgf66\r\nxTPu4gs+8qGL6PdnIdPkZb/54yGNVx+nB3qKdtO4i59gWr9LRFgvX7RVwM9x\r\ngUobBLXI9dA2hP0+0OW2a4Oz9yR0ZHchJ+idbdCD3ncc+EP5AXeAvRnEHmDq\r\nAj7RFqv3B3ClKBmIQHTMymujM/6QNLiw+UeJlHdTpqVsfEntbq6tD+wcIWHs\r\n/vXjgr6Jsxfn24WU4eMWPxgEvSk5bts8Sb/ZAYlQtVBIdw8KjlTJ4TypE4Ox\r\n4vDwFO6jUD6zrh0iPHAlCO6CGbeQNB+yyfBicccBLxtE2FynPj2pnUWtiqgQ\r\nU2sXsAAdELJiX+CLHat4aK3//mf/FpzUNG0ud1T62wHbqHgcO3MzqDoSd69i\r\n0WiNa1ZJb1adqDXTmBgtTnpSmU9KOcrOAUrFrTEFuEhCDcnJXXzNANpaBOMq\r\nwO280YMYyVQa3Et3ECdXFclQ9ypaewjwH7Zpi8fKQVfw1uyurbrNg1JaSdBW\r\nzC12OGwhQcK45RUW6lgWqzJLnQmYGc5cM0I=\r\n=woQ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5c7b580bb16ea1a4b42a5430574171a905cb8199","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.15","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.6","@truffle/blockchain-utils":"^0.1.1","@truffle/interface-adapter":"^0.5.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.3_1648773643347_0.5585524770104671","host":"s3://npm-registry-packages"}},"4.5.4":{"name":"@truffle/contract","version":"4.5.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.4","maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"172614d6fd1278cf06b7932621a8ca5074a2fe3c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.4.tgz","fileCount":22,"integrity":"sha512-DUBXP48oTiOpdeL7OQhstCMGQFox42/hchydOe2eI/gfjS2Wkx6Z3Gsxa8M69CYApdxG8WO3/uxyKSO4K2onIw==","signatures":[{"sig":"MEUCIEDe/ec0UmT5vG71AHT9hLk64HtnzLIZUdl59N7X0woMAiEA4J+VjS8ZdrDttjegusAo72YVB38mQE5EmAXd4eMd4Go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32756236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUFgmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkIxAAnQkVHG4Gs+j3GpvbQPEbvcx4gL6IXpJSen1N49MBXJkEU8MK\r\nmPiP7Nlmoc+UNT2/PeXhURjiVR6gPRmh6jyQto0IclA/s4noOeLa6w+6v02b\r\nXYtEcagMDykV3MA+cykq+hC+pQbAYWHtYHzHghr92Fa1t5PoS3s7sk2o9WPA\r\nC9o4+25bC2vs5la/KVcurEuRNP+Jl47U+vttEJKyE1ftka2eRolzA24bHCyw\r\nFPEQlnUy7bnnGfLj+MyAj1zb3nQE8rn//U8nA/7JtAsigz99OGivu+DEyr/m\r\nCSkwxpFU6jqRADBQXzYxpCaYLN8dT+UY5wNmn4iFO3DDpwZYS9MjnvoPBkGJ\r\n2EMMkyBpPoK+T3QvbY/H/S2+qZwxSzu92Q3d9zLKT6AwR+q1o0Xd0xMkztf4\r\nebOOsZiTfedd17E4hIa+vnlpHoFNQt5+31wB8d/wX9TsMRrKxEP+T6danE/0\r\nJ8BVUfmkMllmPDUwCYtv7LtkExnFKuZGZ+k4Vk+dAWz4g7k9uTAtR2SP19mw\r\nFc7+Oy2gvD0wR9BhWDIopji+lvsvjdN4wtMLwsurKi4PfI2C8TXW85zGHbkQ\r\n9YhwsiLdbLj8LjjqZVH0/z1C72l0DWv0R5uLSUfGRHBPK8kzEaARknTj8YY/\r\nyAC/mn/hUkcDmFo+GepDhyfnNL6WtA2ddDk=\r\n=F2Wv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4900bd471b9fbfe521aea280031bf63b8a9657a1","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.16","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.2","@truffle/interface-adapter":"^0.5.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.4_1649432613950_0.44430402017850246","host":"s3://npm-registry-packages"}},"4.5.5":{"name":"@truffle/contract","version":"4.5.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.5","maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2139f47baaaee70c5e5151f3e0089ed4df62f0f0","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.5.tgz","fileCount":22,"integrity":"sha512-CAG8UTP7OpCh+aSkMt+nYe6PA7QzZcnbAjFpXOJ5JSjLBlCNzu/Mh5zNG03JyVl/uIrCZzG6WIKpV7f8SOlRfA==","signatures":[{"sig":"MEUCIGJ2kcrc92tUENCppnUzZ/5QwSJqV14c3VVX4jFm9zhkAiEA0n0J172oJiV5fBL5OFjXtZmdIAOeAqprNtMIyfxcrsw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32756615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJZxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8AA/8CQlD2U4IbRw+msW5M4nP3TJ4QG7inFt22e7IzSydApwHuNV1\r\nP7yaDy8jKBdMvw65WoJVTtGVtbWjPnSsVGIvbSrhwD2BWt5jTZJjMyRxgwzi\r\n0UgD0aOebWHQKSxsOHJlREL1dg0oWfDoB4zTpDyNYQB10vml0+hdOJ28sf6s\r\nuDxMC7CKXGaTnkATN63pr/vMmpJ664HH51INy7jeVdiqG5jzGNTVoUygv9EK\r\n4G43k6J/7XKxiszmDlDiCGOQxmM+X0or6FN9tO7qfOj5bpVFKEPGc56gqLBS\r\nEQjvKv90gDoNEejOYpXIeSkvhGlnAxKxuuLu5erXD8HO8lvkflnjaHV2KgMg\r\nk/3+fXAXsKeAwnegPbyibgx9TwgHhdBcpKGxyiOfeTU0c39CVab62Bn1eP2E\r\naXwXuBFwcTc6Bw1mRteqKaTWT3W7TU1ibe4tWW6Tolb1Ibc0yCG2lrm5zfwe\r\n9t977tfbrMcvkyIuwMiJ4OQO1avg04e+rkHXLet2QnNsnOX7n3nVhPVrEOjI\r\nf6nJQ8ukpktrsSXtJETINs3PzytmDSvOB0IfCyUCQjQwydA315H+hysoFqZI\r\nyPafDJzJi8jCr+QBNtZPjs1BBrF4Vs7yJ7qdNUCnSQaXCsNhs3VpZUn5gTZg\r\n60SMxLnt5Nc/l0N+7NfdeoiF+1mZW69bsmU=\r\n=989O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"567fcc73e136b580de173f1375971c944cc6ec45","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.14.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.17","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.2","@truffle/interface-adapter":"^0.5.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.5_1649448561301_0.06610478439975553","host":"s3://npm-registry-packages"}},"4.5.6":{"name":"@truffle/contract","version":"4.5.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.6","maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f8cc8b216c20b0b74729680c588bba9e0a78868c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.6.tgz","fileCount":22,"integrity":"sha512-Io+hwP4FRgsKz29hOCu2NTpu8b6mOT0urcjPgFpvRK2pUCl/E8WmggX3uyKtcntxXjtw/8tGFqGqSwHCiUcpLw==","signatures":[{"sig":"MEUCIB5JDE22203mgiAnysM7lCKRNIlTlXRAgDrarVInSv4qAiEAzoHq6ar4ZJYrVUY2ShbiH45+7NQGgm8ZCVFXnvOrR44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32756631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiV0kwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhXg/+KOHmQ+uZEZQRdA9G+7ej2kQVFHE4XMqLwp3iRu8OnCtmX2C6\r\nS5TPp8L6FajTABm4B45odGEDGSVrwP96zYt/MpMhdfCfZ4MEyWMt7/dV3FCx\r\n50xXWxMAZHBc4WL0zUCaT8BQIpU10UynE56/pOHngbt2/1hRIp9d5aaDHKHg\r\n3IeiGVyWno+vSEBeK8Z9U0JpkhSDJ/pJOSUHoHlmSIKMSgBEkf6Z93NAUfcy\r\nizFqiOGIr9EqaBk8CAtJNcrPexQ26f1PsZhh/gwQSAjUKvMYgj0UEgQbnFTd\r\nE618dCHf+vfzVPaOWG1qNIDrCgRYohzdAdsg9yaRUH8Fw2HI8+cR/IYIpRV3\r\n37glU6kJHTrjl3nCbwWs77cYyqlIPZNZ+nYRenriEHwfhW30VMF/HUBz68d9\r\neSj6CmTItNUED7ncGkX3om1bPGfZniOA9Tho297t0Jdti9kgEpNtf2YgnRMi\r\nHnXOU5w6Z/Fa7NlmvHBz60uzTBxNiBvVkql1vUITOORBP6ZexHSAaPbLGjIy\r\nf3X/poM9RDO3ejy2VZO03EAdQz886VJg+82dOHxosMOWyOiozRJTYY34V/Uf\r\n5/en2UNdUYDUsig2CUpZHrzXfBn5pEByCth1iEi39Vx0hNZDODK+5yaAiaOr\r\n0pcjsq2X9FDbCe78vNbLPGdWJFTnl3BuT8A=\r\n=NiyN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"147aa1388aeade0ee164f2e62eecce7bec8f3332","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"leeftk","email":"leandro.faria@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.3","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.18","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.6_1649887536442_0.35837907100407196","host":"s3://npm-registry-packages"}},"4.5.7":{"name":"@truffle/contract","version":"4.5.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.7","maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"464ac9a90d76c479ce705a8dbf330dd8dd8de2dd","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.7.tgz","fileCount":22,"integrity":"sha512-OAYebW3SwOpsfobGq4uC6ShI9Lzisg9CUGvKyjnSNO2eq5KbvDn9xVFB0DHS6xCLfQa+2ONWeVMnxLtIcmbUig==","signatures":[{"sig":"MEUCIQCJuSHOO7vcmufG+d7LTHPpa4SFegT2e3xyWvKv+EpC2gIgQJMzhjgTCWoKDRMyiZTYQqk082R/XtnyJ19dMQdhVkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32747356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYdnqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprNhAAgMsB8mK5ES6UgamBLhGJYNcISu65+HCjMIql8oR0swA+X7GQ\r\nbFidI+QBiKanAj30Kf+GG4lReiAvCSIy5yS+jzAB+fY2kaR99SI7PTOCDQWM\r\nIyfWXZfz3Hy/YhUKmiyjA62/odzsIkWv/fAX1yCzZjtdHd5e2W+NF4VVd1Lc\r\nyROvr4JxAOsDTH/RJPvGKKw5Ws4VeuHALiGWcMJ9MsEXY7yp/WYMazGEvLHK\r\n4/BtfnXyu62Oo0yIsRfc3jWLMFZ5R/MDDWlro0T46UW9/68KI+juZ8lBusyW\r\nPMobgEcU7rSsydCPnmCArSN01hs26UMsuwYwzU/bzUOUX6+jJc3c5q55qJdk\r\n2WQRFCyux7UAOOo5Oc7m3jLWHvzt9GCmEVOowpJAVwD9hwjeRbSkPztG039o\r\n4hFtNye8ibcGhaX/JE2oD2mIdRF4823uT6IXHIWMYTfbe7wedMX2USmRrtC+\r\nVE9keaFX0W9uJnftsO4BDD8shN72as/DzRTtxKZeJmbKphgTo7DfZ+cNtNsp\r\n3Wyv6Th51BGP/5roVQEXl+Y8MGs3h7jZhcilx+hBIfgbBwULIu2EV4+nYCzX\r\nghQg5RckWWi7mqtPgzdKzjdwzjuceRUSCDSJ9Kkdlfo3mq47L13KiLIlDW/4\r\nyH6tyLGOiZBgJUvShH/kxMN1Mc3A+0l3N/I=\r\n=a9M7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c0eaf5b39003c8b3eca47172ed4beb8183fe93d1","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.14.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.19","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.7_1650579946571_0.4686411130854833","host":"s3://npm-registry-packages"}},"4.5.8":{"name":"@truffle/contract","version":"4.5.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.8","maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"749c113e6776f5ffdeaf11e1824e31f08df821a4","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.8.tgz","fileCount":22,"integrity":"sha512-jqy9CFCw2EmOlyel+XQKK1ckv4m9i5Ag8pM8Mv6J+Xcv9lIE8b+FxVJAUD09Sad2OdOFFHw6f++MVPfygmTZ5w==","signatures":[{"sig":"MEYCIQDfGUUber+y7rY4aWfqND2FVJendY0dXokbuJcQJwEboAIhAIbC+lmtyZXbaDrblrNcQ+PJBmM1mMvTN35YTlMIlcYM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32741113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiawNeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXvBAAlNsrkAV7vD0RwoqpM5HKbmNCYAVNoB5oPeHA7TXmzkVpbLh9\r\n26taKf9QalOmE0CSGuXwWoBWi8PoUFJPQYmUT8JUn4I7Bs6wG1oWb7UD+THN\r\nD/UWsQMJd6887PX1+gvUpt8sRKu/cqVD+7n0SGil8EUb7m8HwdQAvKq5W4QN\r\noESCzU46tpf7abLRRHyDaJhEp5PuxaWcemu6btMGnfOGNC8nCceIdcvn/QUO\r\nDuduc2aplZiG2+jF4rIdIga+GI1k6/pjYmETYxYBcyFrm5gcyUT+tZPyMgl9\r\ncJgALcte/jVoHI4+V3M6trl3a4KU6zcFjX5XQKA7CSh4L+F56s0l7WvBG7jC\r\nrxLsA60fTT6G8KxNMiYypmyBXmol77hvxYBQ1EY8bYP68yVXGtVvEw34r0tp\r\nBoDZzOkDSzIonu/iI6CFBgc4s19+e2ZnzlbUb/zZVGQAGLr9Mvw+ceLDOPv+\r\nKlrlEWhnD78KIUY2QJx7sdrehKQ4k+xLvG5ze1904pMpzJIjIprpUXy64yjD\r\ni//bggAzlDJ8ghur8Fox8mCJkNcJqGrEpblGFE15Q3R/0Lp9yIROpFdmdV2d\r\nyX2nUr0iNKAoT2K6V/SA7UPycyGQbVS2831pGsWBJVHueN7L9AmBfHzVtlzq\r\nWYrXfcjCeH2oYbmqPe0xPCIlBkDfYX5Nvhw=\r\n=64XW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"1fb5559aed29a3e177538d8118f06cf848c529ab","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.14.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.20","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.8_1651180382156_0.47127521689530405","host":"s3://npm-registry-packages"}},"4.5.9":{"name":"@truffle/contract","version":"4.5.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.9","maintainers":[{"name":"realcliffzhang","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f7740eb502b0cc8de14e8c453cbbc92952e2fce8","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.9.tgz","fileCount":22,"integrity":"sha512-XMdKHxVl9Tl1Q88rslkYAComQ5FU25cFGXi6pn/7qBzUCA6C3cRSobLa+uHs3uyam8XUc+eOY7DnKAvkrzWIDg==","signatures":[{"sig":"MEMCH1pwFw+DlPG4gAHkllldwzkte925JOvuNLDxqiupZHUCIBrXeIkUXtpJkGHowV1/xhR8xt6xrXt6uVf9zQycPZTx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32732015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidUV4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqq8Q//VPcjCz2/LGH13qQRCE5tbARyxmvRLNU2qwSDFtn+9ykmm4Au\r\nRFHaqsJVeYphnN32Z/J7SXmpVb6ofPKRH9b49sGbp2byhhhyf4cc+mWONAHG\r\nibvs31JpCdaLWwMuslXgtJ+kmLkaQLn4n1+f2hywRJEFoHfPEPLQ07Kd6ZWS\r\n4iCCiLdMzW7U3H9EV6IIcKBj/pbG3VKpj5B0jm/CaIXbYLL2owPjhL9zfDIN\r\ntGaylgw6HFsKAlrbfBmBpkcfcIX4b38vWCRxawk58RmO0OBXboz9zxWkH4JH\r\niz0GDVupI3UZGFzKYO3xgFlqmh3zl5ULEYnkogXah+y6sfMTujdfPeMwqmQR\r\ndbggF/ddYJu0UFjA0ldarNLO2bu3xpRbFB4N+Vb22LdStjQ1/YnDACf409jD\r\n1LGS34um8/xQnusq6kpaqyuGsmwDuLhLqnLvMf/TYXyU93FHqDkOV4es6m2D\r\nzwuFqLNFWyPAYS7swy6JOxSuHp6Z5mjPeWcRSF1YacTfi2jutfw8XYSb4mNv\r\npub7P8ZXyK3HO+jykVqpDrweu9AB7H5ZTMkzHH9HjKhG116UMLdUbQkbXi5A\r\n7V5DGf23joCb9ocI5sjOdbxBMzdTNxTvMnYyzsNjO8X4emM02eczwcgJKAZY\r\nEZz6mWPIeV7nD2kfwAEmfmZvdWTuM7SmivE=\r\n=Iaxi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"50e599b68de8e967da8044247cd24ab6cc5bb8b6","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.21","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.9_1651852663756_0.5306735917517205","host":"s3://npm-registry-packages"}},"4.5.10":{"name":"@truffle/contract","version":"4.5.10","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.10","maintainers":[{"name":"realcliffzhang","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"4c646e94b277ac33163b06bf6903edabab0da495","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.10.tgz","fileCount":22,"integrity":"sha512-Sz5qn6HmxyCAG3Sig2uI9ZFWncKBuk2u0qi51ufsTK4Ky1DylFwZH9dyimmxoX62gvCpCPt/NPjlk614ubbmUQ==","signatures":[{"sig":"MEUCIDS1deZEiRa6kvFBCLKMz4e0CAD6XNXGj5apOBjq3b2kAiEA0HHsFMYpoSXMSj6CMV0VvPu0HM051cUcgqr+N7+vGVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32684428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifdcoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo24A/+JTheHU6bmKLOOJO6MPSK6HQRO3nQDm9JA/I+RSLKg0gF8DQR\r\nd/dLi2B5ulqk1SApcaQPPSvF/GPE03qRFHMslO5xT9Ye4O5bqbNEIuCaKmrY\r\n9ndmSIqarqMCyGfh7UybzhqO/cdjibOPeMdVR8bLCcZgV20xcjxF4YpVL9px\r\nzK00g94x3+R3hrVDq9DYy6hQRxOGZgp6spuay6nycKfAx2w2ya6+JJXP0P2Y\r\nPwAajfUIVAxuiPm+8YTbnzI7gS7aYh8Wfx/zrZphtoc/2di8IUjDjS94oQbI\r\nvvrCXRr9fxcnuXgV/26QSffLtuZOfpA7tivaqrs+6GfdPctkfQC38MnJBrPh\r\ndAQpWq2bqmMjC7xugZE0sAVpWIBePT20tExNvaLNgQZWCiZjzCs98S2A6lo+\r\nLnfUuf7mWyFrNktQh/rxufe47Soj9pT46KvNrjMC2piN2qA565dBa2E3bWIe\r\nW4GTP3B+Owb6paMnu15l7Gr24IP6RbQOYId4zZiyHvmWFw7KNZFBszv3+nJK\r\niIOZdcNoeg1Phui68N+fzYu9hkySIigihWzEJxJhbSAwxHT0ACiKk5sx1QLi\r\nzZKw+n3nm7pRBHOQ6P4WLEibK5v1emJUstGl2W3zAm2RrOjQxmpol3yfQojS\r\nJOsF5nXQfQEudRA5qsQVWlnGo7IuJONa2IE=\r\n=MmVB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"e0ca0428893fc03602cfa59ea76983d1fd53252b","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.22","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.10_1652414248096_0.7489680418150033","host":"s3://npm-registry-packages"}},"4.5.11":{"name":"@truffle/contract","version":"4.5.11","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.11","maintainers":[{"name":"realcliffzhang","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"6a0d658573bf971fc530605c28bd6daac81e7cba","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.11.tgz","fileCount":22,"integrity":"sha512-l4kdqxM43dvTd2avGfnBEIRY6p5uHTHPyeUY2dExNPSoVbUy6KQyg9YhtqVGe3ecHvVUyFqmlyFOeTEvqRw8xg==","signatures":[{"sig":"MEQCIC7U8N6Wrmb8gLWjYQSFPUSPpT7Nq4GaSwLf1mj1acusAiADk7QtduALAC+3qlRBCKa6mJnRpydPm7qv2/ep4WJNZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32691635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih8NrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpurw/+Jy+Yytv3AyvhbUdKbFZCVaItC9EwgpFdM7QpA9CcQ9UjODYx\r\nXyeHP10WHIt2JtJ0LLtuw4Ln5s2ShHH9QjDPhLhGID4ZXKnNtxevymrZVAuD\r\ngvGM29EPM25AhcahmvTl652CplYvevdQKO08ChGMGF7gMz4EszEExKpaybnO\r\nKypp6v2GkvT5M7GXmLpW40B5O+xINZKhWi5gYco/CFBr1zVtmDIgVan8uA0u\r\nHHv8PXM2qNN8Bskbm4tuJefNwC/5FRyHZ2px3FhUxORWdlVVs91HJ5tU/IS2\r\nZHs/l/NlGsapZ8RAKkdtg9+EmTFhWfowkIecZ8LWr1Aca0+Oeqc+QarBCFbY\r\nM8eX+yKI+Egjcwi+0hB2wsvA2XBAjFrHs+wdtOmi44O61EPz7EEj3AZXs0Un\r\nOjQ0G7XkxNWWhI0ITFMRI3QriUmeN+eKW+IxAD8YnlZZIG37wxRh2XVmbAGV\r\nkUdUXV+AvPvPJqdOf1LUSoNfziHnD9ureTtN4iSJZ5iYpn6friwmPatSDLbz\r\nY5MOxCIdvc/0B852KCXzWiMB4eV1Ajp85zUrkdp0iDsLzC1oxbLeDQJOkH8c\r\nIelnmHQV7GLAuTzkVRsb18lw2l6CorHcJ/vvCOoxkPAO9py05B025TCO3uev\r\np6eh1jo1EvGClw6ESWb7Lzv5/kyFCPiocJg=\r\n=MhbG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bac1f2ec342aebb88c14510ca6ca05931d13af8b","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.15.0","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.23","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.11_1653064555184_0.5421667147364098","host":"s3://npm-registry-packages"}},"4.5.12":{"name":"@truffle/contract","version":"4.5.12","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.12","maintainers":[{"name":"realcliffzhang","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"91665e6cbe3066d4e1832a213e645807a295244e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.12.tgz","fileCount":21,"integrity":"sha512-y2jQcBXsrPO2eo8yhAKRRXyNaFKCxLDU3cIViV8DcmC/xDafu/ZfIsdJNspsfslM1C5MmQwNW2r+ufylQtTQXQ==","signatures":[{"sig":"MEYCIQDubbGv8ZBd1KZcU+O6uRnoLtXZ772vky19u2v7FECZGwIhAOp1nMvlVNux/tieHiHh6zAdoYwtSui5LUpkyuneQY0G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32746847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikRcrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZ2Q//bMNHxXZJ+kKRsDAdUhm33szsxS4ArWJMQBoCFaoxQj2oIcwf\r\njCmgKUNOsHgsBkgOapXp9s7VTUjJoYr0ZRNq1fA+D2b5twVpJNk2v5WIJVgW\r\nWqVLsYGxTdEXn0ZNFWcHpDiOwKZ9F8HaXuhzxwNDn00vhmEbmTc93K8fz9w7\r\ntgbnBfJJ+OAjzAZxSdA/8I7se+jFRW4Xjwg6JOf9MTq9Mpw68Monjzcq7fFY\r\nmoC8m2YGrnYremKEin3ggRfp5M+4A2lXbSv7+7H4eBzR6VJLd/0s2LWOuM3K\r\n4o/XKyLS9r/vkmcO1YO3SxeYLcACEpfFc4rBkOoUBLgDJqm3J0AofvsHUZO9\r\nhETXxYDTUAtX6b3E2R0zlCz1LELwXh639FqFoYJLvDzYRzpPMAuUxSLv8COo\r\nUNisSLvSY+nHV3/lqGe+weP6YQfA17X0DkwjpP5OVCBhearouoIsZhlinOcS\r\n/m4MbquLonVleg1VFjWVT9XGB1KuM+0SrmsFNARFz9PNQWu+Pv42k9uTAaol\r\nuiX3/YTB0Bs7bX7xKZQccP4fOawiPM5bXBjbSu8Y88OWwxIFswtM+wAz5v7D\r\nhx+/ufvEvflZlvVLwJHhtci5c8uAWog+om052qg/tnjuzNgE5y98XjjFvdc/\r\nnaNXR6JqhRNeZ5dhAHeWInBkZhGOr78dCV0=\r\n=w36G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"742e96e3df364e876602fe8077945c0e738585ab","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.24","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.12_1653675819430_0.052715535200554386","host":"s3://npm-registry-packages"}},"4.5.13":{"name":"@truffle/contract","version":"4.5.13","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.13","maintainers":[{"name":"realcliffzhang","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"36affc34a7437616ec878025b48167627733c92b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.13.tgz","fileCount":21,"integrity":"sha512-xh/YWoNxiEcH9dqiLWPDLb0F3JZC14IxHjnLLdJ0tFQ4BGEgmn3/NLBz/TidF1f5jbGi6pRgobVMMV9x4V6HHg==","signatures":[{"sig":"MEUCICow0ZpOYntu/uYgSTM/AX24Tc2XNpc45d02oEqzvESUAiEAsOHV9RxpNrecx2273+LHWnoAyWu0DJdOOEc2KeljuSs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32746370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimnuiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1rRAAn5jB20Q0HdXIMrNCpxiJnMyrnlfNwGAgU/+tjt+fnaz66U0K\r\npBT1ZWCeMQtrGxC2kCtUHhGS6FSgaN6A5fJpjPdLc76GQPYJCAn/5O+ziCTN\r\ntHDI67lPEJbFQqisPMVgBILq6zr/MtzdokAdgfB3VDMwEkFitDANv+BS4kiN\r\nZNgJwtFgjhRI5i1jYbe/jyX/vnuATJba3+Yvf7w2d/WTd0MTlBbGzNCLIC8d\r\nMnTDxoFQJH0nJq3FHiAMU6sxq0MQ6kjEBlnAxYZ7Iyj2lXaOhcPqh7nQUxO7\r\nb7jQhGTAPMaxBk0gIBX0WEwjg5lHFpc6kUZIip/BhtF6jMYsPk3XmgRoRQl+\r\nsrhMro8mBglajxHzoNdmnqh8SOrwBZOuIcEW9wrXBp7R/BJZYC316lMC5Ooa\r\nXBs3fka8DJ3toUvYUAhEwXMzbTKQmZL+3FPPhGmTc3lxP21FN0FIEv2iak8v\r\nEGwuNiIP3+0uG6eKgnppuLUpR7p6ZO/8W7+s7fQ33EfzQ8C80prbcssVylEc\r\nlcxdRnnvBlH0yWnZe6uqLEPQFJMODAYkb9XrjXWhMRXw/AlSTOlbxZQ3yZMZ\r\nNdh4uRkhxfigiaH+VwVk865uSy/zPPoeYlT8iv/XpB0DNsOLM+Hl/xMvYI7G\r\nHmIzQvQQcn472NQcbjW1n87aa9aSgqMr3l4=\r\n=LZNk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bf265bc40e41ba4e6260d0da7c61184cfe9c85e0","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.25","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.13_1654291362252_0.2804053596974567","host":"s3://npm-registry-packages"}},"4.5.14":{"name":"@truffle/contract","version":"4.5.14","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.14","maintainers":[{"name":"realcliffzhang","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"39aceae595bca4cb554be9fa24d2d9931e4af6da","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.14.tgz","fileCount":21,"integrity":"sha512-ofdH7As7d+uyG+6wlZWYoBtN/Nb1efyzooHym4du5Hck4l+EHm8brSYZsHPJrEBA8UN05jYUtBrjUuzbJ/eq0w==","signatures":[{"sig":"MEUCIFDWL5sMlzb9VroodCT2mmN8Zbt/nwfqS76+EmgYgD9eAiEA8sMiKuXbAhMMF5fqHcHS2XQAu8HkM3eiu6HbY51UUak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32759625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJionYbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpApg/9FSQ2hj5aO1PjG9he2jXT+jVlzKG8hUjv9vHv9FPr62Zp1OQ3\r\n5bVWObP7GjhUbYmoXMNC78m0PM8UFPD/KS8E5Vcqe+e8U4n1b3eHib3NL5fZ\r\nJZSZGghQhg67qdIY0gqqgEbJAHuu9u6HWJzPL9k5z6zIwyKj/0CNflAgYy6J\r\n8Cz8TJZBZ/Gg/p8riKtCnhxj9CtcLhSwDJO509ctcTp2Qfb6JsK+wQ2JtxP0\r\n1FpTqHX60nkw6785ALoIsujhJWul7L6p3RoTNBh90zSWTl8UM743dg/b0kB+\r\nZVJd/uNyrQPA70jGDlgW6BA2doyZYW9K09Y1rMK6iWexkXemmZlcMtGZ1zlt\r\nuOhWcgbJfIZvW8lsEnESZRdlc6yPlLpwhMxHzrGitpqMt1WKbANPhaAyCDLK\r\nkwAR9LW+AoNfDNUcn5v3Mkd4xQNtZu417WNHCA01iLwJUU7NvzFYoQogPdN/\r\neBwQEgd0cRDcp6m0nG2jLpw/Abq4ZfQrsHJBa3m2E0vuAUQv1j9jZbLi81RQ\r\nDiKep8Hb1djaF9jxaetdAZqbE8MaeqbrvCNcBpT1SbAkINd/m6rWEqeTYNlY\r\nXLM1ooiOgesuwWwyrOIw3hVJr0lsKsSGoRVsuM72zN0SA6o72eA7tPYvuQWu\r\nWHOeuv6kMEJnb4k6QB9YlRhQi1uwi20rPRU=\r\n=dp9l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"059f3eae37bf48b9732a112c5592d63e6516652f","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.15.0","dependencies":{"web3":"1.5.3","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.5.3","bignumber.js":"^7.2.1","web3-eth-abi":"1.5.3","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.5.3","@truffle/debug-utils":"^6.0.26","web3-core-promievent":"1.5.3","@truffle/contract-schema":"^3.4.7","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.14_1654814234583_0.9105038619060837","host":"s3://npm-registry-packages"}},"4.5.15":{"name":"@truffle/contract","version":"4.5.15","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.15","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"83523f42ad7f58666e0cf8730fcd75826bc2f374","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.15.tgz","fileCount":21,"integrity":"sha512-mjECzbT4XyZLk7SXo2Xr6LkTP50846AxaK/degYtqeCi8hLRRZm8wR6jpp0CmvFk64qA3OeYRq/xXgvgSArk0g==","signatures":[{"sig":"MEUCIQDaY6HhGh2RYIQYYNLBfO/Db+JMobdSwbvcoPClIHnk0AIgMk7lQFqtSuZygak+0wSftz/labbtZ+EjE/dtjvjYX0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36488848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiv2DTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpuyw/6AtxT0coqPT5+XixlBLn6iJkPbDE8joYDnLulFAfK3taFmWHF\r\nJIC5GupPIPGs2MNuDll2cQgeun6jn+i2e+wFjMLhKAKWaYEUzWx/juiNSicW\r\nw6ZhMo+hpPWz+2i1qU+qEffgeQLuMeDCzpSor9eXbw0b2XQoAeVIWYfOtrNG\r\npRvo6QTbe4dJut4UomtVPKG3NzAe8ww1iquTyZnOu12l0rnWJiQfIVPC3Lpp\r\nBf0X/Ik3hcbKiTtu+Gb0l1sgnEmkbIbYrKhsW1s38GXMfDroF2Kk/rxWAgv8\r\ntVn8ir9++9xjzac1NaJNVwMzZvieJuTz4XFhoKwvOZMpqRov8iCo871xKqhe\r\nK+LgTKTiduj3faLzQv/rcwVZ4PSax52FT09J4/hCnV6j36QPac0hMXMtFIDJ\r\nHVQ0mPKOlp/09AeTsoSYwoAbkjtPQ1lSry9iQnYb374kQ1w1cZnbTOBxXDld\r\nMISWZaoSCPMTzarYqjGGaNQfcf2HlNlqzMC5bmpGo12TQ2HFlYgD7Vw53Suh\r\nYiPrJRK2n7GG2jCqGsSvsg+K6IjHiK3rMab2HWrzV/FjfSpHvRsvXKBg4rIn\r\ngOUNDiehYBb0/aFWLdDZuZk+eMlxL2n6laLu1SH4FR1E60YQw2M0uUylo15Y\r\nyNsGEyvMYZG9xH2y64jmqlEYIcrGQpXqvHI=\r\n=cIK/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d30ce8fcd3a84044c04ac7466d4b3be2b4e8ae48","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.27","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.15_1656709330887_0.4147258916957688","host":"s3://npm-registry-packages"}},"4.5.16":{"name":"@truffle/contract","version":"4.5.16","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.16","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"0d9d17e48d7aa80a31566c93d209947abc6abc71","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.16.tgz","fileCount":21,"integrity":"sha512-2w9XusY6Ufpqn9TnwtXe+YQnoUx+0ERkkuDvD1UMiK40ACGdY1GVPXa7LlA6wRQhqCS6KPi5IWwLakBzE2USWg==","signatures":[{"sig":"MEUCIHk4nljMRs8OIAOWyUFmYgLJRVCRKnpo+vd+amUbhtosAiEAmDLf/upGJ2SKRagRM1pSHrgz87DtyEjmieux61uLMIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36462202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixz6MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHpRAAlIW5kmClhxJD5svhlJBW9QBJAiJ+ctyq7pSGGrUWUW0MSMWx\r\nBWRVb+maoT1e6HmD0LtTcoZr4D5tiFR7HJNeDEsFPRp5kuhPde8mlQaPmevY\r\ncgrAqv5fXVG8lZRD/8NNtzNcllQB01YRrqkHVwSYNv+CPkyUbaibYsEVRR94\r\nELX9fj6gShtrW9UBAC567eGp/dQ2zDbTi2RwtT+sKscxX/UglU0Wc6UJ5khS\r\ncuQZx0bA7jAMUHeIzukDJpseq4vOG/CO2T7kFK8uiANzMbgKDf6SV9dhPrOf\r\nGFWhz+4UJ8B5zGHvtsltypzaXUN41AYWb+5JSXYvzU6D7h1Smh/Jpl3YSMsk\r\niuIClc9ShvOFNitMB5b3mcQCu5wjKeXoQG51xj4Iw8mTsy43nwX70V9folGj\r\nEVqYSkDNK676ou5zDMhfzv7iRl3mazGxroqN8C90vEJS6R2W23Tl3g6/p2d8\r\n6PGnwoXWuWTKLfwBJCokRCdnz4htJvMcmUIOm2ZkvuqunBatBrcWRCxqg329\r\nulYerGVamiUToHrFOEWRiUP6Fpl2Vx9I7uqnDtgfYa/QbUQsNkAgc4sE2+eF\r\nN+6FoZgXB0gRCk78pIn9Z1DrxazOJh8++KLyzkI53dNiNF1PlQD1u5RNJEeO\r\nYBn1N5xhNJ2dt9+5w7iufw3VFJcuj3kHbAA=\r\n=yQTq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"0c56592405573ec799bd9a295e4d0c5310f4f532","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"typings":"./typings/index.d.ts","_npmUser":{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.16.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.16.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.0.1","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.27","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.16_1657224843664_0.26207253157826127","host":"s3://npm-registry-packages"}},"4.5.17":{"name":"@truffle/contract","version":"4.5.17","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.17","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3b5c3f5844c73ca28cc3be2ce9042e25f6b9733e","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.17.tgz","fileCount":21,"integrity":"sha512-be9W4GpJ5TE3pBBQoge9aQuRgqZCExkQGkF2anM89OgDl5RLIMatto2XrWENKstn1/iBMStDsfZzlawFmsvCXg==","signatures":[{"sig":"MEQCIH0klNNOr3eHxCj2G7E+IpGEgMrPIHxcnVoZbfoaqb6SAiA4x7Nhym4+LaaLeInuhZ0lX1jfnYBXOerNCdXlgcOIag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35927919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0dM1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6Qg//eObPVPxqRwISEwk488g9cYG4l1IifCwDcAGBF9zBgmST7QeJ\r\nTWJoKeyJgaIAgBrELg+YqBqbnHEcKBm+7Eiduzq8heMYtLmcuFMpgJjTtm5C\r\nkn4SOHD7qMP54Njvfx5lMs+4K8OAqzuxj+4FByG4bBakSm7JnZMCrw1wZOEz\r\nND4He6gKd1ZCwfjT2CgDZg4U301hWnDYZC0N6a7zZYjhQ6qB4SHsjg9+rbLb\r\ncn2nsX8pTDlwpNYLQpqnV3oL1nLGrdhBrmICoouSf7MTdj9isYrRCRrO1sD6\r\nGGha8bFG8vo1m4bO0QPDcAy6RFRtTyLB6vQVrgoESGJVUyOcKHEwb0CMso0I\r\neXYCgCGfeqPPfdhOU1U7PeiaZ75embaRV8ibVQPpGzBiQuDYkrepeTOC42x9\r\nBABhU/XvIFZvZdj3EHee+NomABQ/qiplkbkEOR2LByj1npNvq0o+GhRo6jcS\r\nRP6hVT3/zzhpwEUYTSL9Teh33gtUPpTk9uS1ONL3MEmA9808WSPR/+i/2q+q\r\nT49bSZ9AT1JOMXhT6fOiinXFHbvgidyNgM8O06uRDVXHTXEUfZq+W0xZt/TT\r\nLH5yCUqWDfif7yeahyr9fxmzvogEykXfW596Rnwm0A4Xx02On9FwKGb/wn0y\r\n91RhBKwnN8Rr/W/JYXwm1zSmeKOd9Dm7xHQ=\r\n=g/ZH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"76fec0004b4cdba773dc131044977f1e2efbf9fc","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cliffoo","email":"cliffzhang08@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.15.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.27","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.17_1657918261100_0.8264931109420668","host":"s3://npm-registry-packages"}},"4.5.18-typescript-migrations.0":{"name":"@truffle/contract","version":"4.5.18-typescript-migrations.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.18-typescript-migrations.0","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"745b2d6a1acb8636e672d9781da2719640d264c5","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.18-typescript-migrations.0.tgz","fileCount":21,"integrity":"sha512-eBxmLT0jONPVOBno+gkVgjARiDnU8nxsN7e1tLK8n15sWg8V5Jt7v2POFPthQrzSmK0l5ICRIRHUWlZvbZYBxg==","signatures":[{"sig":"MEUCIHj8ZwCTQlAhVjLQkUEee/a2NdXdit8H2EDUbQOVw453AiEA5hNRfMj9lkCmpTdkfhfLaKUUncIZlDYDEExK/52qY68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35931668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2LyZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrsPw/+M0WDey+HpqwQbhiacDuZmiITunhGKLObBZkMZvkWWmWD6blU\r\nZrc14HWm9O4UEcFRfUfcGT1ZZr9zSSgwrX4qvVSRJKy+urLG7RFl9m7yLOjc\r\nli/F0AMHqWBenTRgKYbzkWqt3z07+AJNnlVEia+cZ3qFtyQ3UjqCJQTHR4/w\r\nj5UnGojjx3sEA/ibqjlTzKUKxqMeeYtPFD9NJJdcXj35RwaHwk7e2zyOMIqF\r\n1mm62t95jAMT+fEHm30GkL/N/vJC0DczvqcrLmXevnCrai2hbxQXLJO+MMiZ\r\n/sfX4BkehAKhZWlRMwC88tGaInrpoNfpD0vF6Ngkty4teHtMn6Ku9mO/oSHZ\r\nq/Pj+eJP40diuOnTicZnRml5LqZpC3tWvfBEjXSNv+UN/H2xYp4s5WNP5C5O\r\nAFfqwXydhxbS2EUh+j3PVNEQGf9N7TbG4nTi9XE84ZSuzeeQjaO7F9cH+XM7\r\nXJDLJo4xza22ETeOxEacnxmsMXNhyesqZy74osBhis2Q3xtOD2V6Pb8lDBN6\r\n47l+8nc+jE1HwHZ7tNi4PxMhdxV2pZPozx2riNRsAScwQ01EiTAg6SjDz7dI\r\nmC0Y0wVHn140JaMz/hBGUu7b0Z/IK0Dbjpssi9WUYGtqkYwrYVqB1QqQQeef\r\ntFw+RJcIP3qIuHcEFXL8X+YH2rFBWooJ/+4=\r\n=jof2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n- Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n- Promises. No more callback hell. Works well with `ES6` and `async/await`.\n- Default values for transactions, like `from` address or `gas`.\n- Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`.\nThe contract-schema matches the output of the [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor), so you can pass in the artifact file Truffle produces and stores in the artifact file when you run `truffle compile`.\n\n```javascript\nconst provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nconst contractArtifact = require(\"./path/to/contractArtifact.json\"); //produced by Truffle compile\nconst contract = require(\"@truffle/contract\");\n\nconst MyContract = contract(contractArtifact);\n```\n\nIf you aren't using Truffle artifacts, the input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all Truffle-related projects.\nMinimally, it requires the contract ABI, but passing this alone may cause issues using certain features of Truffle contract.\n\n```javascript\nconst MyContract = contract({\n  abi: [...], // minimum required\n  address: \"0x...\", // optional\n  // many more\n});\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n- `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n- `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n- `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n```javascript\nconst instance = await MyContract.deployed();\nconst result = await instance.someFunction(5);\n// Do something with the result or continue with more transactions.\n```\n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nconst MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\nconst contract = require(\"@truffle/contract\");\n// Require the package that was previosly saved by @truffle/artifactor\nconst metacoinArtifact = require(\"./path/to/MetaCoin.json\");\nconst MetaCoin = contract(metacoinArtifact);\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nconst accountOne = \"5b42bd01ff...\";\nconst accountTwo = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nconst contractAddress = \"8e2e2cf785...\";\n\nconst instance = await MetaCoin.at(contractAddress);\n\ntry {\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as accountTwo.\n  let result = await instance.sendCoin(accountTwo, 3, { from: accountOne });\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  let balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  result = await instance.sendCoin(accountOne, 1.5, { from: accountTwo });\n  balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 1.5\n} catch (err) {\n  // Easily catch all errors along the whole execution.\n  console.log(\"ERROR! \" + err.message);\n}\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nconst MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\n\nYou can set this property to choose the number format that abstraction methods return. The default behavior is to return BN.\n\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\", \"BigInt\"].\nconst Example = artifacts.require(\"Example\");\nExample.numberFormat = \"BigNumber\";\n```\n\n#### `MyContract.timeout(block_timeout)`\n\nThis method allows you to set the block timeout for transactions. Contract instances created from this abstraction will have the specified transaction block timeout. This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\n\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction. The default value for this is `true`. See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\n\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions. The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier. The default value is `1.25`.\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\nconst result = instance.setValue(5);\nconsole.log(\"Value was set to\", result.logs[0].args.val);\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\nconst result = await instance.setValue.call(5);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can _get_ the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\nconst val = instance.getValue.call();\n// val represents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\nEven more helpful, however is we _don't even need_ to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\nconst val = instance.getValue();\n// val reprsents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction hash (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\nconst result = await instance.setValue(5);\n// result.tx => transaction hash, string\n// result.logs => array of trigger events (1 item in this case)\n// result.receipt => receipt object\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\n// Same result object as above.\nconst result = await instance.sendTransaction({...})\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\n// Same result object as above.\nconst result = await instance.send(web3.toWei(1, \"ether\"));\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\n//estimated gas for this transaction\nconst result = await instance.setValue.estimateGas(5);\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"a686945780ca094faaa3c237f4f94ceb659863e1","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.28-typescript-migrations.0","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.20-typescript-migrations.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.18-typescript-migrations.0_1658371224915_0.47206940837150024","host":"s3://npm-registry-packages"}},"4.5.18":{"name":"@truffle/contract","version":"4.5.18","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.18","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"277968dc16a03aea847308b524d8fc5d3b840292","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.18.tgz","fileCount":21,"integrity":"sha512-/heEe3pKyMA6AGYrA57HaH7LN4NMpKMTTEm/Es35uNPYOMdXpWUbvkXpWx0zH5YBpnPtYQiS64okXweab+I5jw==","signatures":[{"sig":"MEQCIE0nXy2Pvlli9p1fxwTkhShlzFgnXUWDq7GGvhcgqO+iAiBzh6/iTCjG+DfNHC7t49STdQI/q46YlSgDhw34qVxwaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36188105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2eH5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1Xg//RsOfiGX/Z/LoTQ+HRlHqShO0UJ9qNk8knfSKWKEjcPtWVTKi\r\n7hbu8dBZTPl+IdcAolyUoXdyJ64xsO81Pil/qdVtJOn4UyzH7zMQJVVKdUTQ\r\n8CrZX3uYMD8V2/uWc1pU2fUwLdhJg6OCg85I4a+efTV+Vrj+GC3qp192cyDb\r\nf29gFaTJIKFEjddd9CiZWW0E6U33ZFjfSHmItnM3XfnvbMWAfWglt9S6eIB5\r\ni5CnaSGY8ipaP1QXiwHS+1ejEc98ROVGtkABcVjAx21Wb2G/o+n96OHf/YmE\r\nN39nZpJOd5FTJJzg5HV3xT9pP4fLWMVW8cyl3gfBSgk3BxR/D9FIdayNBV/H\r\nY1nUBGUOZ5Sbke+z+/OxdqCGw0AZ8n1kD7G4hpqSQTTL2EjKAPFdv4yEE4Pb\r\nGXX0JlXzriDsFkYf8qfuIn1iPhEyYkkmoGc418w+7FenC9fuj+v7PeM1anCo\r\ntSxhYm9k/NjOZEvn3r3cabgu7ROV55K/AU9hrDIVSl+I+w6Gix1nUa5vj86+\r\neUCK48X39Enpr6VPuVXZzuqMy/OWbCTuy4SZE4jEnuNWYAOFqQ1ruUHZpA6M\r\n3lPkjOjJLRZyc1v9mWWY4Xhn6aJaeGPjtcqbUgLKQmvrmqHKXBd1iMsd3Nb+\r\nUh5J+TYoRK0TM927sXYVbPX0I4uY0sGNAOQ=\r\n=UqjT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"074c8ac1695d241096843a163a1bc95c34a3a117","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cliffoo","email":"cliffzhang08@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.15.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.28","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.18_1658446329466_0.6782035172090846","host":"s3://npm-registry-packages"}},"4.5.19":{"name":"@truffle/contract","version":"4.5.19","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.19","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ab618fb0793517d82235843064c687a924fb4871","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.19.tgz","fileCount":21,"integrity":"sha512-PXt9usqYAzu33jxFOX1PZlqQfoYOc/10PrOeidhhgB8JLHx0InOKzucbF4+T7EQl6w4f6ATVupnWyv+lk63xdA==","signatures":[{"sig":"MEQCIDHUlqPDU8vAF9jngwf1EwyeiIFVR/aYdcMioUECQmUuAiBWviZ6NtNJKS1Y4/rG3togOP1WSR2dJezj/ZxasJA1EA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35931334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5DTfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpzhg//SJ+F/InGMRXYQ3zDMyZk+In+fE2SzcqKujn3k61vMxBdI7Oy\r\nvdCOh90OGAOIM2DrMJQNjiy8X3bBM6P17ZtaF49DNTN14p/WoLGrfHEulS77\r\ncUlSG8lTv5rj4TwrPutwcFwNxRY3GCqNhjZ5FvtAJXrTgSEFnirOJVc2hvW5\r\nWict/WTHmGzkXZ9EIkjKtljXlm6DGObWbZEYHJFc9g4XS5dADEdtyh5FcHA9\r\nr4I1Om5lqXS96XeCbesZUs2HSKP/RwpBuOvGWRt8TG0FyTg6RRtFyK81IBQ3\r\na6aaeaeTas2BVmNRkhLUGVetayBDhD58THAOebsrTkm0YE2/7xuiVWD47uUq\r\nSwd+NznG88f1GzLhqGjobYX8xkhEEXSJ1Bve8jObcHy9vbwJyWnGcpA6rmbS\r\nDbLzyayFV6T/VbRgA3TlTgBQXwP98DzgQWudJIGqcmKwgfe1JWPNlWDol88a\r\nd1m6k76IQ9Sy1kvIVqNCPDwv2smicgIXwmNc1AIgPGuJ+H1oxaRnL0Aa8RE7\r\nBohfCXwR2og6CLS17zavsOP5GsetmPOe55gg2/yiBkBNA5/TN3vyphpLAtlq\r\nsqBVxiTco80/2ynCklytLJX1P0Hw/7F8qFOHM9VmFBWwBScT3IDHX5qBQCqw\r\nhssljbLyw+UJp3G5KsDlNShvTg6N61xVxag=\r\n=un0A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bc911496cdb3019a91398199dc9b260c6007df7f","scripts":{"build":"yarn compile","compile":"sh -c \"mkdir -p ./dist\" && browserify --debug ./index.js | exorcist ./dist/truffle-contract.js.map > ./dist/truffle-contract.js && uglifyjs ./dist/truffle-contract.js -o ./dist/truffle-contract.min.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cds-amal","email":"cds.sudama@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.16.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.16.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.29","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"exorcist":"^2.0.0","uglify-es":"^3.3.9","browserify":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.19_1659122911153_0.8557354840288309","host":"s3://npm-registry-packages"}},"4.5.20":{"name":"@truffle/contract","version":"4.5.20","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.20","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7df196b2c76ba4e9be2a59697c31b675d2777cd1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.20.tgz","fileCount":27,"integrity":"sha512-XWedrAb0sJiJbvB+tt0Ki16oFcfYcbK0Vl9QDtQ9SreVG+mwrlevaNht9K4oDcEgXq0xY5+58SKi8JPgpY7GmQ==","signatures":[{"sig":"MEYCIQCAYbox5qL1qq7285WgnoEAkp2uEdEoixBbxZAenWUkhgIhAIZvLp46Uy0jgTuGXFB19A4P0I4xNEM8JP/pUGWJaxF7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100468654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7GXuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3FRAAhf6ggMTpfb9JBn5MOB+cjpVsF9JL/h2Ll+zFBPhThZkCEaeI\r\nRug2cTBEaGsHQzJRb5y9msYtcIf6rXYSWEKIHkyhPq4C8m2MuVpN0MfIrVqO\r\n1XPr1SQadZMas/iK4nFYWDkmZnPThZePFWt1Wn5DRObew2eWVs0B8aESH/lZ\r\nZeWHlzrnO6YKvTHRj2hOEAXbt0EUTd6u1wiPbN9BouSI8HGaNpVGFmHFBW/s\r\nobcO6sThiD2K+WZBjM7FOVykNPouuL6olJepNOzp414+B7Kcyx0eXDTCX4Ob\r\neNGuasVkTAKAO5aSh3QJlxSxQl2FZrP1MHkzzARrmTf7R2WCNm26elcrMqd9\r\nb43C8N0Vfn6jNfbTD09lZOIZ2Pk+oKtXtUa+U+twp1ZFwzqxoN6SDrLUh7YT\r\nvvxMWQx6XHCcYBuACbc1mV7VLvWESze6dfXoBRBk+TA+KJFkRLanKoF7eJGj\r\n5hQkiOj3NCQAveksbtM3FZ0zy7SMAIihdLKZerdn62F5yd7aI2i62VBwfDDC\r\ne6BXhaVvoOtpFRT84djIZiFeq1i8vTLfS9C3BZSwRVqfJmim4yXBt4irqfID\r\nQtCGMEwosga+fWUZZipT+xLXh8yrAZD+zy9gNDlGkGXYnMOQG0sT7WM7MJp4\r\nR3Ao4qaILGDcIQ3i5PEULbdyATuWQUQMFOE=\r\n=/3w9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d5e71e5effb43f473c4c33ab66f158d641d424ed","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.30","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.8","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"buffer":"6.0.3","webpack":"^5.73.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.20_1659659758267_0.21793869410037914","host":"s3://npm-registry-packages"}},"4.5.21":{"name":"@truffle/contract","version":"4.5.21","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.21","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"a299e5f9b26fb0be16b7d5707e9e538c3ecb6297","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.21.tgz","fileCount":24,"integrity":"sha512-9yNfTrSlsZix3vNO+J5PMJDHglm82KjMaU3TwN7HgdNgFLd/IY/5OpUjTanTQq/5Rr9kmAWgzYilNkkqLkiYaw==","signatures":[{"sig":"MEUCIQD79zpXq3nS2TBwOw1QcUoxsl462Bjk9WdneZ+/YssI5AIgTP2IvGFfv+BQBFUPocwQgadfEPYFwXxnVFUAPUgLWeg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64047264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9DAkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMRQ/7BLD6NRQbV4UeVPc3Nk0YTG0hrTWNhGf9vECJQ5ewfARv6Mp/\r\nyfV7RhOAgs6BkGIVBnvVTZ+V5RqBmOj8QQbkz0/+l/u1Acphotn0a5HA0WD7\r\nB+KWxd0kQJKzmK/5VCuFCqDUe34pn3U6VKn9q8NZOZh5WVFASpb0N4gCsxYG\r\ndZlkZAskHNgdaSE4/51riY5055FrW8JYOlcuFrAoPzKL314z9ZPVuSKXXuSN\r\nYCUDa9cCnE8gcnEeqt033ZOjNoJVGw+H3cSunO2dah5DCz009NEWRYh69ilb\r\nz0DKG7wGj/qs4M9PLh52xGBRuakwA2Wj+8UsMCNdGp8GE1m/0ac3O3+j0h7v\r\nnhrN4qXM/ttZWQnMCSZAAD9wJE8CiCU3R/rjCPvozh5ypjBW3McqNPTIjwcr\r\nJ/OndQ4nmmUqkInvFqdmq64/avN/mv2sTGlcAsZCQhV8xH8IAa1L+9W+P9ph\r\nn0aVX4K1mR3yZMDc0nzC5q2V+dYiUb5kY5laOhgR1QEhFQCgeMHXA/7V5abc\r\nNF++KyOvErpj6cqizj2hQTVJ68eDmsbDj+4vWanqPiWv2j0Mi8gbkLw+BI+Z\r\niz2EGv37v1mia+ykHJNCWNntTKUG6+rUvxX1N6vscLaA2za/hyRkqEF7nyDC\r\nYmlm2yeZuyCwhgWLNEZloFphAmr/VZ3VqjI=\r\n=kQiw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c0e9b091678b131d3a5e28fa46ff64afbc0e4828","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.20.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.20.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.31","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.3","@truffle/interface-adapter":"^0.5.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"buffer":"6.0.3","webpack":"^5.73.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.21_1660170275956_0.3149493410552082","host":"s3://npm-registry-packages"}},"4.5.22":{"name":"@truffle/contract","version":"4.5.22","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.22","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"a0ebc538e9398983b71aaba1949a69f7f2b1a553","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.22.tgz","fileCount":24,"integrity":"sha512-yqv+dlLQsPLHS0qMVVMmB1mVw5KhHFLV6K0y+amcoZGACvoX8Q+oITUpYY1hqI8aTd7uQFsDAaVPJouZuyCwwA==","signatures":[{"sig":"MEUCIHzg6Sft4at0stWCib5spR7TBs+3jpkTL5kMXNt2PNGOAiEAwt4ZRyR0/TXJkhGltl1A48Q6E6V83Cz69INDirhlDR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64215193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/Xx1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5nQ//UyRq6JRYf87zdBQqCJBKF/d3dA+lKzwYTyekwXO4JeePPJMH\r\nwjaT8O309690cL0nQatYgy/szJYz94W+2ST3WOqMObJdICyiqqBX+m9Myzy+\r\nnIxIpwF/J3HfwnrNDEy7DKBTjHiQq4q0db+51tPuJCt4I/ef9GiYlrXaFXcE\r\nqRYZEMYClpvfZIc101kgYUhvcLDrTQ2Ym3k9nyDoUg/fEp5Z64aq4SZ2JN+i\r\nzSsbW7J6KExwqbff2mT2kkCjEWt9Lf+4c50020J+O9M+zZxnKv3dR18QIFxu\r\nHD3hXJUGnQWMXrWkKORHFfGZVJtntlCaRpWniwxQ5et/l8EsYm8RujUYMDp/\r\nm4ycKu5hHuzgyz38/b7LzSk1xPCTC34vs8jHm/9om4Jm7E7IIOVVLdl4fhs0\r\nczCERdNih23jP1c6Wi+UePYtc7VSDcLYC00kZrnvfFVZPYHOQBr3iKU2SJuF\r\nfm55yWHsr5v3Wm9Mm5M1IaPlnkbUjoOtw/SCT0wc96EGisQsVwtj06jxcMof\r\nsfYYUA0irhKp+2L4+IdHjZsB2AWFfhVpn1R596MWVdH5JGK16BYInEhfrUB4\r\nKJ8gaIkzccSuSOwZDqf9yFgqXkUtPsXK8IjrGmYsDSmpYb6kJSlDfdeZp5p1\r\n9ovT7HOnWVRNGMIjxjCOQqKVknAM7MRKEBs=\r\n=r5Rv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"0d96061f25e0927cd1d158b1636464ded86a57bb","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v16.16.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.16.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.32","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"buffer":"6.0.3","webpack":"^5.73.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.22_1660779637107_0.6110881934322301","host":"s3://npm-registry-packages"}},"4.5.23-hardhat-error.0":{"name":"@truffle/contract","version":"4.5.23-hardhat-error.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.23-hardhat-error.0","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"9cfd5a370534a5e307b80970e4c8047e25d48774","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.23-hardhat-error.0.tgz","fileCount":24,"integrity":"sha512-1WBG3Qr+zDTcNFGDR8xq0N1ZRm6ADgVnQ5v6nn+HcOFVvCCZG9Z/1Ry5Y2jYWPAZ4DNYhgGgyzcoSp80kiIlMg==","signatures":[{"sig":"MEUCIQDkc3tRCkqA+Vjw1Zn5oYoScaTmg8HZwXC15tlFFm4mfwIgXgvOR5T9lCMHB3AktKxjoAasDHqG2g20upeWSwwPck0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59680378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAC0wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobiw/+PHUpLOS4RtF145F4n3DAx3ropiw9RmSkVM8mF0VpCE8OwaFh\r\nOOj1CnPIX+clLsX9n/xx/bQF/OgRmg8QwvDfw9zKgj179KLBARjVHa9abuHr\r\nri5f3ZVfOFvuHVQUsUC5EhqpvKy4jLN3tUMIXbbOcqBj8jtILv+xnm8QZIe8\r\nY2EpPflAvS+/lyC++ZyE/JSUzYyR5hQOUcZB+R8NspeXDGxdGUn4oCAjj1/c\r\nO2SbB68M9CdCwzdz5Y6UQtzuqMgQviQx+mbu7w+ZPr44P0IWt0gEqH+lRnMM\r\nIdIe1DP/NFzx/gwtH2CyhFa+cVX39bUVOR/73LTK/syZPjIn02wkXwI4uM8h\r\nOwxGzzWfbVP4gvoxvIyCbTmKnC1XRi/ona3hjaglOAnImT/0MnatvDkgHcux\r\nxXxeaUajMGH9Z2x1PQLRnT6xTKHJsZ3uzB92gQvUtN2E5MdMmSxGDp+lUxI3\r\nicmwdUPfuQIQa4lyojXFbOIGRNsBiryosUur8+46CZwV8S/eFYMG2Bteb5IR\r\nUScbdelmKdCXjUuzRSsPiLGXUvWNwEuQStH1clafCkpDI7J2l+gfS9l+ixGS\r\nLbgSIbNWTLt08udeeqeznn6OUeYAqeseBUoWCbfn5c8s1vThtlKT93CEWY8z\r\n4jgjimZlwaqk4+8XN4aH+r5Na1rpLoHRN2Q=\r\n=OxtD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n- Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n- Promises. No more callback hell. Works well with `ES6` and `async/await`.\n- Default values for transactions, like `from` address or `gas`.\n- Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`.\nThe contract-schema matches the output of the [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor), so you can pass in the artifact file Truffle produces and stores in the artifact file when you run `truffle compile`.\n\n```javascript\nconst provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nconst contractArtifact = require(\"./path/to/contractArtifact.json\"); //produced by Truffle compile\nconst contract = require(\"@truffle/contract\");\n\nconst MyContract = contract(contractArtifact);\n```\n\nIf you aren't using Truffle artifacts, the input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all Truffle-related projects.\nMinimally, it requires the contract ABI, but passing this alone may cause issues using certain features of Truffle contract.\n\n```javascript\nconst MyContract = contract({\n  abi: [...], // minimum required\n  address: \"0x...\", // optional\n  // many more\n});\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n- `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n- `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n- `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n```javascript\nconst instance = await MyContract.deployed();\nconst result = await instance.someFunction(5);\n// Do something with the result or continue with more transactions.\n```\n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nconst MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\nconst contract = require(\"@truffle/contract\");\n// Require the package that was previosly saved by @truffle/artifactor\nconst metacoinArtifact = require(\"./path/to/MetaCoin.json\");\nconst MetaCoin = contract(metacoinArtifact);\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nconst accountOne = \"5b42bd01ff...\";\nconst accountTwo = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nconst contractAddress = \"8e2e2cf785...\";\n\nconst instance = await MetaCoin.at(contractAddress);\n\ntry {\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as accountTwo.\n  let result = await instance.sendCoin(accountTwo, 3, { from: accountOne });\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  let balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  result = await instance.sendCoin(accountOne, 1.5, { from: accountTwo });\n  balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 1.5\n} catch (err) {\n  // Easily catch all errors along the whole execution.\n  console.log(\"ERROR! \" + err.message);\n}\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nconst MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\n\nYou can set this property to choose the number format that abstraction methods return. The default behavior is to return BN.\n\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\", \"BigInt\"].\nconst Example = artifacts.require(\"Example\");\nExample.numberFormat = \"BigNumber\";\n```\n\n#### `MyContract.timeout(block_timeout)`\n\nThis method allows you to set the block timeout for transactions. Contract instances created from this abstraction will have the specified transaction block timeout. This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\n\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction. The default value for this is `true`. See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\n\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions. The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier. The default value is `1.25`.\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\nconst result = instance.setValue(5);\nconsole.log(\"Value was set to\", result.logs[0].args.val);\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\nconst result = await instance.setValue.call(5);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can _get_ the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\nconst val = instance.getValue.call();\n// val represents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\nEven more helpful, however is we _don't even need_ to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\nconst val = instance.getValue();\n// val reprsents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction hash (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\nconst result = await instance.setValue(5);\n// result.tx => transaction hash, string\n// result.logs => array of trigger events (1 item in this case)\n// result.receipt => receipt object\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\n// Same result object as above.\nconst result = await instance.sendTransaction({...})\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\n// Same result object as above.\nconst result = await instance.send(web3.toWei(1, \"ether\"));\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\n//estimated gas for this transaction\nconst result = await instance.setValue.estimateGas(5);\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"93f18f7373b74e774e5fa068da3ee3202541f372","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.19.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.32","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.23-hardhat-error.0_1660955951569_0.7368005228579271","host":"s3://npm-registry-packages"}},"4.5.23-hardhat-error.1":{"name":"@truffle/contract","version":"4.5.23-hardhat-error.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.23-hardhat-error.1","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"245555da5729857b7a3b39004f54d4144b8e208d","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.23-hardhat-error.1.tgz","fileCount":24,"integrity":"sha512-18G6fKQySKqi6rRBLboAkPg68iM5KhW3rYtjeKolk4KJtzjtypwZQQd2wa4ltGbvd1oI7goScQlJ+N37ahDtYA==","signatures":[{"sig":"MEQCIHUEe7ank7nOZCqFtmXPLtMzvMTTltBodPt9WMwrF28NAiBj4lq0pP33Nn0H5dVV7J0uAlORL4D7E45LxU473tIE3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59680378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjA/gsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+GA/6A74Kkg+yaUlE7lsztXlt0g2k92xnlw48JGvSkLGYEL2ury7w\r\nIvRcN2YgeZRAEKYQcTWgHzFXAFopwgbzxqxuOol7Ew8hGX/7YdSI45r/s7+x\r\nlZysuGPAk3+p5WHnvNYIBe/4sEDHrQkv6i0WphBHPJDlkuH0JjcmXy9WHX+W\r\nSkQLAKs+wW0zStBVlKuUVx15xbOTKt8TN5ZGCuuLdkUm49JbGKw08jzCegBd\r\nqAFRSNx9a66U0nN1tGKsK/TSm5tBzYmIguyu1fNe6T61oe8ahPgWm1sDD+/9\r\nAgkpO49b9V5O+qoFBMdA1fAy3HkdcA3j4Cs2VpnltwPDSmlHA9lcpszfEMqC\r\nGqnnnycMXXrOoNPSA66r3BiXJXdjfLn60FXN473N/m8ZU7I8BloDF06mJiro\r\nib9T7OOwZEgEGcHZirrz0X1NRT0wp9+n4V1BBoi/4pAkFbcw+iRu14Ao8Qzt\r\nhh9R/DlSV43j2kdPVsilq/JCk89hdp4D8j3l2arqE8slQvnhLVxJuBFJnXfI\r\n5lS/zUwyyDz+zWkD5agADb1AeN0jmCt8DtJqMK1TS7Dgd1aY6+xEc5Eb2Mgr\r\nqCovd4Q/AafNLnIjSdNUvTR4N3SqqIBB6ilMPBjK6yShKaH+dkF90Vq5pvDp\r\n4+0iJJ/YMqZS2CKKvXb0KlySYlTTXxhMmLQ=\r\n=6sLY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n- Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n- Promises. No more callback hell. Works well with `ES6` and `async/await`.\n- Default values for transactions, like `from` address or `gas`.\n- Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`.\nThe contract-schema matches the output of the [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor), so you can pass in the artifact file Truffle produces and stores in the artifact file when you run `truffle compile`.\n\n```javascript\nconst provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nconst contractArtifact = require(\"./path/to/contractArtifact.json\"); //produced by Truffle compile\nconst contract = require(\"@truffle/contract\");\n\nconst MyContract = contract(contractArtifact);\n```\n\nIf you aren't using Truffle artifacts, the input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all Truffle-related projects.\nMinimally, it requires the contract ABI, but passing this alone may cause issues using certain features of Truffle contract.\n\n```javascript\nconst MyContract = contract({\n  abi: [...], // minimum required\n  address: \"0x...\", // optional\n  // many more\n});\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n- `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n- `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n- `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n```javascript\nconst instance = await MyContract.deployed();\nconst result = await instance.someFunction(5);\n// Do something with the result or continue with more transactions.\n```\n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nconst MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\nconst contract = require(\"@truffle/contract\");\n// Require the package that was previosly saved by @truffle/artifactor\nconst metacoinArtifact = require(\"./path/to/MetaCoin.json\");\nconst MetaCoin = contract(metacoinArtifact);\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nconst accountOne = \"5b42bd01ff...\";\nconst accountTwo = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nconst contractAddress = \"8e2e2cf785...\";\n\nconst instance = await MetaCoin.at(contractAddress);\n\ntry {\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as accountTwo.\n  let result = await instance.sendCoin(accountTwo, 3, { from: accountOne });\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  let balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  result = await instance.sendCoin(accountOne, 1.5, { from: accountTwo });\n  balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 1.5\n} catch (err) {\n  // Easily catch all errors along the whole execution.\n  console.log(\"ERROR! \" + err.message);\n}\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nconst MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\n\nYou can set this property to choose the number format that abstraction methods return. The default behavior is to return BN.\n\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\", \"BigInt\"].\nconst Example = artifacts.require(\"Example\");\nExample.numberFormat = \"BigNumber\";\n```\n\n#### `MyContract.timeout(block_timeout)`\n\nThis method allows you to set the block timeout for transactions. Contract instances created from this abstraction will have the specified transaction block timeout. This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\n\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction. The default value for this is `true`. See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\n\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions. The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier. The default value is `1.25`.\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\nconst result = instance.setValue(5);\nconsole.log(\"Value was set to\", result.logs[0].args.val);\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\nconst result = await instance.setValue.call(5);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can _get_ the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\nconst val = instance.getValue.call();\n// val represents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\nEven more helpful, however is we _don't even need_ to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\nconst val = instance.getValue();\n// val reprsents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction hash (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\nconst result = await instance.setValue(5);\n// result.tx => transaction hash, string\n// result.logs => array of trigger events (1 item in this case)\n// result.receipt => receipt object\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\n// Same result object as above.\nconst result = await instance.sendTransaction({...})\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\n// Same result object as above.\nconst result = await instance.send(web3.toWei(1, \"ether\"));\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\n//estimated gas for this transaction\nconst result = await instance.setValue.estimateGas(5);\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"d7345a9c4cbddc7953e78b9e1e224f825ebd1b21","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.19.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.32","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.23-hardhat-error.1_1661204523356_0.18053055727605605","host":"s3://npm-registry-packages"}},"4.5.23":{"name":"@truffle/contract","version":"4.5.23","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.23","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8540f0c2d4ebc4782f1d4647016213fa4cac0107","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.23.tgz","fileCount":24,"integrity":"sha512-ni/RzBdDFo60jaCb8ETCPBfPHRr1WVH5Y27EKmfEyrNg8TC7WZ28SQylMBkwdrgLjqAyPw3Pq7Y5us1f9tcyMQ==","signatures":[{"sig":"MEQCICBTwM2G5S+YpCXa/HD+9xCNouN+ugGegBShQLTOOtfdAiA4s+BfpV1gPp/9nsAZIAmuHWiNmzZxErlVK9V508FKJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59683658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBqiUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4aQ//VYc7xFn9CAxwiey33U0PSssxzyCiIe4ive3d/RrcbBCU1fK5\r\nrdjNglRRZrntRU3dm8yYUlf7n/NRtOL6I0Nd81jCWSnuvfRbPhtMmq9mYWL9\r\nYPOFPqWMucr90kZTg0IZhPdpZ2JA99i0VFXT6HVi7ySmXI58HDpIM/P9vrhn\r\n0+dbTO7STHxzuq2sDNXqLI55SW3i8/wWzjt3D3WGbJ6flZhwdfAgR8vzFV57\r\n8RxqZuxwDSx25YtOgL25Mtcx2aC7ks2hp8pjbUgxeBCgtR+y9XI7QamIvWw5\r\n74oGhRr+QeS1YeypMSXvFMLjOiN9rzPPqQNAXkukBNrW/Iti7Y7EHq5nI7MR\r\nq2HyHJEVFt/mp9y62GVnhyVnnBv5cBpJZEyMuqx54Zi7vK+4B+eDYgWwcAF5\r\nR0J+muMHAyRXKb2p1OZEjxiHACUkr/Z48CU39BAlSnvJdIy8Yf+NfQEGlvzM\r\nQD3DjGA4if9WFQPqT/F3NHgy8aIRdA+pV7vqi9EZp1rLcS+GxVSVMTbVXvGF\r\ndc3dmnJr2qC04MdTtG1grr2PdwHRgNTILLWft7MM9cHgLQOfeuEGmVe76Yl2\r\n5O8wyNe/4a93mECYa7xWBJcUqWcxkDVqMcMczL78LpjE/EjiKe55b8vfuyJw\r\nnLCMwM/D4bHNu6xPQPTiAVbFGS+4GdPeWwk=\r\n=ic/K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"fb1f58675bf52bb7dc11e45026c8b43aeca401e9","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.33","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.23_1661380756333_0.5925128053660309","host":"s3://npm-registry-packages"}},"4.5.24-hardhat-error.0":{"name":"@truffle/contract","version":"4.5.24-hardhat-error.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.5.24-hardhat-error.0","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"97f7069bdf2d3c6df6b49c4e902d23dbfa08c120","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.5.24-hardhat-error.0.tgz","fileCount":24,"integrity":"sha512-K5NoiIQ5YzMQozP/0bzqX2L5gHhRXs4RJNelvkomgCu3nRy/QACqPNy7EWcRFJOfA9z+LAJSvbpyDkgZqe3bxQ==","signatures":[{"sig":"MEYCIQCeFg4y4chPn26yh+x8fLJowc2bIH9yolkrnDiut5acTAIhAMGPDGsnHHjU8Blzzy+Yhw5/aMKF27Gm7bs4Ul22sUos","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59599329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBx9CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqY2RAAkbi0aIz41Rp4bHSsZ8y/F3U2HdE2q/3B29sFgb5WLDlza96L\r\nn++wcJB234bovvffLBuO1nsxtYKzlvLjAtWIPFh+YPwkPj10dsS6qORnIqve\r\ntK2ePq3WRoTZjxj8w2bZf88Ut9vWOjUXEak6ACWszrW1EKPrl0Cid4KKOe3U\r\nmaN3mByYZsUxHUr0mOl37RCrWjYBdkqFM+5SsaOamHcTTKlaIeCsH53u/OwU\r\nyFINjRklpQ9+BO+pMnisw8ACpdGanuMMGb6B+ETPcz206iSitx00lILZHC1m\r\nmCOOSFmYzMNug1Eq0qxbsR5rjhuNsqVUz4kn2mxjdOcLi/dHlKT4RDhL7D3t\r\nqSBhksA2MCpw+rDOhF+y/urfZeKvshgBRpOcm9mnFupoWUc1ifHIaof4DhVq\r\nwPx95m43W/Axo7QOmzZy8h93PFkeGr9v28sZCOaq6D8VadiYrq+QfPPKLlvX\r\nGUxkQMpWLuhUw55EbAjaYNLRh/pTvvgRTHFUI+bDn1RcJ4EaJ0VidfMMEDcL\r\nvn0w7EFS+tlAtNlag5ovRq+z67aW3Sh4Ap9RGPnGZPTYpkkKKIZ16UROWZtJ\r\nkD58FMoQblOogPO8D2SwwwogBf2SQr+k1ied6WGZq6OCCH/mLgqoqGeglUcC\r\nfaRLsy/+DZnC8IMD/OE6EmmSfdFSrDbEGDs=\r\n=8+SL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n- Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n- Promises. No more callback hell. Works well with `ES6` and `async/await`.\n- Default values for transactions, like `from` address or `gas`.\n- Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`.\nThe contract-schema matches the output of the [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor), so you can pass in the artifact file Truffle produces and stores in the artifact file when you run `truffle compile`.\n\n```javascript\nconst provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nconst contractArtifact = require(\"./path/to/contractArtifact.json\"); //produced by Truffle compile\nconst contract = require(\"@truffle/contract\");\n\nconst MyContract = contract(contractArtifact);\n```\n\nIf you aren't using Truffle artifacts, the input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all Truffle-related projects.\nMinimally, it requires the contract ABI, but passing this alone may cause issues using certain features of Truffle contract.\n\n```javascript\nconst MyContract = contract({\n  abi: [...], // minimum required\n  address: \"0x...\", // optional\n  // many more\n});\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n- `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n- `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n- `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n```javascript\nconst instance = await MyContract.deployed();\nconst result = await instance.someFunction(5);\n// Do something with the result or continue with more transactions.\n```\n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nconst MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\nconst contract = require(\"@truffle/contract\");\n// Require the package that was previosly saved by @truffle/artifactor\nconst metacoinArtifact = require(\"./path/to/MetaCoin.json\");\nconst MetaCoin = contract(metacoinArtifact);\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nconst accountOne = \"5b42bd01ff...\";\nconst accountTwo = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nconst contractAddress = \"8e2e2cf785...\";\n\nconst instance = await MetaCoin.at(contractAddress);\n\ntry {\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as accountTwo.\n  let result = await instance.sendCoin(accountTwo, 3, { from: accountOne });\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  let balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  result = await instance.sendCoin(accountOne, 1.5, { from: accountTwo });\n  balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 1.5\n} catch (err) {\n  // Easily catch all errors along the whole execution.\n  console.log(\"ERROR! \" + err.message);\n}\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nconst MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\n\nYou can set this property to choose the number format that abstraction methods return. The default behavior is to return BN.\n\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\", \"BigInt\"].\nconst Example = artifacts.require(\"Example\");\nExample.numberFormat = \"BigNumber\";\n```\n\n#### `MyContract.timeout(block_timeout)`\n\nThis method allows you to set the block timeout for transactions. Contract instances created from this abstraction will have the specified transaction block timeout. This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\n\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction. The default value for this is `true`. See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\n\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions. The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier. The default value is `1.25`.\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom Javascript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From Javascript:\n\n```javascript\nconst result = instance.setValue(5);\nconsole.log(\"Value was set to\", result.logs[0].args.val);\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\nconst result = await instance.setValue.call(5);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can _get_ the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\nconst val = instance.getValue.call();\n// val represents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\nEven more helpful, however is we _don't even need_ to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\nconst val = instance.getValue();\n// val reprsents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction hash (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll recieve the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\nconst result = await instance.setValue(5);\n// result.tx => transaction hash, string\n// result.logs => array of trigger events (1 item in this case)\n// result.receipt => receipt object\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\n// Same result object as above.\nconst result = await instance.sendTransaction({...})\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\n// Same result object as above.\nconst result = await instance.send(web3.toWei(1, \"ether\"));\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\n//estimated gas for this transaction\nconst result = await instance.setValue.estimateGas(5);\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"f1970ca2361849a1a7d7569d7ddc4db9657c8558","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"gnidan","email":"nick@gnidan.org"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.20.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.20.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.34-hardhat-error.0","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.5.24-hardhat-error.0_1661411137807_0.8405113950425376","host":"s3://npm-registry-packages"}},"4.6.0":{"name":"@truffle/contract","version":"4.6.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.0","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e7d6292235c6909c9026ff1fe6dfa9bbf66e5f04","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.0.tgz","fileCount":24,"integrity":"sha512-FxSR7WtV1q+1AKHhJmsbd360qFFjtkGPQeJfaDcn7wlOPG+axW9iLqLSUTlRpFkPKJnUILg2FujNM965rIQJtg==","signatures":[{"sig":"MEYCIQDXqHt55aXPUDx67z0OGUGaZ2xaWM5QwbhsWSvbPoQwTQIhAMXgpMuItR2UAo/9BLJIeBKsYH7R5t1vDyJmoPzfZRSa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48318359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGSBLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJhQ//f6mKo/xWFdIpGnd+iqPXmvA0gWU07s89BLMNM0ukD0mKUpXR\r\nYfoMDWLSpFjpO6kL7TkXYrU4LQVa4n/yKKWPhukebuM84IkZKizPTp8UNqDt\r\n4S640EEj9pcPUWtCWYZu252+ptWZFlRNQA7uZ3T4qbewcUdTuBmRPdOgcVkd\r\nZNpN/CAQpanlZlpGfLRM/PwzecHqeXnbO6JY10lNXSbyUfDhQJASocMLdpa5\r\nmlEjSMHWUDCBk0f72C03rHnkWq74x3h3OkALWBOk8ftEXpCh5v+ClCIJKaQC\r\nfXggB2VaRpDx33KYhCj44eP5YxtI3Sbc9S2+NcS67IUdb8oQdKTR02Yn+PT1\r\nulKSQKRtPVCQGlBkC21CK+KuiGAV+0Gw7CpXtN41R3WHS7Yc5SmsXH/hXiUb\r\n9qb/teKbh4CjQ3dcxPMgaFL4E63PLXzpdSIlNvH3e84tZcQiaDGaGuoXywTs\r\nlSkjG4PtdnqUEUeczvnSTWSGs1RvyUNs9V4pmJqxRavE/S/8ei5maZ0hproH\r\nx54j22g5rcCHDG/jx+GqLnqWR1bgfP5qPILqrp/uq8csQiUuiP7QLQAOx4t4\r\nBXDNtMRCyqAUKUZxxQavOksigxCbXEhtKISmCDjbb7HE5KgQW+7N0zP0wlX7\r\ngHLrm5384ZsQiD3DLJQ8ZEXewu2klTpIuY4=\r\n=pYfs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"14fe4a42110ef4131097dd73534cf405f1fa75a6","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.34","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.9","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.0_1662591051077_0.10440033246064973","host":"s3://npm-registry-packages"}},"4.6.1":{"name":"@truffle/contract","version":"4.6.1","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.1","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"4d38049dc80da7245e591b55ebb40f0a4f258e89","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.1.tgz","fileCount":24,"integrity":"sha512-WYYR1ic8csYN0GVp2mhPmVZwK4o4S2CLacef69LygdFSsap/NTivUUK6wqReHiFBYHUbFE2fH8otlwHh+h3mqA==","signatures":[{"sig":"MEUCIQDES8dz7HBQA726lgjhXld0VqSZdh/g86WUl1w3jLbshQIgcWnM3BPt32p/YFbuGsNf+hlTRMoTg79IcfsQgkFIW2Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48318416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjInRcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1EA//YSy+yRrSXfR3wTXX3p/10OXawoxIN5Xe+gJRxGCee153b8JD\r\nO2zpFqWqBmMZgciuzfwlPwEtV75YR4yYpaLzUbu3bGd3upFCt6AwYl7KcymR\r\nIjRYDpAXAhEfOsrD2AF9W2tH7moUqMkqxEasaf1AvQPAvLyKq9qydjBZV6Zq\r\ny0FvnGnTzOV9HFC2vAGAgephoKo/nKoVFCTROVpY0586oLT8HJkJzYRxycCi\r\nevuL2pNlgv54+l/ZY6RjducyM4chY1JpPVj9Z/mVqpWQooxYbnX0qeh+oJR/\r\nHDwIyqcXaoNOYtrkbuCM7SU+lSupwmUfrPNDuRxx0imuuwNMZJicBPnjoifG\r\nihYG2TIFmBmzANkHj1l6QtE8Beu0A+nX/bK4sIWXQtmG9eUt75rPvLVZEqh1\r\npXyECECwAXKgfja+ANq5eC9khPbTluJGJHXjjtXZpnRuMOPCotloZTiJFYlO\r\nTz+k/082MwVg5fsiBE6vxUOToOzW0zcpoSvlp7to0c1pI8DK8eViCRsRCCMd\r\nIbYsMVr/sof9tGrMIvXsA436DGd4EJIJJcFWLv2YifMD7JfiQqZhgPTjVDGf\r\nPRMz+hjmk5eJuLPNz5ZoXZexev4jq28SujSxa1Wm6CKa77EQ47qEeK2U0FON\r\ndeudqG7g1MdGiBdZzmp1SpzWNghGvuUae5M=\r\n=/HeN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"04c0b3168075317b4f15ecab2fb69320eab2ae72","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v12.22.12+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"12.22.12","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.35","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.1_1663202395838_0.11647646710686477","host":"s3://npm-registry-packages"}},"4.6.2":{"name":"@truffle/contract","version":"4.6.2","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.2","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"6c117e54c9d103bc1d82ff8f225cbe34265c2982","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.2.tgz","fileCount":24,"integrity":"sha512-OZZIDmKtHgZS2Q6sCczNe8OfTuMWpRaAo3vwY49LGGs0VXLiwc7nIcCFh+bMg14IRK6vBN4pWE9W9eWSBFy31Q==","signatures":[{"sig":"MEUCIQCN6id5031uX+LaH0e15xSEjOQ9A9AVOIUZALMrAh+6nAIgUaAZWSU8pN2bCIDzXdJ3vjprhH0NMO3QLnmUbzYdHMM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48235325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLOJyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLrBAAi7ZV9JvVv4xAItYBfVyWEpLDLfB1oKeFf+KcbJtN/IlbUpBg\r\nKljrBWVD8qNdMIx3KIpSQzrTGMbWJa5vBrNcABRjkjE2/Dbt7zzU10a1Vdgk\r\nrr9LrM3b4wRTEYFCcULnMRXlkDgF7gsMhS1mLMZc2lHAMg3w6ETC7ejeXrNf\r\n8QoVUUzISwDEdfxP36GL9QkqYy+LV7g1woLSfz9WcUaSHjWtAcbmbLSFy86k\r\nSB7UPM5onAkA6BshaULRZ5Bnx7J/vIDZvMJEkfzLzv/4xUbEzZ+9bT/e4DUc\r\nTUgRvJrSDo5wzfkfCmKJZZaTaGQLaXUuX6MpDBx3DcGhPj/l7zoP4ClBJPq5\r\nyBkgQRNly8uOkN4j66W+7soDaEWEUeEoknxHGuMvjkrrGv6OQaNVNPfae/Sc\r\nqTrOLGRscoU14dS5sV1J0B361uLiPjEdUwbY7562ouu70m3XCNPkbeTwlkEk\r\nghPpN1lscyf2ieoZPK6MVjRKGdJ8ut0ZaIeqPIk+1TeOyX854D4c3ReR56xF\r\nFyIz518eTRatKjOik1AoY9YzF/gijR4/hZPdv9djOExqku+Ji072YR08SwgU\r\nBHGb9ZT3Iqk+BEQ25GGWKDhGlZt7o6TQOworhEl0tF72FzMqcIuFnGPzrp1E\r\nTh+ONsyyhVA6eQ+EpGN53x3BEacJd3LTKhE=\r\n=eOyF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"1fbb6b1680b6c6eef5a98b7f21d7faae30c03994","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.35","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.2_1663885938303_0.7762772822099491","host":"s3://npm-registry-packages"}},"4.6.3":{"name":"@truffle/contract","version":"4.6.3","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.3","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"5ba7c032d2666f6a16bad7bcc680bd6e767e4811","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.3.tgz","fileCount":24,"integrity":"sha512-boiCnXxYUr+9Iy8hiJN8b6pZfTlwnBCTKjqs8dqrLbA3QTlqTmsxkMMLZrqdIY+WuAU3yT6ah/EWGqf1rMvbqQ==","signatures":[{"sig":"MEYCIQDZKokDL+iU7GygoQbrPcq/AvzsSmR0vReapxBAPVxN/QIhAK1L1qkWj8mBE+B1K4u8XIiMlmOrGYCOp05GLfxMGoGk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48553970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjR0QhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNqg/8CuVDM+8jl6Ufui+3vYbTIwUlJFus9nNu82/SbCwzSUoycR1K\r\ndoLDC/15Zi0xMaTh05xMsdvaqPD9or8Q7uMyGgKZvMlVhN5isqfjUO0W685M\r\nFct0bEZuv5IPO+Z2otJ5XyqKoDXgLri8GcpILWCIJlx5lURAS8rufWhqXZUV\r\niKn1380VuotF2QuVyT/JmUoSCHfA25ZG3qqHLJlCGQSDxmIDAB7fe0DUWX6s\r\nMRW1ZEDSzmEOhFURvbX3dvJdKi2teBwxwQL1Y04HZNydFAWHfn88k2NsprlN\r\nchhCDIrAqt9erAK1hZllklZUe7jSln1Jy86Zpdx5TkPGmednBRpBv6TL6DXG\r\nQHR+y7N4RsbSypHZzTURepAhlqc9pcL+1whSib9XIRfTfue8nnqz91aLtzVU\r\ntxL/2L7TlEx6E4lkZ2eB4w9+wnq9lMdwCaGm0AXHMtloiJVHGAhNPRcfD5ND\r\n//2rsJUiLOCC1llWS5huH493PlftUco65asEsP55rW/6u4IS2x6c/PJ336o6\r\n0wKmOJaVzO9s9W+UqDzoYcFsNMHPu5A6HDXJwdp72rzf5E/AMqA/ENjFyJkz\r\nEsMaflYCbeoo+Cd+LJac4oI7ICbfG1Lq8xZxbkkkqmzkBRhyGRFCQGa/1oIp\r\nKGc3QLr3UlaabGeTJORUW8ZUH3SyaRPdYUA=\r\n=E+jD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a029d3e45cf1b65914645b5f8205dfb45592d56e","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cliffoo","email":"cliffzhang08@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v18.8.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"18.8.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.36","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.3_1665614881219_0.9968734725777084","host":"s3://npm-registry-packages"}},"4.6.4":{"name":"@truffle/contract","version":"4.6.4","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.4","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f6f97fd891fe2b90a99f2904b85a5ceba105b601","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.4.tgz","fileCount":24,"integrity":"sha512-2jJAOzMcUvjn8mMM4z/ZQ1oMQjngSwJI6DkImU8oCSmU3yMhHtLfetVFHxiT51dp4ZivieyJQgI/nD/FcITrVw==","signatures":[{"sig":"MEUCIHsbTsFJo7qp0eULscLjFqPnuIuQmNHFK87hSbc/MyuoAiEA7wV+lrx9P+LArmn0ieHST/0SFaIBhZ4i/XJiLf+tsYA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48634589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUETsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJlg//f7DRc0FNSR1tKTYM4Xav/A/tzI6JLq905Qn/erDBP2Vt7Kvf\r\nlzjrrb9qUaIa6yrGk6fVSTiLAhYOsjQztb0CCnW956FsrqMfo/WJMISzgxLo\r\nUIJDsVwkMd0XJixwp1dU6rBPZ9TuqvSLApbuZRSN6An9giUTcbTyqEwrpfKj\r\ngTwM949iSGHdk5e3S0pFyNA9N1cgTcc7z9riIfy+42kUdb0DijkbMZPEmZ8g\r\nR/5DorOyPaL46ESCzuwemJsgsmkudL7JNqj/WO89V9/nm7a6kSZNKT1lPjqL\r\niJD9mxCh5T0yJ5HNhOhQCvelmw8vyoNmi+EaZeKeaPQ4i2wyI2zqT/oFBtu5\r\n/C+Bw0qoaya7skeimx5z7yZSvfDyAovX4+yz5PHdsacigjllRLHPNL0xOmlT\r\nihcC4k8aGEh9jSsp11OwnQ9/ZZ8T0pVTiI/Xj4+GeEsac3grVqz7B8pCYXsA\r\nMoHGyGL7f1/hDUdb92YL/Suldm0tyCeC4GGfU+T+CEXHqCMt8EHKGONNm5UM\r\nyqnz+79+BG1aVJAzLpknw0d8WK8Lz36Y41s0q6ehDjNmzBTFAPvy92NVWLD7\r\nlzCFDBSc68hIi5kSa/ykxoIqKFo4K4MyZFzOhA2dWNLx8WY4x2AAxMbeCN53\r\nBhVAk/wvTUD2v0gymyXXzQmg/SyGBNHb02o=\r\n=PeO0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"035a92efc4979550e384acba50436771bba1bccd","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.16.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.16.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.37","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.4_1666204908060_0.11515778158259327","host":"s3://npm-registry-packages"}},"4.6.5":{"name":"@truffle/contract","version":"4.6.5","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.5","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"337e808d7f24e803433713438b252bb949243986","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.5.tgz","fileCount":24,"integrity":"sha512-5A7Xki6gP0MYtFkmfW3nDmftC/XoJyoTv3RDt7LBEcaJ9oVDFtKw7TiEIsJqRcOWvH23V6/rlZVb0WfgLPmIqw==","signatures":[{"sig":"MEYCIQDEqKpwTvworKioMXD+VrfUClpv4YKK7dbEoKMByhdkXQIhALZy65jMUUF8b3Rbxyu+lvRxf04mPaS8xvZbRQUfPB3I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48558607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWZR9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8qg/+O0ilpQE7CdJ7Iti32OTusppWnvVuUp4PBRkxSk9U0p999Y9I\r\nUV2oOv9bOwRrlu/ZsGOJVvpKcoRKilsOwglmA9vbzcF4sf5laIs0bYgZjybl\r\neGPXO+73AadPnzFGzl1/E+jAEEfteYnyI9hV5DH4T6bXcwu/WofiGtGk1iGh\r\nGf4Og3FV/9EKc0lJ/EVpziUXWMhF4/pHSPIk8XlXlZLUkGlmO+L74hAMWr9b\r\nLdSBhMx8YFPTcKZumu80W0RLKBvclTlxS3zQEYGPfNuwp2RxOvamJs1z3t6n\r\nn49wcyBOTT+xs1xGjVR/03YvV4NLFMhPduP7X8S+l91E11NEJykQNQj3vGru\r\nj2lE/5AB4i1qVvy8vBmoynCEozaubB9tD/94BSl1+dC/oB5cfn+TSMNSE6xH\r\nxvQSDsuBFS/Z/Ja1u9VABtqgWVn4J65Y6Ddgo6hI59bPz2UhBjUcDDWpuSqo\r\nb+Llg+K+e559rKy4tXXzLMRu8FeZuSyhgfBOC0k2j7MYGadnVwsga34+LU3F\r\nS8GOVDEmoh5/3CiU0Cj0uKtEX+DaNRYt1IxwcVrRXplCi1OL7QH7p1pUSfs5\r\n1bV6XZvTPSKzir76Uit52J/G5SiKTKyuR5x9quE3UwS9rtfTp60obZuhQApL\r\nNOwp1GTVob/R4ugMcV3tIuLDqwkLI3gyf8k=\r\n=4V2O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d1e3f2d050bbced6e7c65e8779702b6b5a9b7c29","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.18.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.18.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.38","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.5_1666815100814_0.7815224098466165","host":"s3://npm-registry-packages"}},"4.6.6":{"name":"@truffle/contract","version":"4.6.6","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.6","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"32391012ea515ef84cb4b6af0fc7e6c3c7ed53ef","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.6.tgz","fileCount":24,"integrity":"sha512-8pOlT+V2F9edYx/3qjYHtHPfVqwMSL+Puw6/7fY8mdy9UtlYNWiSCHK4DyvqsS01zRxExNfA9fMJC73IIlTQBw==","signatures":[{"sig":"MEUCIQCP2AbsGhxoDaUOBB03wVCb6ORfhvcw0bmoFDQsU2yGhQIgY+urXmkpaCMfyiAKtuCDx1913wWy7bvnbkh3wy4iWpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48559327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYtK7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCURAAo7m1+yi4m/OeDhDhep0J3y020vfIUn4bKwGousNq3zNqSdoQ\r\nsxDahNntEw5EMKdi3PptLzVQavPRHE9bSm17dCm60OIqBqsyAhj0RqUW1j3L\r\nJd/XE1gY2Y9zZbIhQv9yIcJsU9Z8dBGqOQRKLq5UP7H72rpy9WU/G/6c/yYx\r\ngmUPA+yE9xdFbqCofuQJARTuD3ji1q+tpDE4j1U5UZb55VntQ0mpePKhXr+D\r\n4sgE397vC62fj6uq4Cev0Rz9YoTpO1Lzb4RsZHUmSFHjA0h1vhY+Sx8ZFJbr\r\nCIQiuNkbvKgPlIYTMParls27IcG6ELvbR95c2qYUSpXtJJsdAyWGBCpCEbyf\r\nA5WQBu7kY8GX50vtG3kBRfr5akIk7K+uVe6CoyvrKYe8WhJV0kKZGRPFbwHw\r\npliJ0tRxLW/A1kgT6VHoYVO5Q6sXCim0I6qFEIfxHlmalGBKecJjY+dd+qWK\r\nC4yTcruaS/D7YEx7Q8Swy6EpXD8i+qs7AvSTTs6uo5RGR3XFTwH9qG5rhuau\r\nBqG+s3hiYPoB8NFQuu6LxRNqW7WEhHYo9tUmE1Xp2bM1zVdcL8Xz09/4QWnJ\r\nu46gUbeSAcq4y+SaREX/IlGmfdXf8irz3f+uQ3rWolBIJWMbjF/so+T+pcR4\r\nuazdLLSsIUqON4QtngDE2cHmZqJHz3J43Ig=\r\n=vGU7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"495e923676ca47ff7ff4c32b10c0af89ecadaa3a","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.18.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.18.2","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.39","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.6_1667420858733_0.11585877653229537","host":"s3://npm-registry-packages"}},"4.6.7":{"name":"@truffle/contract","version":"4.6.7","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.7","maintainers":[{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"81367028ede82fd1e581dcbca50132b32e36e4ca","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.7.tgz","fileCount":24,"integrity":"sha512-ILf6+0pQVxdksbceTyoSLNlsZq3QdUwDYVhjECfpQXdkO+L2wFXrvSDAmYGTRM3ibRD9ptOxyOpAYL4vRCO1zw==","signatures":[{"sig":"MEYCIQCLZCThbBKLlklbnA1Xw0CsVs1Thm8ZUR6yioCO/iDjvAIhAKrqK22pfohZ4UyAOZSeStpJxuVku+SeLwwRjQxWBaBP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48726630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdU+0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoz4A//V7lxkoBuh2wXeJmnZGSwvvNGnPbsXKxA1rKzfPQkRvldN/1D\r\nHJ09FfCFwjcb2dM33Z8GqfnBfB3OG9UM0titfACNeW+dpJ6/isGAySf54NYm\r\nf2iN8j/cN8QrF+m+3jQUjjZu+8WzM6JwQws2wTg7kLxzJcfss4FsDncJ30s3\r\nxM5APd1MVCn4lS/M0Jaa+JilE8Xwk3L8NC/dXtppwvmLMd479987ITIX9wQB\r\nJaNu+DHfRllgHegIuY2y1t7NGwKZcoauHBH1wXV05j75xrGOp+A3WCkHUPET\r\nLpEBoXAPkSU0Dm6lBW5R/o8YajwybHz1mgjoFVx0CiamyCRoWDGC8BqiUmpV\r\n8u+FF+icdVkxK6+EazOd3iX+Sn9vu9SavhMeElXJoUcyJtev/LJpqE+Sjpsl\r\nMSE2/kpOrE0/lWfiJcWvkK12j8Q5msUAGmyU1uADBFSRT2mIvefnSG3V32vD\r\nat/+WubwPVQ+L3BJtlksnqzf/Dnl2j3za5WIPKuzkTDkzr/hR+nozEFr2t82\r\nxqJa8Fppursg+nh2XCLispRIyp2NL40fwrwAq4BO/09RBLuseahS73riQIlF\r\nyBqsUWZfYl69UNM2tqc3NDnssnwHxBeDYAMZiOm3ud1IK1yhNtWB8gMe0vPN\r\npp3An3Nnm/JByVR02q+vlBa+h1gHAfmQ0y0=\r\n=9pki\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8db49f7df3f7e32846a5f42c03d8fa116288ebf7","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.17.1+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.17.1","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.40","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.10","@truffle/blockchain-utils":"^0.1.4","@truffle/interface-adapter":"^0.5.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.7_1668632500580_0.2645112307424835","host":"s3://npm-registry-packages"}},"4.6.8":{"name":"@truffle/contract","version":"4.6.8","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.8","maintainers":[{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2616a16e58a417a29436b1b9f430df42b15377cf","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.8.tgz","fileCount":24,"integrity":"sha512-cndUs/3WaF1RUz3whQHvFQS/9uTyadR5iiyNdOdvF4OYLN3agM3lLY8YIEGRgz6F9CELBoUnD15daXLEj6RGuw==","signatures":[{"sig":"MEQCIHWINWrk788UZJ51PngctxGJUTsD0Y9pwrw6w0FQSuTXAiA/YQY6KUDE8c94LRhPC/iHP34Dg1EDduE5rhiLFjJjkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48426737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfrCrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHthAAhAvwXWWjR3U7hTNgmzglctywVD3v5pqA01KTnS5D0NQ5C11h\r\nM6GjGZRTB7Vp7hiHiGXmRszyXwp3vEmREUk6bgOwbzMhMY8cpvrevHnYrUK3\r\ndxyIQcCfy6P+ayvL/pNYCjVywKGRYmNjf0kZBZIBgYad59PRLoeAHxs/LBEy\r\n0s4q45ALTj/BJvh+6VZzdvjQ4W8dyWXQ0QzvrueVNaDqQoHyQqypm5KNjjEv\r\nkpwPZkbWw5nSj3auZB4nhUEQA0tQvx22ScX+4s98KS4VNzeygQFERD7zY+50\r\nYB5z0bbj2RvGXDPYic8XeQyCehpOTo0h7iAJadVm3BklmzCeYBvvGWUPgWh3\r\nrGjSGOAbEBHoXK6pgYPwGr8QLADkH1qpwFVF+JiCHz/v+8JYhPZGemvUesW3\r\nhcT41RcsRkpXNeYrUc5RB0/Odkn7z9KmMidO3pfncgLk4s7qUyeI2dJz8W0k\r\nECx8PhfF7nxyTxevNVBBL8owAOfwjk+hEd6YM//b30UGrXyIP3s55IXQpnOm\r\nv6andXSh5UIeGzySs4d7/si7kHfR1FeoWbUO+NJv5ybp60GxQeFMtYy5FPd4\r\narBz3nmz8MOlo2ZH/To9V6SdS3mIXUOXhIJukfS4BJw6qB6rmlELHFET69ks\r\nkhQ1o5qlfU81pInoPhpDr0lSNiSjRHRiCoE=\r\n=FypY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"94dda0c2a75fda1ace35ab0009856699e2e06ede","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cliffoo","email":"cliffzhang08@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v18.12.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"18.12.1","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.41","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.5","@truffle/interface-adapter":"^0.5.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.8_1669247146578_0.5330342627231595","host":"s3://npm-registry-packages"}},"4.6.9":{"name":"@truffle/contract","version":"4.6.9","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.9","maintainers":[{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"79864deb1efac58210fcf317bd733e8aa5253ecb","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.9.tgz","fileCount":24,"integrity":"sha512-clQPA+Or6MQtaw1DVEdN/dKb5KXF2iDzBaK4KqwYdGSt5CXFfltBXHKloWTNeY4fHSiCU1X3EIMxGsH++Zy+Sg==","signatures":[{"sig":"MEUCIQCZU81uKz74UOXDjppKYLeKzyHX+SRP4NRsgPzRGtQQRgIgQcC7dOCcM74tsNJ0CXH2lyQgQ2rChfxQ6m+t6kPYfBM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47271818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkmVvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGthAAoe2WlM/G+wtWF8s6cUQOIMmcWd/UjBOtvoRp88wkoFRF9gbT\r\nr3FrTa7so8c1Txtw6RsVIkMcwvuZj277nzsWgZpm1C0soKtvmvOj9cUBLBAJ\r\n226n6J7P2g3DDPZeA/MN3Qng45GYnJL2qKmJnc+i9hkY6CgO6Zqww2DX3Wqw\r\n459FjYMZlgkLmlBy/bSVZQwOBu81aXpA6GM1wehtIYpu9S73XyIJ8AUYTkgu\r\nROIuZCGgClveocI47F9w0tVr+WzolF2N6NNlRFph1+CyKYSxqrqnQ7aT821r\r\nMORXfHlM8JXIEM/q0F8nnEWv1mbkQVUw+lKKmqRyN7xLrjmrx/3sD7jn7cEW\r\nAAPuurtXXq85pjrK3vRgTtuahiUDWy/KUXhpb0BBWCv1tgvwqZCU8BQmjJ7D\r\nMB/X07JdNx3+WThpNSWH/v4biSS0/jPoLU+LOuBzMLJKoRvwNdo/IT37kpw3\r\nVVcoagQd61P526mwtQslo06uDFnz3Q+q978YCyBEKl1GLKbMEjY5sstQEXus\r\nJvcCPdOIoAfhNm+ZMKNnx7g5DFGlRKJyzWQ4s36/LFfLhU6105tl1MHKuBg0\r\n3dmqU230M3mQdU3x/qpS2gxOVus+jiMjwyLtt0GHltw4yducNEV+Kom5Nmcb\r\nbs8YW1pwqMUs/QbLk6ZhgP5YrFhzzOgZrv0=\r\n=kEp2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"28d00b8946b7e8d792f87bfe35c94af6cedc401b","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.18.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.18.0","dependencies":{"web3":"1.7.4","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.7.4","bignumber.js":"^7.2.1","web3-eth-abi":"1.7.4","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.7.4","@truffle/debug-utils":"^6.0.41","web3-core-promievent":"1.7.4","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.9_1670538606716_0.5068642979886746","host":"s3://npm-registry-packages"}},"4.6.10":{"name":"@truffle/contract","version":"4.6.10","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.10","maintainers":[{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"94b2c59273cd142021a6d2fe4de7ac30f572e184","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.10.tgz","fileCount":24,"integrity":"sha512-69IZSXeQKRP3EutILqe+vLY5A5gUpeXUiZhm/Fy/qHHkP238vMjtOkTZGkY6bonYqmgk+vDY7KSYSYKzDNPdCA==","signatures":[{"sig":"MEUCIF5hUMUxH2GFYXMpuK/nUj1ow1kbKRb7UTOInSz8CYA2AiEAqLwa5acniz9fUs7IBarLK9Oii6qYEiDp3x0iuJC9cZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47892563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjo2StACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrybg/8CKaxmQXGkEb9LsomzbWZg9W1bfO3Yz9I3q5NBavYG+zG86in\r\na2hCJS35hA4iExxhrT5b3HVTPf3k08VrWdskbZH9HG0JZ5h0JeqwncvY825V\r\n0eU0JmOkbg8fvt/Els9OP5IEpkpSX0hHgyadxlk2ccH8aYWIcuTdtU7MMbb7\r\n4G/KSJjKPUJoUkFFMqJN7VuVv/q11RX5B7uhBVxb6gueaXknbM63kuGqU7Q4\r\nK7fjfd33aZZfroJfguY7s5l2b5WPhAXce6cZTU4WAynhSSaQ6zeWHmq0TAkQ\r\nUuONR1aYYUL7u2RpMAZf6Ed5LHvMwtFqy0da7sxUcVxQ8YKEW+DA3eXTWxgg\r\n+iLHlci51xf5HHBFVQSnbwvBcE2ehTbcQrpQzxmmimpfhkuHoCTcT/URvLTS\r\ndnztKtb1EHodQQoA7BEywyXL0UiihsvLLMuTdXQ6tqqdTqPp1F0k/uIHJ4ZH\r\nC+oyiyK15dbHaOzuIhXQ1Ymt8pYbZYDoDlOQ0+vGfbL8gh9bgb/5HrjL6t9P\r\nGH6xVW9fkJhVP7yjf0A7fTARcjRT/+oSWOQS9gQCa4L2XxqrMMZ5ASGJG33U\r\npMIBW4ejDrzRTtALGhiF81M7PcL83RMONVV/QseXp9g4CEeT3DMqMtfdlp8+\r\nZA8NGhTz40I/ZWqUwUCPpQIyVzVvaCTMTbI=\r\n=ih2k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bf91e462f7b69fc3b9dd022dd36c8b71410fe3af","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.18.1+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.18.1","dependencies":{"web3":"1.8.1","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.1","@truffle/error":"^0.1.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.1","@truffle/debug-utils":"^6.0.42","web3-core-promievent":"1.8.1","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.10_1671652525181_0.22779504412610674","host":"s3://npm-registry-packages"}},"4.6.11":{"name":"@truffle/contract","version":"4.6.11","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.11","maintainers":[{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"7e426d2507a065a5ca01f653d81e9676be747f64","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.11.tgz","fileCount":24,"integrity":"sha512-0YUS+4D4M+tLFx9JSxFgr7zfYBnHytmLDBjQKemhH/19NbSfos3bajdB08nKAphVM7IisoKnaCd5HOsEWusJJw==","signatures":[{"sig":"MEUCIQDFL+vVTU7hBHSaana8ioVH7N3lKT4RP2shl1sN3sIWqQIgMQsxcFJy+TzMdWTrImHmYfiGIE0QyOF3//eP61va/+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47845416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuFIMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoI9w/+JPaDgCoaCdnsP39SN2p70mBHr9k+Sj6KvYWFMSTHkh3q4uRY\r\nTgt+5n95RCPnupP/FLHtixlNKDKUA633ghKk8XF51JqUlEZLbHOc3fSUdfQ3\r\nIqA+r/63yvkHtzFDS0Rk5yM7Uzdu1pYqCOQvK1GooS380XN+/Sg0pIBYPlx3\r\nv6QHDXrK+awvK6JUunk4wy3B3NO43XDNPbsK8nTzx69cZZl6Vgn8nx61QFoB\r\nzDuMjiSghHF7Erk0hzIOVHrdJ+1xu8X6mDf0MbWKdU5vAWnwfJjHYJlNY6+g\r\nT59WqCkatxgIL+2jm7UT27pdSrSaGAanbfW8Zc1ZVx867sXs67CC4e//PO7Y\r\nxoM/PBOtK39ZVVOTaIN5tB3PM/RqCWEkyAyIe6f94WFm4Y55LLnN6pSwBosJ\r\noShCBihQDqyIp01X3SySW+v/D1DlmmqWx/MTlkijBnbrQ24XFs32SDRG4bOS\r\nJsrGzk16fAxRFrj9SqRyJtVErczJ1DhNHX6syWONcrfD72yIWmr+QXQJ6thI\r\nSq8qLxRForQ+s9USCnHitUN5sTz6KV4EoJnjDay/O6qsbUf0SKfASuLjR3xO\r\naHP+syX1ydFtMQCGaZBbxkXuKqtA4BkbQeMyLaJJZgvZW8ccNuFG2ILq+aOB\r\n4jEcSaRJk5Pnqn+g+u8r7iuLdy0952KAkQs=\r\n=ofQq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7d55f4168f2deaeca954bdb18a07a3e0d38b487d","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"lsqproduction","email":"ll@trufflesuite.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.16.0+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.16.0","dependencies":{"web3":"1.8.1","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.1","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.1","@truffle/debug-utils":"^6.0.43","web3-core-promievent":"1.8.1","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.11_1673024012301_0.8201964132604735","host":"s3://npm-registry-packages"}},"4.6.12":{"name":"@truffle/contract","version":"4.6.12","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.12","maintainers":[{"name":"dongming.hwang","email":"dongming.hwang@consensys.net"},{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"1206edcad3acba98f13863c9b2329ea791431914","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.12.tgz","fileCount":24,"integrity":"sha512-yNB5oN0d/AQgDMQQnoCjFDODMFuXUPbSRwK2vLAlX4/IwNZNJrNAkFPEaknMAvYWzZJjNWOj5lJraNc7Xn/enA==","signatures":[{"sig":"MEUCIAJ87/eGM0+A7KPiMXkNeMU1V/IPybKg4De+5oZfl0ozAiEAhcaG+Hfq2iW7HSRKEC0kbosgm+aP20RDf0v5AXP0Dv8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47845416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwKLwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqg8Q/+Kk+FWFz2k1tMnUkG73cEwwLPGOFcaldF1IxFsx50ay2xC+uw\r\nCh4fcQiI/xhReBPfWhq6Y+AT2/KKkyQZ8mccECFP88gUori2NLtvbIX+C0Et\r\nsEqxPUr7IrTj+5hIx9jHCnFdpw7quYeqbpQXQG/OcROOf9ar1/ITzL3E6s3c\r\n3Z1G7xS4gQ2X325sq+FGVp4kDI7MRSnNbOyMu5VHMemv9f+s47zC2ANDlo2p\r\ndZBgOU34Z7WM0V3YCueIAP+4CBgQbmUWqFeNoRY6allzOiTe6eiwXlc4Fcze\r\nKBDw+uSJg6jsbUxgvrKigIsVphb4y3ItBo5kgSPgSWc6ii+FGN9O2zTExLuK\r\nL54ygWiqxptYu1Uxfe3mV6/++x51vJNfqZ28IN4wWaOkOir61t/BdXJl+Noy\r\ntfzP0Twds0+YkoPRlakASUpZ9906/Nw8YOMzwivYOYqx8mA13GadjrL+4IC8\r\neKQ5s+YNeS5ClUGCPQcOy3ebGJGxgI8HuUPC4ogU4CCyOPRtknZGoMThHeFU\r\nsT6gddhX5VR8mpES9u8KSmHUohazMsg9KLXXBKa0t6lwBdTDVdQliTR7dopi\r\n0yA/i3s6fUtC/6c2aQwuRmJN2mdQ5xUL7E7ZbqJRPcEXkhXMiQ58humxNfU0\r\nXdP6E3KzAlOL/Fb0QsmG5D+Ww5S8IWlWxq4=\r\n=os58\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"b04cb5bed94edef36136df5c68bcbe9587eccf38","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.18.1+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.18.1","dependencies":{"web3":"1.8.1","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.1","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.1","@truffle/debug-utils":"^6.0.44","web3-core-promievent":"1.8.1","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.12_1673569007997_0.3197374572666063","host":"s3://npm-registry-packages"}},"4.6.13":{"name":"@truffle/contract","version":"4.6.13","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.13","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"193e141f01f62f7bcaf8ed8b151922d12e0acdb7","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.13.tgz","fileCount":24,"integrity":"sha512-tZ61uc1K2uithR20V4xTZSs/LS7qZFEnj0gfStJa1iIl4Ov4UVKEcHQ4uHRdnYfb619RXs9uHwiwBBVykwbB1w==","signatures":[{"sig":"MEQCICRljpgq4vnVIrluGAH4lH0DYJ5eISsn4C3XDrn35E+cAiA0ptLLOeXlpqaOkatIX4jj5Vhd2uaowX6pBsKTZvfILg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47894778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0xkGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZbQ/+JWs43IBGgXHjO7DiQPpPkhWP48azkPoKSMl67S/wZizF761I\r\nGSghMWp8dvIhNSZD/QOSecAoeIuG5E+KCQ0n6O6bCR42QeZsalvayHxSIsbp\r\n0eQcWLaq6pYzyUxJ3oYFaiEcDILH2frtWYrPthjfn1LKF8lV19Q5gaAprd03\r\nktwEzZd2KzvHnpiyhDW0Hk2QGctVnVbguyVS2RbUNgHnqJl4ANsg58vYWZnn\r\nP2oDRv7l266eP3eE2EX8+s176b6B4lubglNqiON9rHCAkG3lvJmDjiJb79E4\r\njUAQZw0DUmP3B2Z2INrQ0LbO+oA51YTS+0osBe7ynjA4v59Ql06+rtbqTGWb\r\nH+Voye2sDBG8JngGEp1d/W7gMIeG/EMb5AlKKgmeD/ElOuKZc8BlHXnVB3+4\r\nvZuSSsU+VLUqWGO9XG0L/42QGPNBPXjtcU181d0nRkT4S5CFwUiA6W3DHw7Y\r\no+ViKb3kycyiXAdcov1nqIwa45kWi598y+hGgmhQlx4A/NilHinaJGSZWny/\r\nuxetksQQrSrYrM6p9j8ONRdjjGlfP3SrXvBAStnFcehA+BWSu/2BkA0ftgZ9\r\nxW6iQ+DWiABJvqxRJwcezI7H/rOZndSjVJGsjVLrHz2n5V2Fe5xYgs1QF0gY\r\nVbtMxsdap814DE2lVVY8D073Gq8QegiG84E=\r\n=iyPM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"dbefdcbacbe19f976aa48303d9fdd5330aadfab2","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.20.1+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.20.1","dependencies":{"web3":"1.8.1","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.1","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.1","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.1","@truffle/debug-utils":"^6.0.44","web3-core-promievent":"1.8.1","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.13_1674778885773_0.265809219210859","host":"s3://npm-registry-packages"}},"4.6.14":{"name":"@truffle/contract","version":"4.6.14","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.14","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8bb4b443a1a47ae46ab71c72999d5fd21ce79a98","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.14.tgz","fileCount":24,"integrity":"sha512-8oXGzJIgCYdHKjVx6bd1SxA70VOkSRRinTA9DSk2yioorBw5UGdEsqWQ+tkfQ7Y2W0J8jpQTre9Oxha8mAzHcA==","signatures":[{"sig":"MEYCIQCZ6dtGHv2oBYqdsJGK5k2x7d8gq8H9NOLlMVlT9af+nQIhAI3vAe4qC2I/zfRUpU/CMhVu3IVxUPurIabQPIu07OTh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46399281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3CHcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAZw/+OWVag/0/EHvCmwjg43/3tuE0F1ljCR+/7lAIfawPPQ5rnGAj\r\nYG2xSpXw/d739ViMPRXRCcIjufELnd0L+PCrAVl452QoH1HXHivh2qtk4HVF\r\ngS/VDsw1d70NbMpQholpH1TOcpZevrAIRNeJGvXCa4HLBsT2/+LCN+++97bY\r\nCUpZnQQTNws0Rke9StBylbzKhs5TsxQsfndG/DMK+v7SSPwIDLFIEi8dB0oL\r\nEmXWE3rwApk5TONdfop4yl4NFQPyUc7xZfgRkn1LkoUGw6lVPqlM3QVERtcr\r\nejSR9furFFepWc+Kv6F3bgIvC/D8kL4OOw38YRqR7hy9E0vqBNjk+9HUnog9\r\nMbhFC3J+zkfpwkcgkPP+9ndJ8E/f8Hv2yZ57VaFEBdRU34oO1fuNp/azn5bb\r\nheT+6q0Bana89ueexk5h8oAFJz241WNgnCoELNHC87iJ9SLtmrkImDnuUHFa\r\no+57wRy+qwO/NeATtBnYA5IXOB6BIYZqSrtJsFPJT7i5ZSZ7sD9/JpzEa4Pq\r\npgOjHn/EgdHSecBuXzjcNZGbyQ9PzhDdOSf4XlC3h9Ec53x8QnUkeqRe/7RZ\r\nrvG2nQAranmv+iE0SQnrmhTzykJWY26f36rs5bwpRUBwwyf6X05Etp7JQCDy\r\n9S/Gw2GxJDhGTI8fA+10KbU2Zi/dzX4eZ+k=\r\n=qzfF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"758ea22bb681b289fa6269d0647ab48deee93062","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.20.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.20.0","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.45","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.11","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.14_1675370972238_0.8241642467416792","host":"s3://npm-registry-packages"}},"4.6.15":{"name":"@truffle/contract","version":"4.6.15","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.15","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"2a2e0cb146534cd10d24a57e224e60f0bbade18f","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.15.tgz","fileCount":24,"integrity":"sha512-3V+50z94XRh+I3axz6Zrot1wlMhRiG2O9XjR20LwR5YBnzHV7YFfOs8x6pluXVLQyxcVJBISJyqxvGxpkecrZg==","signatures":[{"sig":"MEQCIFDNrn/4JZASQyuqeYB+ZeX5Yig2RfKrOJBnEbz3YtTuAiAFAot5QTGAGzOAxaXR2NWBjcC/DAeX/kaIlulndCAyxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46367258,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7sqMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqiow/+KZTSAeIXzfRKmiRHQjha846Ijz8j/sHZcn/ayKqdA1e5/B4U\r\nnY9wKz0fW+IhQNH4/Vx6Pd+B5kJl44wB5ZfyeHwc2YSi1C4L4j72hyJV7Izi\r\nihcFH5h9JF2+iNEI6ELqRkFv1nl9XmNxYQ1y70uKC2Ld5j0WhpbF5SjxC6Wg\r\nWujUhjTLywEahmOBQf0LMDZyhMoW+clf9cKV18rJsfD4sjV8xd//wtvRTgN5\r\nEJPjlXH2+w91acXvugXXL0YKtYFkl+g4d9ncOE16hUCVICMlQEWAHhQ5X6yy\r\nd0T6cG/tr0ukoT8htDbTxodkAsoLPTxIHt0ugNILdcSp0qqE6anSA2T8qKsK\r\nZx15TsS/rBmLqmy70uKgAARDomrPHRtPIlOe36wJp0zD0ln9U818Uqm1xPev\r\nCrDTWv+Gos7Az4CMN2s8Rg8b7G1NAOIgCgG69XxNKhYc3VbPyLotKJPt0aCN\r\nG3eTThw3PXdXT4Ac0rYubMrnzYS5NdjytwYwNTRMYN37FXJaSO4ZeP3eJ/V5\r\nEsI1BFdlq2gnOEw+pCHIFG84ay0VjHhfaEnKhlAV/86G4Q7oTvOly28I8MwH\r\n4N0l1WJ2ixF/qncELha+4l8Y949w0VJ38SjQ32r2JLNju0tpvdtijXoz3/nQ\r\nEvlPAjKQgMAlx4KMDs47RkrtL1XPxBCIfHU=\r\n=ZVeP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"021f4591abbc47f25f46cf2b5849bad808adeb87","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v18.0.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"18.0.0","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.46","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.12","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.15_1676593803893_0.0629263217148357","host":"s3://npm-registry-packages"}},"4.6.16":{"name":"@truffle/contract","version":"4.6.16","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.16","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"ee5f3b1bbe145918c11f38e6657193006ac88814","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.16.tgz","fileCount":24,"integrity":"sha512-KEUBE09P05PV5RmkQ9FiRrTR1FJ8Hg7vcSGpCUTDhwpRWTrYnrHpjYDRdn+RzdJNE7JHvRqk++tKbnU4fu3q5w==","signatures":[{"sig":"MEMCH0VO179aeByL1fb9bi1I/XCcx5OHirrk3j46giS+pEkCIGIQgnYxSDOkL0+eYFx3v6vQiMywnTQ4oekwvJA6+Vv1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46403922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkARZPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHzw/+NXrwc1Cir1RsMFfoJAePuUsUuechnXCFZHtNM/LtoP7I+r7j\r\npg5KEz/zyruh07Q2+C6Bam02MX10OtOHRnX3hA42kA1W8gNpPYOubT+qJTRF\r\nyyDlNYDd4zXcqNSkX/FWlEaqksX5Vhnw+Nnec3zK6z8PWiaI7hmDIAgBX2Ue\r\nxkfKFuqrYX9/Omy5pekw+yzhC9+n1qrcOHu/ayl83HwIdPI/jCgOi0Z/uyDh\r\nzUqwJ7r3DuhVAjrBGaVaG42WjNRqIJSDgEDIon2GvJwIOjpT50z0MycDKkiP\r\nCHWpUHD1Wuqbq71We8h7NlqtT5z1kauyp5amiiB4dGpKJUwXeWqjrIz2UAM/\r\neHbUGSltKAeMt5pssx+LCVtq9SomzTc7IYV+M9D3a3poolAsswXeZxpV9TFh\r\nyBL57Fvgxyf0UUex0w0/1E6ttiPCArbxQA47CE9dyEkM4A3rPruFBGvahut0\r\naSsgS2V1hFSH2iIo2hgA/KzsNRUiZ9sbNjGJqF6QDOGSMcnEvMge07pGrC4R\r\nHP9CFp4t3ouef76pGK0bhTu1rgqLNnWYFcS8O8qe0h+s4rN5glk/twLQo1po\r\nRuWYKdXns/iZ9iYUjYDEe09JdCIGHVGqIhpjFcAoVaW3xkyPQTKH3axVM/6Z\r\nPsuxEuH8rYZfr2rxPd8mgeg1Ksqvku4uEyg=\r\n=eg9W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bca5b9cc5d06b94fa131d189f39bb117682c7941","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.2","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.47","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.13","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.16_1677792846570_0.30699264579471985","host":"s3://npm-registry-packages"}},"4.6.17":{"name":"@truffle/contract","version":"4.6.17","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.17","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"d25bb1039c8d4bbbaee19245173e890770444848","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.17.tgz","fileCount":24,"integrity":"sha512-sIMam5Wqr9AEiqHfOcWGJGqTv8Qy+BT765PaNHUUT6JBAY+tpHM3FlQd2nM6zLJ8paR3SLDGIthkhCBH/KNgDA==","signatures":[{"sig":"MEYCIQDgnSz6HzvRt/FsUkE8sX+jbpOQpWIDv0Y7TrI/hmukbwIhALiTRd0Wuo5synI/S3TPCa1v8CvTn1Nh/PO6THf0V4Bf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46334772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCn9zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4dQ//dQYGbUMkjnc1mot4sb4l7uscSOZJG3CM96g0f0u9CgmtWcfQ\r\nlnyFDcKs2UmGqF6DZWFXm/ByWgeyVFEUzehb+KlPAtdHZJDhf/RZPeToYmVm\r\nKPwKDF4OcJnHhVlYqQz4d8DpNnym4AIAexrJfI9iU25+9jaoVyZiv8QjihkV\r\n7jSNvcdrXu02OFLuWyVrxGJDthvTTvgtfOVU2UHHJqu5GyNLB3t0u8gcDn+r\r\nuaHIS/CuDLSRiufY7SWzGGKibLCVEtbFO6wfV7FERFal4Bs0IxElkMOvA23S\r\n01vGni6RLkYtRJ+8X3+VK2bUYK43u1t8N01jP2Hyd7A/tIrqQ3JUL4aHaSFK\r\np4xMMJ9WYFC9BotgE7Jxn8tTZ0Td4lk8rD87zPv/LuZPTaYTkDb11v4RTOw4\r\nEVA/7lNbpDz+PkY1C67T3DXp5ol5IC9r/cvYPPy32uBkeAly+BPdywaW3B4J\r\nycC4PsivzizBsa8xaY91GBBY9/G6ASDiaTVB9reCo72WJZdjmqTQo5Zhbd5m\r\nHTcFXpfpV0HsoVNEWkawnlVr3fOf/+QKf1M85pgRJmy83788Tn0jdkY0NAb1\r\nWF8Y99PthwBvi1RzzQ0A1HCs+Q8q5mGYYAEt3Os1y7oY8csvjgyLo8TmIDV7\r\nhUiZuVbynAS65nEH5HoWYKTaObqciOJXbWI=\r\n=t8bG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a75816b8744eb4bb390866b45b4b7843c630abe3","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"fainashalts","email":"fainashalts@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v18.0.0+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"18.0.0","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.47","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.13","@truffle/blockchain-utils":"^0.1.6","@truffle/interface-adapter":"^0.5.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.17_1678409587158_0.6392784558771685","host":"s3://npm-registry-packages"}},"4.6.18":{"name":"@truffle/contract","version":"4.6.18","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.18","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"096f82dbc05060acc9ed0bd8bb5811f497b8e3ad","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.18.tgz","fileCount":24,"integrity":"sha512-x49EWZI16VMdYV8pH2LYM1AMFM3xAZ6ZFT2dG9Y71nIDZHdh+HKdlPSL40CqFtzpeoEk9UQoSJL99D/DXtpaog==","signatures":[{"sig":"MEUCIBgLUCI9GsSTdy2nhw3IufUkiLtbjjcBSrRKbw62HDRkAiEA+E4kKNk93tbd50tUNXTsDzLISGLBkKnteWFar7x1Zy4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46501109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFMBMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqd0g//Z1S2jXM/Njxu0fmmBnZrpvKa3sWI3hRL9H4Eb/abq9pqMWAO\r\nPcTLtvYYaDYQQ8arawr22WHUiZIUlO6Quzq1VlZBw23WU1GpITzmMTZl2Ex+\r\nTxdyKsUz6XMFqnqui02OgM44F/FJ+pFQTXEDM6/dcwX93a29VRCjS38Hp4Zk\r\n6WlbGCv7J09H3bglSJ8kbhhfsO6FtVOJaXmvFZw4n+DokN0tLBjGyjQYG8Ef\r\nY18vmWQth4Jv1oCGrFKLxpNKbREBIvFDV1XIArBJh/+wVLQqhzORYmin1VYh\r\nM+DvDfIOdSMm1u3UQ59Kw6cByRO+YUfqNS7EYBAOxq9CIP7O/T3PG/6XkX73\r\nrejOVniNK7by8rFzDAajYJcfIlYsllNTfdUBSCzuKPns3aKYJXCFG8pli9PE\r\nz+yvn6h/n1a/oXVCSoz2QHdZFCVKys3oFdHzWOl59eXkTpQ2Pvc3BaN7ppxl\r\nZsWewL11jqwHCF/ZPQZGbHk4WmHKQ9gcVzdAacvK2CADWmYjAxaYjIrWulpW\r\nDbFDsC6wtHkAxfmPe1seD+ItesPnK/lzFEUaeESKX3wFEUH9ISXpA3UFwfq1\r\ntNtMLdS1JU5jN2r23HZzQzu3ZzaLCpPMSOaBKVww9XYj2oSyu3r4EXUP1lZH\r\nXxSVUJ8dCPP6THjbOA7iuo040mxrEc0zLIo=\r\n=7OPF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"85ce4848034457c042662428c37012bbb71d2bb6","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.2","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.47","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.13","@truffle/blockchain-utils":"^0.1.7","@truffle/interface-adapter":"^0.5.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.18_1679081548278_0.11326833164461081","host":"s3://npm-registry-packages"}},"4.6.19":{"name":"@truffle/contract","version":"4.6.19","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.19","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"27492ea54ef6c8beb7d527e611c730254736e9e0","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.19.tgz","fileCount":24,"integrity":"sha512-LV4JuMWa4juySKCj4PHQ9YpP/xLXDxV2BQR/IEGIthhQb7jdo+BrwSxuRjO3kn2CtI5KxUpL99VUOTLvAz56iQ==","signatures":[{"sig":"MEUCIQCHoBQv3jEgsMBZ7IiCw5V9ArYdgE9NVVD7Z9C/poKvnAIgNG4TK6uGMkd5Zr2ixdyyZ7ddWXDy3tzj7Mdyrpqo5ZA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46501266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNILPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqrpw/+MizBbZZEGVWck20+YjbEmFhw4uGMY0ElBniCw3ZNUBUArU30\r\nZgQ0Ym6AkvKNGMK33gmkBtHyx8l6rZEZt/BV158rLU5sOqDmIXM3fucMADtZ\r\nqAn5FZV29wkToVzoKOMV860MKVFvAeRIkgoWJgcPvnzjOiapi7SOWX63WVtu\r\nK9JuvAtwlx1MadveGgPexoY9SykaGIN4m05rfdK2YDd+a5XsreiRNc2KO4Zp\r\nQCwwxQmYnKFQx94x+SSTDDKw+gicvZfyD/aT4kbcBBy8rVnFxemRQ/y74Xus\r\n4Ehb+0C7gXaMpPe6iU+C2tF8bDNY831d4gFbwar3gs+uEl2h0USUWPG/zQlT\r\nQAdRWbF7e7t5lsi+tBRCRKR9unYf5XuWV4JKdikyZOEHrkfQfMgmPqBtgzJ+\r\n5NkO2xWkd4/kvT2nG74+PRrsAIpnxVfDt6sJuYAlpAm86lwSJ/sgHSQ3VjC4\r\nefuuIusiZ/eGAEty/7qmePehJ/u6L7Z99TKSgCVE/8FLO3T2611Q5pjqlBi2\r\npOIe+WvAq1ZNZEdjngH0dt0/eNdoVybe2Djdfj2VyyLdnLIvC7SlUh3imoOd\r\nfTIp6sW2XCbchtzOUo9V1aDbVnjmGWlLeLvdcBOisoD+Un7Du0CisNe0XrUs\r\nfwqbtgy/w3UqY4fHULzXZoJO8k7TrIiRlY0=\r\n=Q2c8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2c3ec3c44eaa2f791d429e85ef181ac918679233","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"kevinbluer","email":"kevin@bluer.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.18.1+arm64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.18.1","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.48","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.13","@truffle/blockchain-utils":"^0.1.7","@truffle/interface-adapter":"^0.5.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.19_1681162958620_0.14228460557775136","host":"s3://npm-registry-packages"}},"4.6.20":{"name":"@truffle/contract","version":"4.6.20","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.20","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"48237b9d3fe3e5019eac2c8ce9794201ae84fdf8","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.20.tgz","fileCount":24,"integrity":"sha512-s7Mbc37L/CF5Apy/cjPnalkgACmG9tTAmcIW28cIZLRLOUAze18pqhtdHryxAQhEOtKGaDAho6TriqL7/74uHw==","signatures":[{"sig":"MEUCIQDJSwlZiEKux1QLNGIgLQvY4/GjByNufccObxv9S6A73wIgdVWRvg6EEMtFc7WrTsYTuwZsewlTkenAsAObeDbTauU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46501266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQZVsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYVg/9FAGmQxvR6/r4bTDibH1MKPeL3EI7aPGAQQIzubqwwlfat31W\r\n6AhjXo3TyorCbCEiA1vitfrahPFqPhUAdPHx+em7fHkRqE091dESsUh4iyyy\r\nK5fd2U1wOvRE52gtlCZYbkezYC5/D+/qGekfOHhGMp4c1aCAuDBGtU0RL9ZT\r\nH6sit5ZCWT069FHVfNIakUHzo3R2+rq3C5zFgIFsqUgJEVovDwvX11PDP402\r\nN98D376e50edg2JVIc2UjyMXGieTIH4MQ1EMTk+dsNrs3hUozThM7O5XL87X\r\nADEBio4RThlOJSpNPKAUpaHSYrqut4RcxZuNdfGQ5TjqCBwzfwy/BaZBLAcU\r\n2mMVP3U9MBFX6oYF3iTlqPVGtpXL8KoM7e6hLsG8wYd5FfIdhoF20cUKoiLT\r\n9+/9ArciaPfL7A1xcQcFZMkjPBIA+V6rR6vbSGgBIJQn57j3H9qJ/ME8mbZw\r\nGk+p+qvStNPx2WX1bvYPKxbn++hJuMp5hABHh6ZJOIUHzXvkiG5O0819uPOS\r\n4DAjH4aOMYMe51avKOKGoATDu9w2RMRDS8EViMzQQbKQWSqnB2GFLvqfZnjK\r\nWcHeIeKlZamWdn2vd3Vf9ong1132smvJffKjT99GG32SZgHtYiw6hgXLCO4c\r\ngdrmnUT6SSIzbJYD3kL156wCCM0CoqPBgaM=\r\n=ZDcc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bf6fc4899a856ad7254b1769dd0ff8a7990c68fc","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.2","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.48","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.13","@truffle/blockchain-utils":"^0.1.7","@truffle/interface-adapter":"^0.5.32"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.20_1682019692218_0.5083349455048689","host":"s3://npm-registry-packages"}},"4.6.21":{"name":"@truffle/contract","version":"4.6.21","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.21","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"8daa094af81b94e2cb605f0f707e66ece72ad660","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.21.tgz","fileCount":24,"integrity":"sha512-4gfwDhAVcamEDivsVjHkttrnQp5cWgXeJGZYZ8tlOatJKlq2Zm3ZnW98/VDTvK3evkNRaUAAle1ucowhcisyJQ==","signatures":[{"sig":"MEUCIGQ7UE3yFbPs38/1OUhpXwIp8nO6lm2Y4Ksmr0NFwzBnAiEAvs8uJ6zsK4QFvPhycLFFUsOS8xm+fufuCc2zZxDslp4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46594177},"main":"index.js","gitHead":"97a11771e65ca8929182cccd4afcbcde2852be3b","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.3","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.49","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.13","@truffle/blockchain-utils":"^0.1.7","@truffle/interface-adapter":"^0.5.33"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.21_1683769814519_0.9099649838876678","host":"s3://npm-registry-packages"}},"4.6.20-visual-debugger.0":{"name":"@truffle/contract","version":"4.6.20-visual-debugger.0","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.20-visual-debugger.0","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"f59fefc58d1aaaa49a1d392192a5bfb6b4953ae1","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.20-visual-debugger.0.tgz","fileCount":24,"integrity":"sha512-m7UT5jpg3m5JQSoz9I1H1y3+eRIOXO2xRubqe0rUnsc9C0YFAD+/Cu26tWVuG1795RAQv0PC6lS7WDryMQfu3A==","signatures":[{"sig":"MEQCIENsp3NMwrkPW6zUwdt0OG6d8xbUugMObUuS54kiCItDAiBp+8ytFnJL/XXk2clQwcLN3wRhR5nYmdWFJ34/c7tkuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46508534},"main":"index.js","readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n- Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n- Promises. No more callback hell. Works well with `ES6` and `async/await`.\n- Default values for transactions, like `from` address or `gas`.\n- Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`.\nThe contract-schema matches the output of the [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor), so you can pass in the artifact file Truffle produces and stores in the artifact file when you run `truffle compile`.\n\n```javascript\nconst provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nconst contractArtifact = require(\"./path/to/contractArtifact.json\"); //produced by Truffle compile\nconst contract = require(\"@truffle/contract\");\n\nconst MyContract = contract(contractArtifact);\n```\n\nIf you aren't using Truffle artifacts, the input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all Truffle-related projects.\nMinimally, it requires the contract ABI, but passing this alone may cause issues using certain features of Truffle contract.\n\n```javascript\nconst MyContract = contract({\n  abi: [...], // minimum required\n  address: \"0x...\", // optional\n  // many more\n});\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n- `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n- `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n- `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n```javascript\nconst instance = await MyContract.deployed();\nconst result = await instance.someFunction(5);\n// Do something with the result or continue with more transactions.\n```\n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nconst MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\nconst contract = require(\"@truffle/contract\");\n// Require the package that was previosly saved by @truffle/artifactor\nconst metacoinArtifact = require(\"./path/to/MetaCoin.json\");\nconst MetaCoin = contract(metacoinArtifact);\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nconst accountOne = \"5b42bd01ff...\";\nconst accountTwo = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nconst contractAddress = \"8e2e2cf785...\";\n\nconst instance = await MetaCoin.at(contractAddress);\n\ntry {\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as accountTwo.\n  let result = await instance.sendCoin(accountTwo, 3, { from: accountOne });\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  let balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  result = await instance.sendCoin(accountOne, 1.5, { from: accountTwo });\n  balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 1.5\n} catch (err) {\n  // Easily catch all errors along the whole execution.\n  console.log(\"ERROR! \" + err.message);\n}\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nconst MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\n\nYou can set this property to choose the number format that abstraction methods return. The default behavior is to return BN.\n\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\", \"BigInt\"].\nconst Example = artifacts.require(\"Example\");\nExample.numberFormat = \"BigNumber\";\n```\n\n#### `MyContract.timeout(block_timeout)`\n\nThis method allows you to set the block timeout for transactions. Contract instances created from this abstraction will have the specified transaction block timeout. This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\n\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction. The default value for this is `true`. See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\n\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions. The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier. The default value is `1.25`.\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom JavaScript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From JavaScript:\n\n```javascript\nconst result = instance.setValue(5);\nconsole.log(\"Value was set to\", result.logs[0].args.val);\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\nconst result = await instance.setValue.call(5);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can _get_ the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\nconst val = instance.getValue.call();\n// val represents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\nEven more helpful, however is we _don't even need_ to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\nconst val = instance.getValue();\n// val reprsents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\n#### Overloaded functions\n\nSolidity supports a contract having multiple functions with the same name as long as the\nfunction argument types differ. And so you may find yourself in the situation of having a\nTruffle contract object with this property.\nYou can invoke these \"overloaded\" functions just like you would a normal contract function. Truffle contract instances\nactually wrap web3's contract abstraction (`web3.eth.Contract`) and when you call an overloaded function, it\nuses the same function resolution that web3 uses. However, we must give a warning that this overloaded function\nresolution is often imprecise and can resolve to the wrong function when you call it.\n\nConsider the following contrived code sample:\n\n```solidity\ncontract MyContract {\n  uint256 public myUint;\n  string public myString;\n  string public myOtherString;\n\n  function setValues(uint256 val, string str) {\n    myUint = val;\n    myString = str\n  }\n\n  function setValues(string str, string otherStr) {\n    myString = str;\n    myOtherString = otherStr;\n  }\n\n  function setValues(uint256 val, string str, string otherStr) {\n    myUint = val;\n    myString = str;\n    myOtherString = otherStr;\n  }\n}\n```\n\nThis Solidity contract contains three functions named `setValues`, each taking a different type of input. In your JavaScript you\nmight do something like the following:\n\n```javascript\nawait instance.setValue(\n  666,\n  \"this is not string cheese\",\n  \"this is string cheese\"\n);\n```\n\nAs mentioned above, Truffle contract wraps web3 `Contract` objects and uses web3's overloaded function resolution.\nTo resolve these functions, web3's strategy is to look at the number of arguments that the function was invoked with and try\none that takes that many arguments. This works for some cases but is not ideal in that it\ncan invoke the incorrect function. Take, for example, the case where we do something like the following:\n\n```javascript\nawait instance.setValue(\"this is not string cheese\", \"this is string cheese\");\n```\n\nWe know that in our contract there are two functions named `setValues` that take\ntwo arguments. In the above case, we cannot be sure whether web3's resolution will resolve to the first or second\nfunction. The more precise way to reference functions like this is to use\nthe `methods` property on the contract instance. The following is an example of how you\naccess these methods:\n\n```javascript\nawait instance.methods[\"setValue(string,string)\"](\n  \"this is not string cheese\",\n  \"this is string cheese\"\n);\n```\n\nThe `methods` property is an object whose keys are strings that correspond to the contract function's names\nand signatures with no spaces. The values are the functions themselves. You can inspect the\n`methods` property to see the key names in this object and match the function signature.\nWe recommend using this method of calling overloaded functions since it will unambiguously resolve to the correct function.\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction hash (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll receive the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\nconst result = await instance.setValue(5);\n// result.tx => transaction hash, string\n// result.logs => array of trigger events (1 item in this case)\n// result.receipt => receipt object\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\n// Same result object as above.\nconst result = await instance.sendTransaction({...})\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\n// Same result object as above.\nconst result = await instance.send(web3.toWei(1, \"ether\"));\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\n//estimated gas for this transaction\nconst result = await instance.setValue.estimateGas(5);\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","gitHead":"16365cc592b2c381ae597b7c0d51b67839fa8f62","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.2","dependencies":{"web3":"1.8.2","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.8.2","bignumber.js":"^7.2.1","web3-eth-abi":"1.8.2","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.8.2","@truffle/debug-utils":"^6.0.49-visual-debugger.0","web3-core-promievent":"1.8.2","@truffle/contract-schema":"^3.4.14-visual-debugger.0","@truffle/blockchain-utils":"^0.1.8-visual-debugger.0","@truffle/interface-adapter":"^0.5.32-visual-debugger.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.20-visual-debugger.0_1683934699056_0.5835376518549737","host":"s3://npm-registry-packages"}},"4.6.22":{"name":"@truffle/contract","version":"4.6.22","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.22","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"6fcd966e9f542bd79b713fd45c849c607ae23381","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.22.tgz","fileCount":24,"integrity":"sha512-081tM5CBBLgTQX0Fhzp0nlZHnfgojRXweV7/d6v7LHe6QGrGBmgvUy3EIbO+R3P1uaxeGVijMvB4Ok8md9IpYQ==","signatures":[{"sig":"MEYCIQDe9O+7oADQ1fJY6m0ori61dZdWX1l/dEhTjS8AUF5HFQIhAOhjiIA6QsEJjPKxlzsYa/K/BVB82+Qm7FkP8GtQQTU0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46616837},"main":"index.js","gitHead":"5aac1f049a02a0e1e63624b0c1e861d61ebb5a32","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.3","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.0","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.50","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.14","@truffle/blockchain-utils":"^0.1.7","@truffle/interface-adapter":"^0.5.33"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.22_1684531107385_0.6602879109058939","host":"s3://npm-registry-packages"}},"4.6.23":{"name":"@truffle/contract","version":"4.6.23","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.23","maintainers":[{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"e590dfa38098c4785fbbcaa19a7602970a5e5254","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.23.tgz","fileCount":24,"integrity":"sha512-8yjwCH8jTEwX+9ZnIpe09izrJJCtBvxMOQRscCkpRI5zuW+ZqjYr8DTL+PJu7WP2R+bMfFWdOrwBCOtoDI/Bfg==","signatures":[{"sig":"MEQCIANr/w5UKKDTX2Gkdg3mVbMGFOHZsyp1TToea7MtUuPuAiAGiZds+ugLuqTixOAjRC7Ht7gs8WD9++OTqBR7XKn5sA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46571558},"main":"index.js","gitHead":"7983a54d1f931d770c6fbb028bc27cdbcf5dfcbe","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.2+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.2","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.51","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.14","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.23_1686083113529_0.09988941719102273","host":"s3://npm-registry-packages"}},"4.6.24":{"name":"@truffle/contract","version":"4.6.24","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.24","maintainers":[{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"5cbde71eddcb588574b598dbabda240bdc95a3be","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.24.tgz","fileCount":24,"integrity":"sha512-YdF0lXPrhgQk+St8pHh9u+bvu8N7w3Yn1ni70KVIJiizs2YV6bJkkyEp8uBmMpTpuPwXczkL9HHYFMhDBCbEhQ==","signatures":[{"sig":"MEQCIDItkLZFooxtdZCvWDtEt2EOwWr4M7qhyCvEGDJxRlToAiAE8d/BRGsqwlB02AToEw4LVxjeo54wWIjcie5M9KDKeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46658087},"main":"index.js","gitHead":"cb01f46c8df6b8aa693856ecdf7c0f37159c4864","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.3","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.52","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.14","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.24_1686941028559_0.7433882072415268","host":"s3://npm-registry-packages"}},"4.6.25":{"name":"@truffle/contract","version":"4.6.25","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.25","maintainers":[{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"934419860560446b4e11d870210dce34b4cfe026","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.25.tgz","fileCount":24,"integrity":"sha512-eDyJx1Yap3e7J4iTKOUKYqUaO/wCayBqBaJnQmqW57LeOVkBQnqwOSNvFFxjcbOlRXGoLFFlTkxDa9lGcLVM7Q==","signatures":[{"sig":"MEQCIE892e/NT+jnm/Q+mNBqPW2xWUD4w+DlkJnbBYDZ140LAiAYmAY7uQPE+MvQ1kG7BcPR7WeNF5uiBJKUckzgK/vSuQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46647020},"main":"index.js","gitHead":"854a564b2545bbd2cc0a2cf04c9d38a5b8f57d7a","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cliffoo","email":"e2is2uyz@duck.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v18.16.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"18.16.0","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.53","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.14","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.25_1687554447470_0.21726193246912096","host":"s3://npm-registry-packages"}},"4.6.26":{"name":"@truffle/contract","version":"4.6.26","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.26","maintainers":[{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c4a9e1f0c9a94030adebc1a9cc2f706a42034a10","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.26.tgz","fileCount":24,"integrity":"sha512-B3KM8fW9dKJCzMRD40r+u+iqQtBGFbcMr2GML31iUkjC77Wn/KlM9cCGZiuXcOquWmBlKrpD4nJCoGirPhyPTQ==","signatures":[{"sig":"MEQCIC6vf76EtmcsVPcG4T38NTDg8R2/WLtvklRiV1r4vUORAiAYTWwmMaXHNO5WttTY303pB5A0lLDD5JcPVSExy8XdYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46649099},"main":"index.js","gitHead":"a6fb238ef954d3ad4c6fd4181b78ee3dc047c8bf","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"cliffoo","email":"e2is2uyz@duck.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v18.16.0+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"18.16.0","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.54","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.14","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.26_1688155754011_0.5591459546098756","host":"s3://npm-registry-packages"}},"4.6.27":{"name":"@truffle/contract","version":"4.6.27","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.27","maintainers":[{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"3b612d89583059e677e34be3b994900c49f2a25c","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.27.tgz","fileCount":24,"integrity":"sha512-B02sH1TlMqsOsGRpBOEQtGZxcF9BuECGF0duks12sYR/3nU0TdVd2NP25WXo+2GTrUcU6eCTMaWhBPjFyDUSaQ==","signatures":[{"sig":"MEUCIQD9sneYKekGgWsfCVgzqQ3ScPPAj5G5UvaaEE3ZSde6lQIgc2LMhcd1VNdCyrJ6miJbGRm8YKDcBAaf6Gw0K8TBGU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46655915},"main":"index.js","gitHead":"2748ccba5d7bfbb4b22c300da96a797c44083e4c","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"eggplantzzz","email":"pobol234@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.3+x64 (darwin)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.3","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.55","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.14","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.35"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.27_1689361069130_0.879002582024994","host":"s3://npm-registry-packages"}},"4.6.28":{"name":"@truffle/contract","version":"4.6.28","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.28","maintainers":[{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"788d93645259d27bf03a8a69d5e550eaaccd771f","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.28.tgz","fileCount":24,"integrity":"sha512-R7gQZpod5sO1hu06qZGJTTR6CZ7Hzk+z1yOvjKGa6zVLgXJXHgegKiLdj0xAfw/gAR+BWdGk6sllmNwfxSfK4Q==","signatures":[{"sig":"MEUCIQCJ42PaR3IkSQ6F5UHJnzxgq0ob8ugFFCwhPzHDP5g2JwIgTn6IF8TJ1YKEczS1nMf09HuFrGEXH+bOpRB+yeUlL4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46703037},"main":"index.js","gitHead":"a9ca7ea1bbc125710e6c8b1d49a4b57eb2aad57c","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v14.21.3+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"14.21.3","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.56","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.15","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.35"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.28_1691186813892_0.5956927122735498","host":"s3://npm-registry-packages"}},"4.6.29":{"name":"@truffle/contract","version":"4.6.29","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.29","maintainers":[{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"c1f0b9f65985ba5d8f35626a612dd31205cfcd6b","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.29.tgz","fileCount":24,"integrity":"sha512-gbgmC2YdcSD4QGvx3GWGIVhyQxEPkChcC2a3D5d9aj2XfV3f6+FQw5PuL1wreA3I222ggZQqzbvMvhpp8gWs4Q==","signatures":[{"sig":"MEUCIGClOR1Q/BAQW7XbWoZNOh6xFu7+FdEz/xIJgzbsNTf2AiEA9JtpnMuok8Ps6dc9xFj5Q25VFhJ+P3cvxpyXSCJ7Mlg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46702984},"main":"index.js","gitHead":"3fa384f7931d56a891515e8cd08b9054839a8eb0","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.20.2+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.20.2","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.1","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.56","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.15","@truffle/blockchain-utils":"^0.1.8","@truffle/interface-adapter":"^0.5.36"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.29_1693268422414_0.4288242143015957","host":"s3://npm-registry-packages"}},"4.6.30":{"name":"@truffle/contract","version":"4.6.30","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.30","maintainers":[{"name":"rizedr","email":"it@consensys.net"},{"name":"joshuafernandes","email":"fernandes.joshua@gmail.com"},{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"fa88cab28eacb9c2393ca9b7d34dc9cf1228c0a0","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.30.tgz","fileCount":24,"integrity":"sha512-B7cQECm0WPda0/Q6kX720+LfkPits7hytNMlBzpgopgySPhgSycAAKNGPBFGhd824aBqeAvO6KrjWme6E+MU+A==","signatures":[{"sig":"MEYCIQDcjrFDWpiZCCZadry6cv+EcqxioMSrSuStIxcc6dSxyAIhAInCt4PVHzfoLZNbT6BkSJmlyAzGdD8wRbEKLHbFFq2E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46671164},"main":"index.js","engines":{"node":"^16.20 || ^18.16 || >=20"},"gitHead":"033fc64fcdf91ceef61100938d7ffbd53b63eee5","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.20.2+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.20.2","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.2","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.57","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.16","@truffle/blockchain-utils":"^0.1.9","@truffle/interface-adapter":"^0.5.37"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.73.0","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.30_1694116198655_0.8918050664477708","host":"s3://npm-registry-packages"}},"4.6.31":{"name":"@truffle/contract","version":"4.6.31","keywords":["abstraction","contract","ethereum","truffle"],"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","_id":"@truffle/contract@4.6.31","maintainers":[{"name":"rizedr","email":"it@consensys.net"},{"name":"joshuafernandes","email":"fernandes.joshua@gmail.com"},{"name":"cliffoo","email":"e2is2uyz@duck.com"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"}],"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"75cb059689ce73b365675d9650718908c01b6b58","tarball":"https://registry.npmjs.org/@truffle/contract/-/contract-4.6.31.tgz","fileCount":24,"integrity":"sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ==","signatures":[{"sig":"MEUCIBOYbCAIXZYswNyLCjKk9gNWxyFliQxZPZt1c6Aw0dEsAiEA6SZ7pogB1vJJcASIrcghpFdMxpBalYTM/8D1esW1VwM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41976047},"main":"index.js","engines":{"node":"^16.20 || ^18.16 || >=20"},"gitHead":"a26df1ff53c01e6d82ad490338850360f6f970a9","scripts":{"build":"yarn compile","compile":"NODE_ENV=production webpack --config ./webpack.config.js && NODE_ENV=development webpack --config ./webpack.config.js","prepare":"yarn compile","publish:next":"node ../truffle/scripts/prereleaseVersion.js next next"},"_npmUser":{"name":"haltman","email":"harry.j.altman@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"_npmVersion":"lerna/5.6.2/node@v16.20.2+x64 (linux)","description":"A better contract abstraction for Ethereum (formerly EtherPudding)","directories":{},"_nodeVersion":"16.20.2","dependencies":{"web3":"1.10.0","debug":"^4.3.1","ethers":"^4.0.32","web3-utils":"1.10.0","bignumber.js":"^7.2.1","web3-eth-abi":"1.10.0","@truffle/error":"^0.2.2","@ensdomains/ensjs":"^2.1.0","web3-core-helpers":"1.10.0","@truffle/debug-utils":"^6.0.57","web3-core-promievent":"1.10.0","@truffle/contract-schema":"^3.4.16","@truffle/blockchain-utils":"^0.1.9","@truffle/interface-adapter":"^0.5.37"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.0","assert":"^2.0.0","buffer":"6.0.3","webpack":"^5.88.2","stream-http":"^3.2.0","webpack-cli":"^4.10.0","os-browserify":"^0.3.0","vm-browserify":"^1.1.2","path-browserify":"^1.0.1","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/contract_4.6.31_1694639936642_0.580224010924349","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-09-04T19:57:58.621Z","modified":"2026-04-29T21:46:01.319Z","4.0.32":"2019-09-04T19:57:59.074Z","4.0.33-migrate-describe.0":"2019-09-05T01:44:52.100Z","4.0.33-migrate-describe.1":"2019-09-07T00:22:37.961Z","4.0.33":"2019-09-12T20:38:15.750Z","4.0.34":"2019-09-27T04:28:14.209Z","4.1.0-ens-events.0":"2019-09-27T20:49:30.298Z","4.0.34-alphaTez.0":"2019-09-29T05:33:43.856Z","4.0.35":"2019-10-03T00:10:19.922Z","4.1.0-alphaTez.0":"2019-10-09T18:17:28.779Z","4.0.36":"2019-10-10T16:17:30.703Z","4.1.1-alphaTez.0":"2019-10-11T23:53:43.846Z","4.0.37":"2019-10-25T17:38:59.688Z","4.0.38":"2019-10-31T23:18:39.928Z","4.0.41-micah.0":"2019-11-04T01:31:15.659Z","4.0.39-next.0":"2019-11-05T13:44:25.473Z","4.0.39-next.1":"2019-11-05T14:00:38.637Z","4.0.39":"2019-11-07T23:02:27.821Z","4.0.40-micah.0":"2019-11-08T06:37:48.139Z","4.1.0":"2019-11-12T15:40:21.040Z","4.1.1":"2019-11-22T22:51:09.603Z","4.2.0-truffleLogger.0":"2019-12-03T22:29:56.565Z","4.1.2-alphaTez.0":"2019-12-12T00:06:03.496Z","4.1.3-alphaTez.0":"2019-12-12T00:58:15.243Z","4.1.2":"2019-12-13T18:07:08.382Z","4.2.0-alphaTez.0":"2019-12-18T20:08:30.141Z","4.1.3-truffleLogger.0":"2019-12-19T17:41:14.013Z","4.1.4-truffleLogger.0":"2019-12-19T17:44:09.209Z","4.1.3":"2019-12-20T01:19:47.435Z","4.2.1-alphaTez.0":"2020-01-07T00:32:47.778Z","4.2.2-alphaTez.0":"2020-01-07T20:47:43.023Z","4.2.2-alphaTez.1":"2020-01-08T21:57:22.257Z","4.1.4":"2020-01-10T18:30:14.388Z","4.2.2-alphaTez.2":"2020-01-14T23:07:39.367Z","4.2.0-truffleLogger.1":"2020-01-16T17:05:30.940Z","4.2.2-alphaTez.3":"2020-01-16T20:03:45.116Z","4.1.5":"2020-01-17T19:02:00.526Z","4.1.6":"2020-01-25T05:53:48.338Z","4.1.7-alphaTez.0":"2020-01-28T03:45:02.001Z","4.1.7":"2020-01-30T21:50:28.497Z","4.1.8-alphaTez.0":"2020-01-30T23:53:16.758Z","4.1.8-alphaTez.1":"2020-02-04T01:45:33.890Z","4.1.8":"2020-02-06T21:05:02.425Z","4.1.9-truffleLogger.0":"2020-02-07T00:01:50.966Z","4.1.9-alphaTez.0":"2020-02-11T01:45:54.594Z","4.1.9-alphaTez.1":"2020-02-11T03:17:59.705Z","4.1.9-chmod.0":"2020-02-11T18:56:46.687Z","4.1.9-alphaTez.2":"2020-02-11T22:09:29.517Z","4.1.9-alphaTez.3":"2020-02-11T23:04:58.044Z","4.1.9-alphaTez.4":"2020-02-12T17:56:14.118Z","4.1.9-alphaTez.5":"2020-02-12T22:19:43.730Z","4.1.9-alphaTez.6":"2020-02-12T22:25:51.055Z","4.1.9-alphaTez.7":"2020-02-12T22:41:04.988Z","4.1.9-alphaTez.8":"2020-02-12T23:20:14.598Z","4.1.9-alphaTez.9":"2020-02-13T00:19:24.724Z","4.1.9":"2020-02-14T22:07:22.849Z","4.1.10-truffleLogger.0":"2020-02-14T22:53:37.048Z","4.1.10-alphaTez.0":"2020-02-17T05:05:25.655Z","4.2.0-tezos.0":"2020-02-18T18:26:03.764Z","4.1.10":"2020-02-21T01:12:38.961Z","4.1.11":"2020-02-27T17:35:47.612Z","4.1.12-truffleLogger.0":"2020-03-04T18:30:03.862Z","4.1.12":"2020-03-05T19:39:07.825Z","4.1.13":"2020-03-12T23:38:13.806Z","4.2.0-tezos.1":"2020-03-16T22:30:54.632Z","4.2.0-tezos.2":"2020-03-18T18:58:48.536Z","4.1.14":"2020-03-27T01:26:25.401Z","4.1.15":"2020-04-02T17:16:47.524Z","4.3.0-tezos.0":"2020-04-07T16:31:30.236Z","4.3.0-tezos.1":"2020-04-07T23:30:43.875Z","4.2.0":"2020-04-11T04:40:45.326Z","4.3.0-tezos.2":"2020-04-14T17:54:53.464Z","4.2.1":"2020-04-16T21:16:31.410Z","4.2.2":"2020-04-23T21:33:29.912Z","4.2.3":"2020-04-30T21:46:13.795Z","4.2.4":"2020-05-09T04:29:03.160Z","4.2.5":"2020-05-15T03:26:33.191Z","4.2.6":"2020-05-23T19:34:56.205Z","4.3.0-tezos.3":"2020-05-26T16:02:44.798Z","4.3.0-tezos.4":"2020-05-26T21:22:34.605Z","4.3.0-tezos.5":"2020-05-29T21:33:13.600Z","5.0.0-tezos.0":"2020-05-29T23:50:31.041Z","5.0.0-tezos.1":"2020-05-30T00:06:20.488Z","4.2.7":"2020-05-30T02:42:26.172Z","5.0.0-tezos.2":"2020-06-02T22:17:30.768Z","5.0.0-tezos.3":"2020-06-05T16:22:23.990Z","4.2.8":"2020-06-06T23:39:03.175Z","4.2.9":"2020-06-12T22:31:33.129Z","5.0.0-tezos.4":"2020-06-15T19:56:31.268Z","5.0.0-tezos.5":"2020-06-15T22:49:51.845Z","5.0.0-tezos.6":"2020-06-23T16:50:07.057Z","4.2.10":"2020-06-25T23:37:29.005Z","4.2.11":"2020-07-02T19:38:58.590Z","4.2.11-preserves.0":"2020-07-06T18:16:40.958Z","4.2.11-preserves.1":"2020-07-06T18:23:21.279Z","4.2.11-preserves.2":"2020-07-06T18:35:10.745Z","4.2.11-preserves.3":"2020-07-07T01:05:52.277Z","4.2.11-preserves.4":"2020-07-07T03:24:34.855Z","4.2.11-preserves.5":"2020-07-07T03:50:03.123Z","4.2.11-preserves.6":"2020-07-07T04:02:06.933Z","4.2.11-preserves.7":"2020-07-07T05:36:30.200Z","4.2.12-next.0":"2020-07-09T16:11:32.797Z","4.2.12":"2020-07-09T22:34:42.084Z","4.2.11-preserves.8":"2020-07-14T05:41:48.691Z","5.1.0-tezos.0":"2020-07-15T19:03:39.833Z","4.2.13":"2020-07-17T22:10:51.070Z","4.2.14":"2020-07-24T21:45:40.319Z","4.2.15-save-intermediate.0":"2020-07-31T00:21:08.255Z","4.2.15-save-intermediate.1":"2020-07-31T00:39:15.628Z","4.2.15":"2020-07-31T01:16:49.221Z","4.2.17":"2020-08-08T03:01:08.764Z","4.2.18":"2020-08-14T18:12:43.452Z","4.2.19":"2020-08-18T01:32:29.597Z","4.2.20":"2020-08-27T18:56:34.129Z","4.2.21":"2020-09-04T00:48:24.087Z","4.2.22":"2020-09-11T00:37:04.601Z","4.2.23":"2020-09-24T23:29:44.253Z","4.2.24":"2020-10-02T01:19:29.037Z","4.2.25":"2020-10-09T00:28:34.446Z","4.2.26-abi-utils.0":"2020-10-12T21:44:15.903Z","4.2.26":"2020-10-15T23:27:23.238Z","4.2.27":"2020-10-22T16:55:21.663Z","4.2.28":"2020-10-29T23:07:03.640Z","4.2.29":"2020-11-06T05:34:29.841Z","4.2.30":"2020-11-12T22:30:28.384Z","4.2.31":"2020-11-19T22:17:10.659Z","4.3.0":"2020-11-28T02:11:54.585Z","4.3.1":"2020-12-03T20:18:57.103Z","4.3.2":"2020-12-11T01:18:47.954Z","4.3.3":"2020-12-17T21:26:33.795Z","4.3.4":"2020-12-27T01:22:08.041Z","4.3.5":"2021-01-08T21:27:51.202Z","4.3.6":"2021-01-31T02:41:32.512Z","4.3.7":"2021-02-11T23:00:57.506Z","4.3.8":"2021-02-19T22:26:47.225Z","4.3.9":"2021-02-28T05:05:10.215Z","4.3.10":"2021-03-12T22:43:42.300Z","4.3.11":"2021-03-19T21:35:09.169Z","4.3.12":"2021-03-25T19:45:38.081Z","4.3.13":"2021-04-08T20:00:58.348Z","4.3.14":"2021-04-23T23:01:18.212Z","4.3.15":"2021-04-30T00:11:30.080Z","4.3.16":"2021-05-07T23:58:12.008Z","4.3.17":"2021-05-20T21:43:49.303Z","4.3.18":"2021-05-28T21:19:34.705Z","4.3.19":"2021-06-04T17:48:13.590Z","4.3.20-decoder-no-web3.0":"2021-06-09T03:30:59.309Z","4.3.20-cheerios.0":"2021-06-09T22:29:01.283Z","4.3.20-cheerios.1":"2021-06-10T02:28:58.713Z","4.3.20":"2021-06-12T20:29:21.974Z","4.3.21":"2021-06-18T19:33:39.741Z","4.3.22":"2021-06-28T23:26:14.523Z","4.3.23":"2021-07-01T23:32:15.738Z","4.3.24":"2021-07-09T21:32:49.710Z","4.3.25":"2021-07-15T20:57:09.230Z","4.3.26":"2021-07-24T02:42:40.050Z","4.3.27":"2021-07-30T20:31:12.534Z","4.3.28":"2021-08-06T19:09:15.849Z","4.3.29":"2021-08-06T20:29:00.493Z","4.3.30":"2021-08-12T21:24:35.129Z","4.3.31":"2021-08-22T00:45:16.995Z","4.3.32":"2021-08-27T17:30:28.181Z","4.3.33":"2021-09-02T19:57:01.723Z","4.3.34-alpha.0":"2021-09-08T15:19:43.726Z","4.3.34":"2021-09-11T00:17:08.568Z","4.3.34-alpha.1":"2021-09-13T23:57:54.501Z","4.3.35":"2021-09-17T16:29:43.570Z","4.3.36":"2021-09-24T22:55:34.195Z","4.3.37-alpha.0":"2021-09-28T21:14:55.423Z","4.3.37-decoder-beta.0":"2021-09-29T14:59:32.410Z","4.3.37":"2021-09-30T21:41:18.815Z","4.3.38":"2021-10-07T20:23:40.754Z","4.3.39":"2021-11-05T15:05:19.385Z","4.3.40":"2021-11-11T23:14:34.715Z","4.3.41":"2021-11-19T00:55:20.561Z","4.3.42":"2021-11-19T01:55:19.756Z","4.3.43":"2021-12-02T22:34:22.599Z","4.4.0":"2021-12-10T16:00:57.582Z","4.4.1":"2021-12-16T22:57:03.398Z","4.4.2":"2021-12-23T00:16:12.046Z","4.4.3":"2022-01-09T21:57:12.579Z","4.4.4":"2022-01-13T23:33:42.189Z","4.4.5":"2022-01-20T22:28:56.120Z","4.4.6":"2022-01-29T22:01:10.292Z","4.4.7":"2022-02-03T23:19:13.777Z","4.4.8":"2022-02-11T00:41:40.229Z","4.4.9":"2022-02-17T22:52:33.893Z","4.4.10":"2022-02-24T20:48:25.983Z","4.4.11":"2022-03-03T22:35:06.143Z","4.5.0":"2022-03-11T00:22:07.688Z","4.5.1":"2022-03-17T23:05:24.274Z","4.5.2":"2022-03-24T23:37:34.662Z","4.5.3":"2022-04-01T00:40:43.693Z","4.5.4":"2022-04-08T15:43:34.255Z","4.5.5":"2022-04-08T20:09:21.755Z","4.5.6":"2022-04-13T22:05:36.724Z","4.5.7":"2022-04-21T22:25:46.860Z","4.5.8":"2022-04-28T21:13:02.510Z","4.5.9":"2022-05-06T15:57:44.053Z","4.5.10":"2022-05-13T03:57:28.534Z","4.5.11":"2022-05-20T16:35:55.506Z","4.5.12":"2022-05-27T18:23:39.797Z","4.5.13":"2022-06-03T21:22:42.614Z","4.5.14":"2022-06-09T22:37:15.127Z","4.5.15":"2022-07-01T21:02:11.206Z","4.5.16":"2022-07-07T20:14:04.017Z","4.5.17":"2022-07-15T20:51:01.467Z","4.5.18-typescript-migrations.0":"2022-07-21T02:40:25.446Z","4.5.18":"2022-07-21T23:32:09.793Z","4.5.19":"2022-07-29T19:28:31.520Z","4.5.20":"2022-08-05T00:35:58.753Z","4.5.21":"2022-08-10T22:24:36.437Z","4.5.22":"2022-08-17T23:40:37.569Z","4.5.23-hardhat-error.0":"2022-08-20T00:39:12.071Z","4.5.23-hardhat-error.1":"2022-08-22T21:42:04.086Z","4.5.23":"2022-08-24T22:39:16.731Z","4.5.24-hardhat-error.0":"2022-08-25T07:05:38.274Z","4.6.0":"2022-09-07T22:50:51.372Z","4.6.1":"2022-09-15T00:39:56.329Z","4.6.2":"2022-09-22T22:32:18.651Z","4.6.3":"2022-10-12T22:48:01.542Z","4.6.4":"2022-10-19T18:41:48.433Z","4.6.5":"2022-10-26T20:11:41.165Z","4.6.6":"2022-11-02T20:27:39.162Z","4.6.7":"2022-11-16T21:01:40.896Z","4.6.8":"2022-11-23T23:45:47.077Z","4.6.9":"2022-12-08T22:30:07.162Z","4.6.10":"2022-12-21T19:55:25.531Z","4.6.11":"2023-01-06T16:53:32.636Z","4.6.12":"2023-01-13T00:16:48.379Z","4.6.13":"2023-01-27T00:21:26.101Z","4.6.14":"2023-02-02T20:49:32.574Z","4.6.15":"2023-02-17T00:30:04.886Z","4.6.16":"2023-03-02T21:34:07.024Z","4.6.17":"2023-03-10T00:53:07.598Z","4.6.18":"2023-03-17T19:32:28.747Z","4.6.19":"2023-04-10T21:42:39.083Z","4.6.20":"2023-04-20T19:41:32.562Z","4.6.21":"2023-05-11T01:50:14.880Z","4.6.20-visual-debugger.0":"2023-05-12T23:38:19.445Z","4.6.22":"2023-05-19T21:18:27.729Z","4.6.23":"2023-06-06T20:25:13.934Z","4.6.24":"2023-06-16T18:43:48.967Z","4.6.25":"2023-06-23T21:07:27.805Z","4.6.26":"2023-06-30T20:09:14.289Z","4.6.27":"2023-07-14T18:57:49.519Z","4.6.28":"2023-08-04T22:06:54.261Z","4.6.29":"2023-08-29T00:20:22.878Z","4.6.30":"2023-09-07T19:49:59.079Z","4.6.31":"2023-09-13T21:18:57.024Z"},"bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"license":"MIT","homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme","keywords":["abstraction","contract","ethereum","truffle"],"repository":{"url":"git+https://github.com/trufflesuite/truffle.git","type":"git","directory":"packages/contract"},"description":"A better contract abstraction for Ethereum (formerly EtherPudding)","maintainers":[{"email":"it@consensys.net","name":"rizedr"}],"readme":"# @truffle/contract\n\nBetter Ethereum contract abstraction, for Node and the browser.\n\n### Install\n\n```\n$ npm install @truffle/contract\n```\n\n### Features\n\n- Synchronized transactions for better control flow (i.e., transactions won't finish until you're guaranteed they've been mined).\n- Promises. No more callback hell. Works well with `ES6` and `async/await`.\n- Default values for transactions, like `from` address or `gas`.\n- Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Usage\n\nFirst, set up a new web3 provider instance and initialize your contract, then `require(\"@truffle/contract\")`.\nThe contract-schema matches the output of the [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor), so you can pass in the artifact file Truffle produces and stores in the artifact file when you run `truffle compile`.\n\n```javascript\nconst provider = new Web3.providers.HttpProvider(\"http://localhost:8545\");\nconst contractArtifact = require(\"./path/to/contractArtifact.json\"); //produced by Truffle compile\nconst contract = require(\"@truffle/contract\");\n\nconst MyContract = contract(contractArtifact);\n```\n\nIf you aren't using Truffle artifacts, the input to the `contract` function is a JSON blob defined by [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/master/packages/contract-schema). This JSON blob is structured in a way that can be passed to all Truffle-related projects.\nMinimally, it requires the contract ABI, but passing this alone may cause issues using certain features of Truffle contract.\n\n```javascript\nconst MyContract = contract({\n  abi: [...], // minimum required\n  address: \"0x...\", // optional\n  // many more\n});\nMyContract.setProvider(provider);\n```\n\nYou now have access to the following functions on `MyContract`, as well as many others:\n\n- `at()`: Create an instance of `MyContract` that represents your contract at a specific address.\n- `deployed()`: Create an instance of `MyContract` that represents the default address managed by `MyContract`.\n- `new()`: Deploy a new version of this contract to the network, getting an instance of `MyContract` that represents the newly deployed instance.\n\nEach instance is tied to a specific address on the Ethereum network, and each instance has a 1-to-1 mapping from Javascript functions to contract functions. For instance, if your Solidity contract had a function defined `someFunction(uint value) {}` (solidity), then you could execute that function on the network like so:\n\n```javascript\nconst instance = await MyContract.deployed();\nconst result = await instance.someFunction(5);\n// Do something with the result or continue with more transactions.\n```\n\n### Browser Usage\n\nIn your `head` element, include @truffle/contract:\n\n```\n<script type=\"text/javascript\" src=\"./dist/truffle-contract.min.js\"></script>\n```\n\nAlternatively, you can use the non-minified versions for easier debugging.\n\nWith this usage, `@truffle/contract` will be available via the `TruffleContract` object:\n\n```\nconst MyContract = TruffleContract(...);\n```\n\n**Note**: Web3 and its dependencies are now bundled into @truffle/contract\nv4.0.2 or higher.\n\n### Full Example\n\nLet's use `@truffle/contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):\n\n```javascript\nconst contract = require(\"@truffle/contract\");\n// Require the package that was previosly saved by @truffle/artifactor\nconst metacoinArtifact = require(\"./path/to/MetaCoin.json\");\nconst MetaCoin = contract(metacoinArtifact);\n\n// Remember to set the Web3 provider (see above).\nMetaCoin.setProvider(provider);\n\n// In this scenario, two users will send MetaCoin back and forth, showing\n// how @truffle/contract allows for easy control flow.\nconst accountOne = \"5b42bd01ff...\";\nconst accountTwo = \"e1fd0d4a52...\";\n\n// Note our MetaCoin contract exists at a specific address.\nconst contractAddress = \"8e2e2cf785...\";\n\nconst instance = await MetaCoin.at(contractAddress);\n\ntry {\n  // Make a transaction that calls the function `sendCoin`, sending 3 MetaCoin\n  // to the account listed as accountTwo.\n  let result = await instance.sendCoin(accountTwo, 3, { from: accountOne });\n  // This code block will not be executed until @truffle/contract has verified\n  // the transaction has been processed and it is included in a mined block.\n  // @truffle/contract will error if the transaction hasn't been processed in 120 seconds.\n\n  // Since we're using promises, we can return a promise for a call that will\n  // check account two's balance.\n  let balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 3\n\n  // But maybe too much was sent. Let's send some back.\n  // Like before, will create a transaction that returns a promise, where\n  // the callback won't be executed until the transaction has been processed.\n  result = await instance.sendCoin(accountOne, 1.5, { from: accountTwo });\n  balancerOfAccountTwo = await instance.balances.call(accountTwo);\n  console.log(\"Balance of account two is \" + balancerOfAccountTwo + \"!\"); // => 1.5\n} catch (err) {\n  // Easily catch all errors along the whole execution.\n  console.log(\"ERROR! \" + err.message);\n}\n```\n\n# API\n\nThere are two API's you'll need to be aware of. One is the static Contract Abstraction API and the other is the Contract Instance API. The Abstraction API is a set of functions that exist for all contract abstractions, and those functions exist on the abstraction itself (i.e., `MyContract.at()`). In contrast, the Instance API is the API available to contract instances -- i.e., abstractions that represent a specific contract on the network -- and that API is created dynamically based on functions available in your Solidity source file.\n\n### Contract Abstraction API\n\nEach contract abstraction -- `MyContract` in the examples above -- have the following useful functions:\n\n#### `MyContract.new([arg1, arg2, ...], [tx params])`\n\nThis function take whatever constructor parameters your contract requires and deploys a new instance of the contract to the network. There's an optional last argument which you can use to pass transaction parameters including the transaction from address, gas limit and gas price. This function returns a Promise that resolves into a new instance of the contract abstraction at the newly deployed address.\n\n#### `MyContract.at(address)`\n\nThis function creates a new instance of the contract abstraction representing the contract at the passed in address. Returns a \"thenable\" object (not yet an actual Promise for backward compatibility). Resolves to a contract abstraction instance after ensuring code exists at the specified address.\n\n#### `MyContract.deployed()`\n\nCreates an instance of the contract abstraction representing the contract at its deployed address. The deployed address is a special value given to @truffle/contract that, when set, saves the address internally so that the deployed address can be inferred from the given Ethereum network being used. This allows you to write code referring to a specific deployed contract without having to manage those addresses yourself. Like `at()`, `deployed()` is thenable, and will resolve to a contract abstraction instance representing the deployed contract after ensuring that code exists at that location and that that address exists on the network being used.\n\n#### `MyContract.transactionHash`\n\nThis property accesses the hash of the transaction in which the contract was deployed. This field gets populated for contract objects created with `.deployed()` or `.new()` but not with `.at()`.\n\n#### `MyContract.link(instance)`\n\nLink a library represented by a contract abstraction instance to MyContract. The library must first be deployed and have its deployed address set. The name and deployed address will be inferred from the contract abstraction instance. When this form of `MyContract.link()` is used, MyContract will consume all of the linked library's events and will be able to report that those events occurred during the result of a transaction.\n\nLibraries can be linked multiple times and will overwrite their previous linkage.\n\nNote: This method has two other forms, but this form is recommended.\n\n#### `MyContract.link(name, address)`\n\nLink a library with a specific name and address to MyContract. The library's events will not be consumed using this form.\n\n#### `MyContract.link(object)`\n\nLink multiple libraries denoted by an Object to MyContract. The keys must be strings representing the library names and the values must be strings representing the addresses. Like above, libraries' events will not be consumed using this form.\n\n#### `MyContract.networks()`\n\nView a list of network ids this contract abstraction has been set up to represent.\n\n#### `MyContract.setProvider(provider)`\n\nSets the web3 provider this contract abstraction will use to make transactions.\n\n#### `MyContract.setNetwork(network_id)`\n\nSets the network that MyContract is currently representing.\n\n#### `MyContract.hasNetwork(network_id)`\n\nReturns a boolean denoting whether or not this contract abstraction is set up to represent a specific network.\n\n#### `MyContract.defaults([new_defaults])`\n\nGet's and optionally sets transaction defaults for all instances created from this abstraction. If called without any parameters it will simply return an Object representing current defaults. If an Object is passed, this will set new defaults. Example default transaction values that can be set are:\n\n```javascript\nMyContract.defaults({\n  from: ...,\n  gas: ...,\n  gasPrice: ...,\n  value: ...\n})\n```\n\nSetting a default `from` address, for instance, is useful when you have a contract abstraction you intend to represent one user (i.e., one address).\n\n#### `MyContract.clone(network_id)`\n\nClone a contract abstraction to get another object that manages the same contract artifacts, but using a different `network_id`. This is useful if you'd like to manage the same contract but on a different network. When using this function, don't forget to set the correct provider afterward.\n\n```javascript\nconst MyOtherContract = MyContract.clone(1337);\n```\n\n#### `MyContract.numberFormat = number_type`\n\nYou can set this property to choose the number format that abstraction methods return. The default behavior is to return BN.\n\n```javascript\n// Choices are:  `[\"BigNumber\", \"BN\", \"String\", \"BigInt\"].\nconst Example = artifacts.require(\"Example\");\nExample.numberFormat = \"BigNumber\";\n```\n\n#### `MyContract.timeout(block_timeout)`\n\nThis method allows you to set the block timeout for transactions. Contract instances created from this abstraction will have the specified transaction block timeout. This means that if a transaction does not immediately get mined, it will retry for the specified number of blocks.\n\n#### `MyContract.autoGas = <boolean>`\n\nIf this is set to true, instances created from this abstraction will use `web3.eth.estimateGas` and then apply a gas multiplier to determine the amount of gas to include with the transaction. The default value for this is `true`. See [gasMultiplier](/docs/truffle/reference/contract-abstractions#-code-mycontract-gasmultiplier-gas_multiplier-code-).\n\n#### `MyContract.gasMultiplier(gas_multiplier)`\n\nThis is the value used when `autoGas` is enabled to determine the amount of gas to include with transactions. The gas is computed by using `web3.eth.estimateGas` and multiplying it by the gas multiplier. The default value is `1.25`.\n\n### Contract Instance API\n\nEach contract instance is different based on the source Solidity contract, and the API is created dynamically. For the purposes of this documentation, let's use the following Solidity source code below:\n\n```javascript\ncontract MyContract {\n  uint public value;\n  event ValueSet(uint val);\n  function setValue(uint val) {\n    value = val;\n    emit ValueSet(value);\n  }\n  function getValue() view returns (uint) {\n    return value;\n  }\n}\n```\n\nFrom JavaScript's point of view, this contract has three functions: `setValue`, `getValue` and `value`. This is because `value` is public and automatically creates a getter function for it.\n\n#### Making a transaction via a contract function\n\nWhen we call `setValue()`, this creates a transaction. From JavaScript:\n\n```javascript\nconst result = instance.setValue(5);\nconsole.log(\"Value was set to\", result.logs[0].args.val);\n```\n\nThe result object that gets returned looks like this:\n\n```javascript\n{\n  tx: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n  receipt: {\n    // The return value from web3.eth.getTransactionReceipt(hash)\n    // See https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt\n  },\n  logs: [\n    {\n      address: \"0x13274fe19c0178208bcbee397af8167a7be27f6f\",\n      args: {\n        val: BigNumber(5),\n      },\n      blockHash: \"0x2f0700b5d039c6ea7cdcca4309a175f97826322beb49aca891bf6ea82ce019e6\",\n      blockNumber: 40,\n      event: \"ValueSet\",\n      logIndex: 0,\n      transactionHash: \"0x6cb0bbb6466b342ed7bc4a9816f1da8b92db1ccf197c3f91914fc2c721072ebd\",\n      transactionIndex: 0,\n      type:\"mined\",\n    },\n  ],\n}\n```\n\nNote that if the function being executed in the transaction has a return value, you will not get that\nreturn value inside this result. You must instead use an event (like `ValueSet`) and look up the result\nin the `logs` array.\n\n#### Explicitly making a call instead of a transaction\n\nWe can call `setValue()` without creating a transaction by explicitly using `.call`:\n\n```javascript\nconst result = await instance.setValue.call(5);\n```\n\nThis isn't very useful in this case, since `setValue()` sets things, and the value we pass won't be saved since we're not creating a transaction.\n\n#### Calling getters\n\nHowever, we can _get_ the value using `getValue()`, using `.call()`. Calls are always free and don't cost any Ether, so they're good for calling functions that read data off the blockchain:\n\n```javascript\nconst val = instance.getValue.call();\n// val represents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\nEven more helpful, however is we _don't even need_ to use `.call` when a function is marked as `view` or `pure`, because `@truffle/contract` will automatically know that that function can only be interacted with via a call:\n\n```javascript\nconst val = instance.getValue();\n// val reprsents the `value` storage object in the solidity contract\n// since the contract returns that value.\n```\n\n#### Overloaded functions\n\nSolidity supports a contract having multiple functions with the same name as long as the\nfunction argument types differ. And so you may find yourself in the situation of having a\nTruffle contract object with this property.\nYou can invoke these \"overloaded\" functions just like you would a normal contract function. Truffle contract instances\nactually wrap web3's contract abstraction (`web3.eth.Contract`) and when you call an overloaded function, it\nuses the same function resolution that web3 uses. However, we must give a warning that this overloaded function\nresolution is often imprecise and can resolve to the wrong function when you call it.\n\nConsider the following contrived code sample:\n\n```solidity\ncontract MyContract {\n  uint256 public myUint;\n  string public myString;\n  string public myOtherString;\n\n  function setValues(uint256 val, string str) {\n    myUint = val;\n    myString = str\n  }\n\n  function setValues(string str, string otherStr) {\n    myString = str;\n    myOtherString = otherStr;\n  }\n\n  function setValues(uint256 val, string str, string otherStr) {\n    myUint = val;\n    myString = str;\n    myOtherString = otherStr;\n  }\n}\n```\n\nThis Solidity contract contains three functions named `setValues`, each taking a different type of input. In your JavaScript you\nmight do something like the following:\n\n```javascript\nawait instance.setValue(\n  666,\n  \"this is not string cheese\",\n  \"this is string cheese\"\n);\n```\n\nAs mentioned above, Truffle contract wraps web3 `Contract` objects and uses web3's overloaded function resolution.\nTo resolve these functions, web3's strategy is to look at the number of arguments that the function was invoked with and try\none that takes that many arguments. This works for some cases but is not ideal in that it\ncan invoke the incorrect function. Take, for example, the case where we do something like the following:\n\n```javascript\nawait instance.setValue(\"this is not string cheese\", \"this is string cheese\");\n```\n\nWe know that in our contract there are two functions named `setValues` that take\ntwo arguments. In the above case, we cannot be sure whether web3's resolution will resolve to the first or second\nfunction. The more precise way to reference functions like this is to use\nthe `methods` property on the contract instance. The following is an example of how you\naccess these methods:\n\n```javascript\nawait instance.methods[\"setValue(string,string)\"](\n  \"this is not string cheese\",\n  \"this is string cheese\"\n);\n```\n\nThe `methods` property is an object whose keys are strings that correspond to the contract function's names\nand signatures with no spaces. The values are the functions themselves. You can inspect the\n`methods` property to see the key names in this object and match the function signature.\nWe recommend using this method of calling overloaded functions since it will unambiguously resolve to the correct function.\n\n#### Processing transaction results\n\nWhen you make a transaction, you're given a `result` object that gives you a wealth of information about the transaction. You're given the transaction hash (`result.tx`), the decoded events (also known as logs; `result.logs`), and a transaction receipt (`result.receipt`). In the below example, you'll receive the `ValueSet()` event because you triggered the event using the `setValue()` function:\n\n```javascript\nconst result = await instance.setValue(5);\n// result.tx => transaction hash, string\n// result.logs => array of trigger events (1 item in this case)\n// result.receipt => receipt object\n```\n\n#### Sending Ether / Triggering the fallback function\n\nYou can trigger the fallback function by sending a transaction to this function:\n\n```javascript\n// Same result object as above.\nconst result = await instance.sendTransaction({...})\n```\n\nThis is promisified like all available contract instance functions, and has the same API as `web3.eth.sendTransaction` without the callback. The `to` value will be automatically filled in for you.\n\nIf you only want to send Ether to the contract a shorthand is available:\n\n```javascript\n// Same result object as above.\nconst result = await instance.send(web3.toWei(1, \"ether\"));\n```\n\n#### Estimating gas usage\n\nRun this function to estimate the gas usage:\n\n```javascript\n//estimated gas for this transaction\nconst result = await instance.setValue.estimateGas(5);\n```\n\n# Testing\n\nThis package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.\n","readmeFilename":"README.md"}