polkamarkets-js 3.4.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/abis/PredictionMarketV3Querier.json +1 -1
  2. package/contracts/PredictionMarketV3Querier.sol +4 -2
  3. package/package.json +1 -1
  4. package/src/models/PredictionMarketV3Contract.js +51 -17
  5. package/abis/AddAdminToLand.json +0 -1
  6. package/abis/ClaimMerkleRoot.json +0 -1
  7. package/abis/CreateLand.json +0 -1
  8. package/abis/CreateMarkets.json +0 -1
  9. package/abis/DeployContracts.json +0 -1
  10. package/abis/DeployMerkleRewardsDistributor.json +0 -1
  11. package/abis/DeployToken.json +0 -1
  12. package/abis/DeployUSDT.json +0 -1
  13. package/abis/MintTokens.json +0 -1
  14. package/abis/PublishMerkleRoot.json +0 -1
  15. package/abis/ResolveMarket.json +0 -1
  16. package/abis/TradeMarket.json +0 -1
  17. package/abis/USDT.json +0 -1
  18. package/lib/openzeppelin-contracts/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +0 -22
  19. package/lib/openzeppelin-contracts/contracts/mocks/docs/ERC4626Fees.sol +0 -109
  20. package/lib/openzeppelin-contracts/contracts/mocks/docs/MyNFT.sol +0 -9
  21. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +0 -25
  22. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +0 -24
  23. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +0 -23
  24. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlModified.sol +0 -14
  25. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +0 -16
  26. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol +0 -17
  27. package/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyAccountERC7702.sol +0 -20
  28. package/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyFactoryAccount.sol +0 -37
  29. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyGovernor.sol +0 -80
  30. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyToken.sol +0 -21
  31. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +0 -32
  32. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenWrapped.sol +0 -28
  33. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/GameItems.sol +0 -21
  34. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +0 -7
  35. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC20/GLDToken.sol +0 -11
  36. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +0 -26
  37. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC721/GameItem.sol +0 -19
  38. package/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Base64NFT.sol +0 -27
  39. package/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Multicall.sol +0 -15
  40. package/lib/openzeppelin-contracts/docs/README.md +0 -16
  41. package/lib/openzeppelin-contracts/docs/antora.yml +0 -7
  42. package/lib/openzeppelin-contracts/docs/config.js +0 -21
  43. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-control-multiple.svg +0 -97
  44. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager-functions.svg +0 -47
  45. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager.svg +0 -99
  46. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
  47. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
  48. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
  49. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png +0 -0
  50. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
  51. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png +0 -0
  52. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
  53. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
  54. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
  55. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png +0 -0
  56. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png +0 -0
  57. package/lib/openzeppelin-contracts/docs/modules/ROOT/nav.adoc +0 -29
  58. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/access-control.adoc +0 -288
  59. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/account-abstraction.adoc +0 -100
  60. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/accounts.adoc +0 -354
  61. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/backwards-compatibility.adoc +0 -50
  62. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/eoa-delegation.adoc +0 -143
  63. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc1155.adoc +0 -118
  64. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20-supply.adoc +0 -71
  65. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20.adoc +0 -67
  66. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc4626.adoc +0 -214
  67. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc6909.adoc +0 -47
  68. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc721.adoc +0 -58
  69. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/extending-contracts.adoc +0 -51
  70. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/faq.adoc +0 -13
  71. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/governance.adoc +0 -239
  72. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/index.adoc +0 -70
  73. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/multisig.adoc +0 -306
  74. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/tokens.adoc +0 -31
  75. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/upgradeable.adoc +0 -77
  76. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/utilities.adoc +0 -591
  77. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/wizard.adoc +0 -15
  78. package/lib/openzeppelin-contracts/docs/templates/contract.hbs +0 -141
  79. package/lib/openzeppelin-contracts/docs/templates/helpers.js +0 -46
  80. package/lib/openzeppelin-contracts/docs/templates/page.hbs +0 -4
  81. package/lib/openzeppelin-contracts/docs/templates/properties.js +0 -88
  82. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/ERC20WithAutoMinerRewardUpgradeable.sol +0 -28
  83. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/ERC4626FeesUpgradeable.sol +0 -115
  84. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/MyNFTUpgradeable.sol +0 -14
  85. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlERC20MintBaseUpgradeable.sol +0 -31
  86. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlERC20MintMissingUpgradeable.sol +0 -30
  87. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRoleUpgradeable.sol +0 -29
  88. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlModifiedUpgradeable.sol +0 -20
  89. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessManagedERC20MintBaseUpgradeable.sol +0 -22
  90. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/MyContractOwnableUpgradeable.sol +0 -22
  91. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/account/MyAccountERC7702Upgradeable.sol +0 -26
  92. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/account/MyFactoryAccountUpgradeable.sol +0 -42
  93. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyGovernorUpgradeable.sol +0 -92
  94. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyTokenTimestampBasedUpgradeable.sol +0 -39
  95. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyTokenUpgradeable.sol +0 -28
  96. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyTokenWrappedUpgradeable.sol +0 -39
  97. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC1155/GameItemsUpgradeable.sol +0 -27
  98. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC1155/MyERC115HolderContractUpgradeable.sol +0 -13
  99. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC20/GLDTokenUpgradeable.sol +0 -17
  100. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC6909/ERC6909GameItemsUpgradeable.sol +0 -31
  101. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC721/GameItemUpgradeable.sol +0 -24
  102. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/utilities/Base64NFTUpgradeable.sol +0 -32
  103. package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/utilities/MulticallUpgradeable.sol +0 -21
  104. package/lib/openzeppelin-contracts-upgradeable/docs/README.md +0 -16
  105. package/lib/openzeppelin-contracts-upgradeable/docs/antora.yml +0 -7
  106. package/lib/openzeppelin-contracts-upgradeable/docs/config.js +0 -21
  107. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/access-control-multiple.svg +0 -97
  108. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/access-manager-functions.svg +0 -47
  109. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/access-manager.svg +0 -99
  110. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
  111. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
  112. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
  113. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack.png +0 -0
  114. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
  115. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-mint.png +0 -0
  116. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
  117. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
  118. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
  119. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-exec.png +0 -0
  120. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-vote.png +0 -0
  121. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/nav.adoc +0 -29
  122. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/access-control.adoc +0 -288
  123. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/account-abstraction.adoc +0 -100
  124. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/accounts.adoc +0 -354
  125. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/backwards-compatibility.adoc +0 -50
  126. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/eoa-delegation.adoc +0 -143
  127. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc1155.adoc +0 -118
  128. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc20-supply.adoc +0 -71
  129. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc20.adoc +0 -67
  130. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc4626.adoc +0 -214
  131. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc6909.adoc +0 -47
  132. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc721.adoc +0 -58
  133. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/extending-contracts.adoc +0 -51
  134. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/faq.adoc +0 -13
  135. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/governance.adoc +0 -239
  136. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/index.adoc +0 -70
  137. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/multisig.adoc +0 -306
  138. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/tokens.adoc +0 -31
  139. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/upgradeable.adoc +0 -77
  140. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/utilities.adoc +0 -591
  141. package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/wizard.adoc +0 -15
  142. package/lib/openzeppelin-contracts-upgradeable/docs/templates/contract.hbs +0 -141
  143. package/lib/openzeppelin-contracts-upgradeable/docs/templates/helpers.js +0 -46
  144. package/lib/openzeppelin-contracts-upgradeable/docs/templates/page.hbs +0 -4
  145. package/lib/openzeppelin-contracts-upgradeable/docs/templates/properties.js +0 -88
  146. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +0 -22
  147. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/ERC4626Fees.sol +0 -109
  148. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/MyNFT.sol +0 -9
  149. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +0 -25
  150. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +0 -24
  151. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +0 -23
  152. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlModified.sol +0 -14
  153. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +0 -16
  154. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol +0 -17
  155. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyAccountERC7702.sol +0 -20
  156. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyFactoryAccount.sol +0 -37
  157. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyGovernor.sol +0 -80
  158. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyToken.sol +0 -21
  159. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +0 -32
  160. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenWrapped.sol +0 -28
  161. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/GameItems.sol +0 -21
  162. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +0 -7
  163. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC20/GLDToken.sol +0 -11
  164. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +0 -26
  165. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC721/GameItem.sol +0 -19
  166. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Base64NFT.sol +0 -27
  167. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Multicall.sol +0 -15
  168. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/README.md +0 -16
  169. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/antora.yml +0 -7
  170. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/config.js +0 -21
  171. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-control-multiple.svg +0 -97
  172. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager-functions.svg +0 -47
  173. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager.svg +0 -99
  174. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
  175. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
  176. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
  177. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png +0 -0
  178. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
  179. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png +0 -0
  180. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
  181. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
  182. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
  183. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png +0 -0
  184. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png +0 -0
  185. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/nav.adoc +0 -29
  186. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/access-control.adoc +0 -288
  187. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/account-abstraction.adoc +0 -100
  188. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/accounts.adoc +0 -354
  189. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/backwards-compatibility.adoc +0 -50
  190. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/eoa-delegation.adoc +0 -143
  191. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc1155.adoc +0 -118
  192. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20-supply.adoc +0 -71
  193. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20.adoc +0 -67
  194. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc4626.adoc +0 -214
  195. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc6909.adoc +0 -47
  196. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc721.adoc +0 -58
  197. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/extending-contracts.adoc +0 -51
  198. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/faq.adoc +0 -13
  199. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/governance.adoc +0 -239
  200. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/index.adoc +0 -70
  201. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/multisig.adoc +0 -306
  202. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/tokens.adoc +0 -31
  203. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/upgradeable.adoc +0 -77
  204. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/utilities.adoc +0 -591
  205. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/wizard.adoc +0 -15
  206. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/contract.hbs +0 -141
  207. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/helpers.js +0 -46
  208. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/page.hbs +0 -4
  209. package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/properties.js +0 -88
  210. package/lib/openzeppelin-contracts-upgradeable.git/docs/antora.yml +0 -6
  211. package/lib/openzeppelin-contracts-upgradeable.git/docs/config.js +0 -21
  212. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/images/tally-exec.png +0 -0
  213. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/images/tally-vote.png +0 -0
  214. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/nav.adoc +0 -23
  215. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/access-control.adoc +0 -217
  216. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/crosschain.adoc +0 -210
  217. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/crowdsales.adoc +0 -11
  218. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/drafts.adoc +0 -19
  219. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc1155.adoc +0 -153
  220. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc20-supply.adoc +0 -113
  221. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc20.adoc +0 -85
  222. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc721.adoc +0 -90
  223. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc777.adoc +0 -73
  224. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/extending-contracts.adoc +0 -129
  225. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/governance.adoc +0 -321
  226. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/index.adoc +0 -63
  227. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/releases-stability.adoc +0 -85
  228. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/tokens.adoc +0 -32
  229. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/upgradeable.adoc +0 -73
  230. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/utilities.adoc +0 -190
  231. package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/wizard.adoc +0 -15
  232. package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/contract.hbs +0 -85
  233. package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/helpers.js +0 -46
  234. package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/page.hbs +0 -4
  235. package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/properties.js +0 -49
  236. package/lib/openzeppelin-contracts.git/docs/antora.yml +0 -6
  237. package/lib/openzeppelin-contracts.git/docs/config.js +0 -21
  238. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/images/tally-exec.png +0 -0
  239. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/images/tally-vote.png +0 -0
  240. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/nav.adoc +0 -23
  241. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/access-control.adoc +0 -217
  242. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/crosschain.adoc +0 -210
  243. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/crowdsales.adoc +0 -11
  244. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/drafts.adoc +0 -19
  245. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc1155.adoc +0 -153
  246. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc20-supply.adoc +0 -113
  247. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc20.adoc +0 -85
  248. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc721.adoc +0 -90
  249. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc777.adoc +0 -73
  250. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/extending-contracts.adoc +0 -129
  251. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/governance.adoc +0 -321
  252. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/index.adoc +0 -63
  253. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/releases-stability.adoc +0 -85
  254. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/tokens.adoc +0 -32
  255. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/upgradeable.adoc +0 -73
  256. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/utilities.adoc +0 -190
  257. package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/wizard.adoc +0 -15
  258. package/lib/openzeppelin-contracts.git/docs/templates/contract.hbs +0 -85
  259. package/lib/openzeppelin-contracts.git/docs/templates/helpers.js +0 -46
  260. package/lib/openzeppelin-contracts.git/docs/templates/page.hbs +0 -4
  261. package/lib/openzeppelin-contracts.git/docs/templates/properties.js +0 -49
  262. package/lib/reality-eth-monorepo/packages/docs/Audit_Reality_v3_202108.pdf +0 -0
  263. package/lib/reality-eth-monorepo/packages/docs/Makefile +0 -20
  264. package/lib/reality-eth-monorepo/packages/docs/arbitrators.rst +0 -85
  265. package/lib/reality-eth-monorepo/packages/docs/audit.rst +0 -12
  266. package/lib/reality-eth-monorepo/packages/docs/audit_v2.rst +0 -249
  267. package/lib/reality-eth-monorepo/packages/docs/audit_v2_ERC20.rst +0 -1075
  268. package/lib/reality-eth-monorepo/packages/docs/audit_v3.rst +0 -70
  269. package/lib/reality-eth-monorepo/packages/docs/conf.py +0 -155
  270. package/lib/reality-eth-monorepo/packages/docs/contract_explanation.rst +0 -82
  271. package/lib/reality-eth-monorepo/packages/docs/contracts.rst +0 -277
  272. package/lib/reality-eth-monorepo/packages/docs/dapp.rst +0 -126
  273. package/lib/reality-eth-monorepo/packages/docs/dapp_links.rst +0 -67
  274. package/lib/reality-eth-monorepo/packages/docs/fees.rst +0 -89
  275. package/lib/reality-eth-monorepo/packages/docs/index.rst +0 -26
  276. package/lib/reality-eth-monorepo/packages/docs/javascript.rst +0 -142
  277. package/lib/reality-eth-monorepo/packages/docs/make.bat +0 -36
  278. package/lib/reality-eth-monorepo/packages/docs/question_box.png +0 -0
  279. package/lib/reality-eth-monorepo/packages/docs/requirements.txt +0 -24
  280. package/lib/reality-eth-monorepo/packages/docs/whitepaper.rst +0 -165
  281. package/script/UpdateMarket.s.sol +0 -56
  282. package/scripts/AddAdminToLand.s.sol +0 -29
  283. package/scripts/ClaimMerkleRoot.s.sol +0 -34
  284. package/scripts/CreateLand.s.sol +0 -28
  285. package/scripts/CreateMarkets.s.sol +0 -71
  286. package/scripts/DeployContracts.s.sol +0 -94
  287. package/scripts/DeployMerkleRewardsDistributor.s.sol +0 -27
  288. package/scripts/DeployToken.s.sol +0 -17
  289. package/scripts/DeployUSDT.s.sol +0 -24
  290. package/scripts/MintTokens.s.sol +0 -21
  291. package/scripts/PublishMerkleRoot.s.sol +0 -50
  292. package/scripts/ResolveMarket.s.sol +0 -23
  293. package/scripts/TradeMarket.s.sol +0 -28
  294. package/scripts/UpdateMarket.s.sol +0 -55
  295. package/test/UpdateTest.t.sol +0 -55
  296. package/test/WhaleTest.t.sol +0 -188
  297. package/tooling/docs/jsdoc.json +0 -6
@@ -1,70 +0,0 @@
1
- Audit, v3.0 (including ERC20 version)
2
- =====================================
3
-
4
- Exported by Edmund Edgar from `Original audit document (PDF)`_.
5
-
6
- .. _`Original audit document (PDF)`: ../Audit_Reality_v3_202108.pdf
7
-
8
- Reality 3.0 / August 2021
9
- -------------------------
10
-
11
- Files in scope
12
- --------------
13
- https://github.com/RealityETH/monorepo/blob/064855bfd8c80a0bcf3da7b73936ce477e99b635/packages/contracts/development/contracts/RealityETH-3.0.sol
14
- https://github.com/RealityETH/monorepo/blob/064855bfd8c80a0bcf3da7b73936ce477e99b635/packages/contracts/development/contracts/RealityETH_ERC20-
15
- 3.0.sol
16
-
17
- Current status
18
- --------------
19
- All issues have been fixed by the developer. There are no know issues in
20
- https://github.com/RealityETH/monorepo/blob/e4584d7cf6ab2d9a5b129bd970b7d4517811ae6a.
21
-
22
- Issues
23
- ------
24
-
25
- 1. Incorrect bond payout on UNRESOLVED_ANSWER
26
- ---------------------------------------------
27
-
28
- type: faulty implementation / severity: medium
29
-
30
- When last answer is unrevealed and best answer is UNRESOLVED_ANSWER, the bond from the unrevealed answer will be paid to address(0) instead of to the winner which would we be the case if the best answer wasn’t an UNRESOLVED_ANSWER.
31
-
32
- status - fixed
33
-
34
- Issue has been fixed and is no longer present in
35
- https://github.com/RealityETH/monorepo/blob/e4584d7cf6ab2d9a5b129bd970b7d4517811ae6a
36
-
37
- 2. Arbitration can be initiated even with no valid answer, resulting in premature finalisation after the arbitration is cancelled
38
- ---------------------------------------------------------------------------------------------------------------------------------
39
-
40
- type: security / severity: medium
41
-
42
- Arbitration can be initiated after an answer commitment is posted, even if no revealed answers have been posted, after this arbitration is
43
- cancelled the question will be finalised after finalize_ts seconds, even though no answer has been provided. In results all bonds will be
44
- paid out to address(0), bounty will become unretrievable and best_answer will be set to 0.
45
-
46
- status - fixed
47
-
48
- Issue has been fixed and is no longer present in
49
- https://github.com/RealityETH/monorepo/blob/e4584d7cf6ab2d9a5b129bd970b7d4517811ae6a
50
-
51
- 3. answer_takeover_fee credited to second answer depends on the way answers are processed
52
- -----------------------------------------------------------------------------------------
53
-
54
- type: security / severity: medium
55
-
56
- In claimWinnings answer_takeover_fee is inconsistently calculated, it is being subtracted from bounty if the winning answer and second best answer are processed in one go, but if they are processed separately, the whole bounty amount is reserved for the winner and can’t by used for the fee.
57
-
58
- status - fixed
59
-
60
- Issue has been fixed and is no longer present in
61
- https://github.com/RealityETH/monorepo/blob/e4584d7cf6ab2d9a5b129bd970b7d4517811ae6a
62
-
63
- Notes
64
- -----
65
-
66
- RealityETH_ERC20-3.0.sol should not be used with ERC20-like token contracts that implement callbacks like ERC777 due to potential re-
67
- entrancy issues.
68
-
69
- -------------------------
70
- G0 GROUP // Reality 3.0 / August 2021
@@ -1,155 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # reality.eth documentation build configuration file, created by
4
- # sphinx-quickstart on Thu Sep 28 14:43:50 2017.
5
- #
6
- # This file is execfile()d with the current directory set to its
7
- # containing dir.
8
- #
9
- # Note that not all possible configuration values are present in this
10
- # autogenerated file.
11
- #
12
- # All configuration values have a default; values that are commented out
13
- # serve to show the default.
14
-
15
- # If extensions (or modules to document with autodoc) are in another directory,
16
- # add these directories to sys.path here. If the directory is relative to the
17
- # documentation root, use os.path.abspath to make it absolute, like shown here.
18
- #
19
- # import os
20
- # import sys
21
- # sys.path.insert(0, os.path.abspath('.'))
22
-
23
-
24
- # -- General configuration ------------------------------------------------
25
-
26
- # If your documentation needs a minimal Sphinx version, state it here.
27
- #
28
- # needs_sphinx = '1.0'
29
-
30
- # Add any Sphinx extension module names here, as strings. They can be
31
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32
- # ones.
33
- extensions = []
34
-
35
- # Add any paths that contain templates here, relative to this directory.
36
- templates_path = ['_templates']
37
-
38
- # The suffix(es) of source filenames.
39
- # You can specify multiple suffix as a list of string:
40
- #
41
- # source_suffix = ['.rst', '.md']
42
- source_suffix = '.rst'
43
-
44
- # The master toctree document.
45
- master_doc = 'index'
46
-
47
- # General information about the project.
48
- project = u'reality.eth'
49
- copyright = u'2017, KK Social Minds'
50
- author = u'KK Social Minds'
51
-
52
- # The version info for the project you're documenting, acts as replacement for
53
- # |version| and |release|, also used in various other places throughout the
54
- # built documents.
55
- #
56
- # The short X.Y version.
57
- version = u''
58
- # The full version, including alpha/beta/rc tags.
59
- release = u''
60
-
61
- # The language for content autogenerated by Sphinx. Refer to documentation
62
- # for a list of supported languages.
63
- #
64
- # This is also used if you do content translation via gettext catalogs.
65
- # Usually you set "language" from the command line for these cases.
66
- language = None
67
-
68
- # List of patterns, relative to source directory, that match files and
69
- # directories to ignore when looking for source files.
70
- # This patterns also effect to html_static_path and html_extra_path
71
- exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
72
-
73
- # The name of the Pygments (syntax highlighting) style to use.
74
- pygments_style = 'sphinx'
75
-
76
- # If true, `todo` and `todoList` produce output, else they produce nothing.
77
- todo_include_todos = False
78
-
79
-
80
- # -- Options for HTML output ----------------------------------------------
81
-
82
- # The theme to use for HTML and HTML Help pages. See the documentation for
83
- # a list of builtin themes.
84
- #
85
- html_theme = 'sphinx_rtd_theme'
86
-
87
- # Theme options are theme-specific and customize the look and feel of a theme
88
- # further. For a list of options available for each theme, see the
89
- # documentation.
90
- #
91
- # html_theme_options = {}
92
-
93
- # Add any paths that contain custom static files (such as style sheets) here,
94
- # relative to this directory. They are copied after the builtin static files,
95
- # so a file named "default.css" will overwrite the builtin "default.css".
96
- # html_static_path = ['_static']
97
-
98
- # -- Options for HTMLHelp output ------------------------------------------
99
-
100
- # Output file base name for HTML help builder.
101
- htmlhelp_basename = 'reality.ethdoc'
102
-
103
-
104
- # -- Options for LaTeX output ---------------------------------------------
105
-
106
- latex_elements = {
107
- # The paper size ('letterpaper' or 'a4paper').
108
- #
109
- # 'papersize': 'letterpaper',
110
-
111
- # The font size ('10pt', '11pt' or '12pt').
112
- #
113
- # 'pointsize': '10pt',
114
-
115
- # Additional stuff for the LaTeX preamble.
116
- #
117
- # 'preamble': '',
118
-
119
- # Latex figure (float) alignment
120
- #
121
- # 'figure_align': 'htbp',
122
- }
123
-
124
- # Grouping the document tree into LaTeX files. List of tuples
125
- # (source start file, target name, title,
126
- # author, documentclass [howto, manual, or own class]).
127
- latex_documents = [
128
- (master_doc, 'reality.eth.tex', u'reality.eth Documentation',
129
- u'KK Social Minds', 'manual'),
130
- ]
131
-
132
-
133
- # -- Options for manual page output ---------------------------------------
134
-
135
- # One entry per manual page. List of tuples
136
- # (source start file, name, description, authors, manual section).
137
- man_pages = [
138
- (master_doc, 'reality.eth', u'reality.eth Documentation',
139
- [author], 1)
140
- ]
141
-
142
-
143
- # -- Options for Texinfo output -------------------------------------------
144
-
145
- # Grouping the document tree into Texinfo files. List of tuples
146
- # (source start file, target name, title, author,
147
- # dir menu entry, description, category)
148
- texinfo_documents = [
149
- (master_doc, 'reality.eth', u'reality.eth Documentation',
150
- author, 'reality.eth', 'One line description of project.',
151
- 'Miscellaneous'),
152
- ]
153
-
154
-
155
-
@@ -1,82 +0,0 @@
1
- Contract Internals
2
- ==================
3
-
4
- This document is intended to help you read and understand the ``RealityETH.sol`` and ``RealityETH_ERC20`` contracts, in particular their internal data structures. See the previous documents for a higher-level description of what the contracts do.
5
-
6
- Questions
7
- ---------
8
-
9
- A question consists of a string encoding a JSON object. See :doc:`contracts`.
10
- This is structured as a reusable template, plus delimited string supplying parameters.
11
-
12
- The resulting document (template + parameters) identifies a particular question content.
13
-
14
- ``Template ID`` + ``Opening datetime`` + ``Parameter string`` -> ``Content Hash``
15
-
16
- A question with a particular Content Hash may be asked on multiple occasions, some of which may have different arbitrator and timeout settings.
17
-
18
- The content hash and the other settings are hashed to make the Question ID.
19
-
20
- Versions 2 and 2.1:
21
- ``Content Hash`` + ``Arbitrator`` + ``Timeout`` + ``Creator`` + ``Nonce`` -> ``Question ID``
22
-
23
- Version 3:
24
- ``Content Hash`` + ``Arbitrator`` + ``Timeout`` + ``Min Bond`` + ``Creator`` + ``Contract address`` ``Nonce`` -> ``Question ID``
25
-
26
-
27
- Answer history entries
28
- ----------------------
29
-
30
- Each time an answer is submitted, it creates a history item. The contract later needs to be able to access the entire history to correctly assign bonds at the end of the process.
31
-
32
- The question struct always stores the most recent answer and bond. However, to avoid the need to expand storage for answer, we store a only a single hash representing the entire history, and require users to supply the history when they claim bonds.
33
-
34
- ``Empty Bytes32`` + ``Answer`` + ``Bond`` + ``Answerer`` + ``False`` -> ``History Hash 1``
35
-
36
- ``History Hash 1`` + ``Answer`` + ``Bond`` + ``Answerer`` + ``False`` -> ``History Hash 2``
37
-
38
- ``History Hash 2`` + ``Answer`` + ``Bond`` + ``Answerer`` + ``False`` -> ``History Hash 3`` <- stored in Questions struct
39
-
40
- See below for how if the answer is supplied by commit->reveal, this will instead hold the Commitment ID, and the final item will be True.
41
-
42
- Commitments
43
- -----------
44
-
45
- To give people who consistently give right answers a defence against having their rewards taken from them by front-runners, we allow users to separate the posting of an answer into two stages: The commit and the reveal.
46
-
47
- The commitment consists of a hash of the answer that the user wishes to supply, combined with a secret nonce known only to themselves or their agent.
48
-
49
- ``Answer`` + ``Nonce`` -> ``Answer Hash``
50
-
51
- A commitment is uniquely identified by the Question ID, the Answer Hash and the bond. (The system will not allow two answers to be submitted with the same bond.)
52
-
53
- ``Question ID`` + ``Answer Hash`` + ``Bond`` -> ``Commitment ID``
54
-
55
- The information about the commitment - the reveal deadline, whether the reveal has happened and the revealed answer - are stored in a struct by indexed Commitment ID.
56
-
57
- Since the answer being submitted is not known when the the history item is created, answers using commit-and-reveal will store the Commitment ID instead of the answer.
58
-
59
-
60
-
61
- ``Empty Bytes32`` + ``Answer`` + ``Bond`` + ``Answerer`` + ``False`` -> ``History Hash 1``
62
-
63
- ``History Hash 1`` + ``Answer`` + ``Bond`` + ``Answerer`` + ``False`` -> ``History Hash 2``
64
-
65
- ``History Hash 2`` + ``Answer`` + ``Bond`` + ``Answerer`` + ``False`` -> ``History Hash 3``
66
-
67
- ``History Hash 3`` + ``Commitment ID`` + ``Bond`` + ``Answerer`` + ``True`` -> ``History Hash 4`` <- stored in Questions struct
68
-
69
-
70
- During the claim process (see below) the contract will look up the revealed answer as referenced by the Commitment ID it finds in the history, then delete the Commitment struct.
71
-
72
- Claims
73
- ------
74
-
75
- Claims are made by playing back the history from the latest entries first.
76
-
77
- Normally funds can be claimed at the end of the process in a single transaction. This transaction will assign the appropriate payments, clear the History Hash record from the question and delete any Commitment data.
78
-
79
- However, in some cases users may wish to claim only the later history entries in a single transaction, leaving the earlier entries to be claimed either by themelves or by another user in a future transaction.
80
-
81
- In this case the contract needs to store some information about the claim process. This is stored in a Claim struct, referenced by Question ID.
82
-
@@ -1,277 +0,0 @@
1
- Using Reality.eth from a contract
2
- =====================================
3
-
4
- Contract deployments
5
- --------------------
6
-
7
- You can find the reality.eth contract addresses under https://github.com/RealityETH/reality-eth-monorepo/tree/main/packages/contracts/chains/deployments .
8
-
9
- For instance, the reality.eth v3 contract for mainnet (chain ID `1`) is shown in the file
10
- https://github.com/RealityETH/reality-eth-monorepo/blob/main/packages/contracts/chains/deployments/1/ETH/RealityETH-3.0.json
11
-
12
- Fetching information
13
- --------------------
14
-
15
- The simplest way use for Reality.eth is to fetch some information for a question that has already been posted using the DApp.
16
-
17
- Hovering your mouse over the "..." mark in the upper right-hand corner of a question will show you the question ID and the hash of the question content.
18
-
19
- Fetching the answer to a particular question
20
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
-
22
- Each question can be referred to by its ``question_id``, which is a ``bytes32``.
23
-
24
- There is only one question with any given ``question_id``, and there can only be one corresponding answer.
25
-
26
- You can fetch the final answer for a question by calling
27
-
28
- .. code-block:: javascript
29
- :linenos:
30
-
31
- bytes32 response = resultFor(bytes32 question_id);
32
-
33
-
34
- This will return ``bytes32`` data, or throw an error (``revert``) if the question does not exist or has not been finalized. You often want to cast the resulting ``bytes32`` to a ``uint256`` when you process it. By convention all supported types use ``0xff...ff`` (aka ``bytes32(type(uint256).max)``) to mean "invalid".
35
-
36
-
37
- Interpreting the result of a question
38
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
-
40
- Questions have a ``type``, which decides what format the answer should take, and tells the Reality.eth dapp what kind of UI it should display to submit answers. The dapp recognizes the following types:
41
-
42
- bool
43
- """"
44
-
45
- A ``bool`` type represents a yes/no question. The result will be ``1``, ``0``, or ``0xff...ff`` for invalid, for example:
46
-
47
- Did Donald Trump win the 2016 US presidential election?
48
- * 1: Yes
49
- * 0: No
50
- * 0xff..ff: Invalid
51
-
52
-
53
-
54
- uint
55
- """"
56
-
57
- A ``uint`` type represents a number. The question may have a ``decimals`` field by which it should be divided. Negative numbers are not currently supported.
58
-
59
- How many electoral votes did Hillary Clinton win in the 2016 US presidential election?
60
-
61
-
62
- single-select
63
- """""""""""""
64
-
65
- A ``single-select`` type represents a list of outcomes, producing a select box in the dapp. It is expressed as a zero-indexed, json-encoded array.
66
-
67
- Which party's nominee won the 2016 US presidential election?
68
-
69
- * ``0``: Democrat
70
- * ``1``: Republican
71
- * ``2``: Libertarian
72
-
73
- The outcomes are supplied in a field called ``outcomes``. There is also an ``invalid`` option (``0xff..ff``) which is added automatically.
74
-
75
- ``["Democrat", "Republican", "Libertarian"]``
76
-
77
-
78
- multiple-select
79
- """""""""""""""
80
-
81
- The ``multiple-select`` type represents a list of outcomes, producing checkboxes in the dapp. It is Expressed as a one-indexed, json-encoded array.
82
-
83
- Which party's nominee won the seats the House in the 2016 congressional elections?
84
-
85
- * ``1``: Democrat
86
- * ``2``: Republican
87
- * ``4``: Libertarian
88
-
89
- These are added together, so ``0`` would mean than none were selected, (``1`` + ``2``) = ``3`` would indicate Democrat and Republican, (``1`` + ``4``) = ``5`` would indicate Democrat and Libertarian, etc. There is also an ``0xff..ff``: Invalid option.
90
-
91
- The outcomes are supplied in a field called ``outcomes``, as with ``single-select``.
92
- ``["Democrat", "Republican", "Libertarian"]``
93
-
94
-
95
- datetime
96
- """"""""
97
-
98
- A ``datetime`` type represents a question that is answered with a date/time. This will be represented as a date picker in the UI, and expressed as a unix timestamp (seconds since 1970), of ``0xff..ff`` for invalid.
99
-
100
- The question may also specify a ``precision`` indicating whether it expects a datetime to the nearest year (``Y``), month (``m``), day (``d``), hour (``H``), minute (``i``) or second (``s``). If no precision is specified, it should be assumed to be ``d``, ie the answer should be a date (in UTC) with no time. An answer with a greater precision than that specified should be considered wrong.
101
-
102
-
103
- How questions are structured
104
- ----------------------------
105
-
106
- Questions are expressed as a JSON object. This should specify a ``title`` and a ``type``, and may also include a ``category`` and ``lang`` field. It may include other fields depending on the type, such as ``outcomes`` to specify the possible outcomes in a ``single-select`` or ``multiple-select``, or ``decimals`` in a ``uint`` type.
107
-
108
- Example:
109
- ``{"title": "Did Trump win the 2016 US presidential election?", "type": "bool", "category": "politics", "lang": "en"}``
110
-
111
-
112
- .. _templates:
113
-
114
- Templates
115
- ^^^^^^^^^
116
-
117
- To avoid duplication and resulting gas fees, parts common to many questions are included in a pre-defined *template*. The *template* includes placeholders, and each question only needs to pass in the data necessary to replace the placeholders.
118
-
119
- The following templates are built in, one for each question type:
120
-
121
- * ``0``: ``{"title": "%s", "type": "bool", "category": "%s", "lang": "%s"}``
122
- * ``1``: ``{"title": "%s", "type": "uint", "decimals": 18, "category": "%s", "lang": "%s"}``
123
- * ``2``: ``{"title": "%s", "type": "single-select", "outcomes": [%s], "category": "%s", "lang": "%s"}``
124
- * ``3``: ``{"title": "%s", "type": "multiple-select", "outcomes": [%s], "category": "%s", "lang": "%s"}``
125
- * ``4``: ``{"title": "%s", "type": "datetime", "category": "%s", "lang": "%s"}``
126
-
127
- See :ref:`creating-templates` for how and why you can create your own custom template.
128
-
129
- Questions are creating by combining the ID of the template (for example, `2` for the built-in single-select template) with the unicode delimiter characther "␟".
130
-
131
- For example, a simple boolean question intended for the category "news-politics" might use the string:
132
- ``Did Donald Trump win the 2016 US presidential election?␟news-politics␟en``
133
-
134
- A question with multiple outcomes will need the JSON-encoded outcome list passed in, eg
135
- ``Which party's nominee won the 2016 US presidential election?␟"Democrat","Republican","Libertarian"␟news-politics␟en``
136
-
137
-
138
- Formatting
139
- ^^^^^^^^^^
140
-
141
- You can set the `format` field in your template to `text/markdown` to use (restricted) markdown formatting in your `title`. If you do not set the format, it will be assumed to be `text/plain`.
142
-
143
-
144
-
145
- Asking questions
146
- ----------------
147
-
148
- You can ask a new question by calling the ``askQuestion()`` function.
149
-
150
- The content of the question defined as a combination of a numerical ``template_id`` and a ``string`` of parameters.
151
-
152
- .. code-block:: javascript
153
- :linenos:
154
-
155
- function askQuestion(
156
- uint256 template_id,
157
- string question,
158
- address arbitrator,
159
- uint32 timeout,
160
- uint32 opening_ts,
161
- uint256 nonce
162
- )
163
- returns (bytes32 question_id);
164
-
165
- If the arbitrator you have selected charges a per-question fee, you must supply at least this much ETH. Any additonal ETH you send with this call will be assigned as a reward to whoever supplies the final answer to the question. See :doc:`fees` for more information.
166
-
167
- See :ref:`templates` for the ``template_id``, and how the ``question`` parameter is structured.
168
-
169
- If you are using a version of the contract that uses an ERC20 token, the same call will work but you cannot use it to supply funds. If you need to supply funds, either for an initial bond or because the arbitrator requires a per-question fee, you should instead call the ERC20 version, ``askQuestionERC20()``. This has an additional parameter for the number of tokens you wish to supply. This will attempt to debit the tokens from the token contract, or ``revert`` if they have not been approved.
170
-
171
- .. code-block:: javascript
172
- :linenos:
173
-
174
- function askQuestionERC20(
175
- uint256 template_id,
176
- string question,
177
- address arbitrator,
178
- uint32 timeout,
179
- uint32 opening_ts,
180
- uint256 nonce,
181
- uint256 tokens,
182
- )
183
- returns (bytes32 question_id);
184
-
185
-
186
-
187
- The ``arbitrator`` is the address of the contract that will be able to arbitrate. See :doc:`arbitrators` for more information. From version 3, this parameter may be left empty. For prior versions, if you wish to make arbitration impossible, you can instead supply the address of the `reality.eth` contract itself.
188
-
189
- The ``timeout`` is the time in seconds the question will have after adding an answer before it is automatically finalized. It would typically be around ``1 days``. The contract sanity-checks set the maximum possible value at ``365 days``.
190
-
191
- The ``opening_ts`` is the timestamp for the earliest time at which it will be possible to post an answer to the question. You can use ``0`` if you intend the question to be answerable immediately.
192
-
193
- The ``nonce`` is a user-supplied number that can be used to disambiguated deliberate repeated uses of the same question. You can use ``0`` if you never intend to ask the same question with the same settings twice.
194
-
195
- Any ETH or tokens provided with the ``askQuestion`` or ``askQuestionERC20`` call will be used as a question reward, minus any fee the specified arbitrator requires when a new question is asked.
196
-
197
-
198
- The ``askQuestion`` call returns a ``bytes32`` ID. This ID is made by hashing the parameters, plus ``msg.sender``. Note that the format will change in version 3.
199
-
200
- .. note:: The Etherscan "write contract" feature has been known to mangle the delimiter character.
201
-
202
- As of version 3, you can also specify a minimum bond below which the initial answer will not be accepted. For this, use the ``askQuestionWithMinBond()`` or ``askQuestionWithMinBondERC20()`` method.
203
-
204
-
205
-
206
-
207
-
208
- Accepting an answer only if something has happened (pre version 3)
209
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210
-
211
- Once a question has been created and the opening date (if set) reached, it can be answered immediately.
212
-
213
- In many cases you are not interested in the result of a particular question until it has a particular answer. For example, if you have a contract insuring against my house burning down, you are only interested in the result if my house burned down. You don't care about all the times in between setting up the policy and claiming when my house didn't burn down.
214
-
215
- You may also want to screen out results indicating "unknown" or "no way to tell" or "hasn't happened yet".
216
-
217
- One approach is that instead of waiting for the result of a specific ``question_id``, you specify the type of question you want, then wait for a user to send you a question ID with the appropriate content and settings.
218
-
219
- To make this easier, we provide a method called ``getFinalAnswerIfMatches()``. This will throw an error not only if the question is not yet answered, but also if the content doesn't match, the bond or timeout is too low, or the arbitrator is not the one you expect.
220
-
221
- .. code-block:: javascript
222
- :linenos:
223
-
224
- function getFinalAnswerIfMatches(
225
- bytes32 question_id,
226
- bytes32 content_hash,
227
- address arbitrator,
228
- uint256 min_timeout,
229
- uint256 min_bond
230
- ) returns (bytes32 answer)
231
-
232
- You can then screen ``answer`` in your contract and only act on results that your contract is interested in.
233
-
234
-
235
- Accepting an answer only if something has happened (version 3 onwards)
236
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237
-
238
- To simplify the process of accepting only questions with an answer, from version 3 you can substitute ``forResult()`` with ``forResultOnceSettled()``. This screens the result for an answer representing "not yet settled", represented as ``bytes32(-2)``. Rather than returning this answer, it will revert as it would if the question question had not yet been answered. The contract allows any user to reopen a question in this state, creating a new question, repeatedly if necessary. Once a replacement question has been settled, its result is returned using the ID of the original question. A calling contract can ignore the details of this process and know only that it needs to call ``forResultOnceSettled()``.
239
-
240
- If using this feature it is also advisable to set a minimum bond.
241
-
242
-
243
- .. _creating-templates:
244
-
245
- Custom templates
246
- ----------------
247
-
248
- If you want to create many similar requests, it will be more efficient to create your own template. For example, a flight insurance app might have:
249
-
250
- .. code-block:: json
251
- :linenos:
252
-
253
- {
254
- "title": "Was flight %s on date %s delayed by more than 3 hours?",
255
- "type": "bool",
256
- "category": "flight-information"
257
- }
258
-
259
-
260
- This can then by called with a string including only the flight number, the delimiter and the date, eg:
261
- ``MH17␟2017-12-01``
262
-
263
- A template can be created by calling ``createTemplate("template")``, where "template" is the JSON template. This returns a numerical ID. If you wish to reference particular template on code running on multiple networks with the same content, you may find it useful to call ``template_hashes(bytes32 template_hash)`` to get the numerical ID.
264
-
265
-
266
- Contract addresses
267
- ------------------
268
-
269
- Each supported chain has a reality.eth contract instance per supported token. Some chains have additional deployments for earlier versions.
270
-
271
- Each has its own configuration file like the following:
272
-
273
- * reality.eth v3 for ETH on mainnet (chain ID 1): https://github.com/RealityETH/reality-eth-monorepo/blob/main/packages/contracts/chains/deployments/1/ETH/RealityETH-3.0.json
274
- * reality.eth v3 for the GNO token on Gnosis chain (chain ID 100): https://github.com/RealityETH/reality-eth-monorepo/blob/main/packages/contracts/chains/deployments/100/GNO/RealityETH_ERC20-3.0.json
275
-
276
- The configuration file may also include a list of known arbitrators that should be displayed in the UI. If you use an arbitrator not included in this list, a warning will be displayed in the dapp.
277
-