polkamarkets-js 3.4.1 → 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.
- package/package.json +1 -1
- package/src/models/PredictionMarketV3Contract.js +49 -16
- package/abis/AccessControlUpgradeable.json +0 -1
- package/abis/AddAdminToLand.json +0 -1
- package/abis/AddressUpgradeable.json +0 -1
- package/abis/ClaimMerkleRoot.json +0 -1
- package/abis/CreateLand.json +0 -1
- package/abis/CreateMarkets.json +0 -1
- package/abis/DeployContracts.json +0 -1
- package/abis/DeployMerkleRewardsDistributor.json +0 -1
- package/abis/DeployToken.json +0 -1
- package/abis/DeployUSDT.json +0 -1
- package/abis/ECDSA.json +0 -1
- package/abis/ERC165Upgradeable.json +0 -1
- package/abis/ERC1967UpgradeUpgradeable.json +0 -1
- package/abis/Hashes.json +0 -1
- package/abis/IBeaconUpgradeable.json +0 -1
- package/abis/IERC1822ProxiableUpgradeable.json +0 -1
- package/abis/IERC20PermitUpgradeable.json +0 -1
- package/abis/IERC20Upgradeable.json +0 -1
- package/abis/Manager.json +0 -1
- package/abis/MerkleProof.json +0 -1
- package/abis/MerkleRewardsDistributor.json +0 -1
- package/abis/MerkleRewardsDistributorTest.json +0 -1
- package/abis/MessageHashUtils.json +0 -1
- package/abis/MintTokens.json +0 -1
- package/abis/Nonces.json +0 -1
- package/abis/Panic.json +0 -1
- package/abis/PublishMerkleRoot.json +0 -1
- package/abis/ResolveMarket.json +0 -1
- package/abis/RewardsDistributor.json +0 -1
- package/abis/RewardsDistributorTest.json +0 -1
- package/abis/SafeCast.json +0 -1
- package/abis/SafeERC20Upgradeable.json +0 -1
- package/abis/SignedMath.json +0 -1
- package/abis/StorageSlotUpgradeable.json +0 -1
- package/abis/TradeMarket.json +0 -1
- package/abis/USDT.json +0 -1
- package/abis/UpdateMarket.json +0 -1
- package/abis/UpdateTest.json +0 -1
- package/abis/WhaleTest.json +0 -1
- package/lib/openzeppelin-contracts/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +0 -22
- package/lib/openzeppelin-contracts/contracts/mocks/docs/ERC4626Fees.sol +0 -109
- package/lib/openzeppelin-contracts/contracts/mocks/docs/MyNFT.sol +0 -9
- package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +0 -25
- package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +0 -24
- package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +0 -23
- package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlModified.sol +0 -14
- package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +0 -16
- package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol +0 -17
- package/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyAccountERC7702.sol +0 -20
- package/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyFactoryAccount.sol +0 -37
- package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyGovernor.sol +0 -80
- package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyToken.sol +0 -21
- package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +0 -32
- package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenWrapped.sol +0 -28
- package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/GameItems.sol +0 -21
- package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +0 -7
- package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC20/GLDToken.sol +0 -11
- package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +0 -26
- package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC721/GameItem.sol +0 -19
- package/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Base64NFT.sol +0 -27
- package/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Multicall.sol +0 -15
- package/lib/openzeppelin-contracts/docs/README.md +0 -16
- package/lib/openzeppelin-contracts/docs/antora.yml +0 -7
- package/lib/openzeppelin-contracts/docs/config.js +0 -21
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-control-multiple.svg +0 -97
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager-functions.svg +0 -47
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager.svg +0 -99
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/nav.adoc +0 -29
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/access-control.adoc +0 -288
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/account-abstraction.adoc +0 -100
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/accounts.adoc +0 -354
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/backwards-compatibility.adoc +0 -50
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/eoa-delegation.adoc +0 -143
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc1155.adoc +0 -118
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20-supply.adoc +0 -71
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20.adoc +0 -67
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc4626.adoc +0 -214
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc6909.adoc +0 -47
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc721.adoc +0 -58
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/extending-contracts.adoc +0 -51
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/faq.adoc +0 -13
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/governance.adoc +0 -239
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/index.adoc +0 -70
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/multisig.adoc +0 -306
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/tokens.adoc +0 -31
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/upgradeable.adoc +0 -77
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/utilities.adoc +0 -591
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/wizard.adoc +0 -15
- package/lib/openzeppelin-contracts/docs/templates/contract.hbs +0 -141
- package/lib/openzeppelin-contracts/docs/templates/helpers.js +0 -46
- package/lib/openzeppelin-contracts/docs/templates/page.hbs +0 -4
- package/lib/openzeppelin-contracts/docs/templates/properties.js +0 -88
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/ERC20WithAutoMinerRewardUpgradeable.sol +0 -28
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/ERC4626FeesUpgradeable.sol +0 -115
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/MyNFTUpgradeable.sol +0 -14
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlERC20MintBaseUpgradeable.sol +0 -31
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlERC20MintMissingUpgradeable.sol +0 -30
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRoleUpgradeable.sol +0 -29
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessControlModifiedUpgradeable.sol +0 -20
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/AccessManagedERC20MintBaseUpgradeable.sol +0 -22
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/access-control/MyContractOwnableUpgradeable.sol +0 -22
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/account/MyAccountERC7702Upgradeable.sol +0 -26
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/account/MyFactoryAccountUpgradeable.sol +0 -42
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyGovernorUpgradeable.sol +0 -92
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyTokenTimestampBasedUpgradeable.sol +0 -39
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyTokenUpgradeable.sol +0 -28
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/governance/MyTokenWrappedUpgradeable.sol +0 -39
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC1155/GameItemsUpgradeable.sol +0 -27
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC1155/MyERC115HolderContractUpgradeable.sol +0 -13
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC20/GLDTokenUpgradeable.sol +0 -17
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC6909/ERC6909GameItemsUpgradeable.sol +0 -31
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/token/ERC721/GameItemUpgradeable.sol +0 -24
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/utilities/Base64NFTUpgradeable.sol +0 -32
- package/lib/openzeppelin-contracts-upgradeable/contracts/mocks/docs/utilities/MulticallUpgradeable.sol +0 -21
- package/lib/openzeppelin-contracts-upgradeable/docs/README.md +0 -16
- package/lib/openzeppelin-contracts-upgradeable/docs/antora.yml +0 -7
- package/lib/openzeppelin-contracts-upgradeable/docs/config.js +0 -21
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/access-control-multiple.svg +0 -97
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/access-manager-functions.svg +0 -47
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/access-manager.svg +0 -99
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-mint.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/nav.adoc +0 -29
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/access-control.adoc +0 -288
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/account-abstraction.adoc +0 -100
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/accounts.adoc +0 -354
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/backwards-compatibility.adoc +0 -50
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/eoa-delegation.adoc +0 -143
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc1155.adoc +0 -118
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc20-supply.adoc +0 -71
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc20.adoc +0 -67
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc4626.adoc +0 -214
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc6909.adoc +0 -47
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/erc721.adoc +0 -58
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/extending-contracts.adoc +0 -51
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/faq.adoc +0 -13
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/governance.adoc +0 -239
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/index.adoc +0 -70
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/multisig.adoc +0 -306
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/tokens.adoc +0 -31
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/upgradeable.adoc +0 -77
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/utilities.adoc +0 -591
- package/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/pages/wizard.adoc +0 -15
- package/lib/openzeppelin-contracts-upgradeable/docs/templates/contract.hbs +0 -141
- package/lib/openzeppelin-contracts-upgradeable/docs/templates/helpers.js +0 -46
- package/lib/openzeppelin-contracts-upgradeable/docs/templates/page.hbs +0 -4
- package/lib/openzeppelin-contracts-upgradeable/docs/templates/properties.js +0 -88
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +0 -22
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/ERC4626Fees.sol +0 -109
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/MyNFT.sol +0 -9
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +0 -25
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +0 -24
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +0 -23
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlModified.sol +0 -14
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +0 -16
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol +0 -17
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyAccountERC7702.sol +0 -20
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyFactoryAccount.sol +0 -37
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyGovernor.sol +0 -80
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyToken.sol +0 -21
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +0 -32
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenWrapped.sol +0 -28
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/GameItems.sol +0 -21
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +0 -7
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC20/GLDToken.sol +0 -11
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +0 -26
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC721/GameItem.sol +0 -19
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Base64NFT.sol +0 -27
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Multicall.sol +0 -15
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/README.md +0 -16
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/antora.yml +0 -7
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/config.js +0 -21
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-control-multiple.svg +0 -97
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager-functions.svg +0 -47
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager.svg +0 -99
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/nav.adoc +0 -29
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/access-control.adoc +0 -288
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/account-abstraction.adoc +0 -100
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/accounts.adoc +0 -354
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/backwards-compatibility.adoc +0 -50
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/eoa-delegation.adoc +0 -143
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc1155.adoc +0 -118
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20-supply.adoc +0 -71
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20.adoc +0 -67
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc4626.adoc +0 -214
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc6909.adoc +0 -47
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc721.adoc +0 -58
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/extending-contracts.adoc +0 -51
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/faq.adoc +0 -13
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/governance.adoc +0 -239
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/index.adoc +0 -70
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/multisig.adoc +0 -306
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/tokens.adoc +0 -31
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/upgradeable.adoc +0 -77
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/utilities.adoc +0 -591
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/pages/wizard.adoc +0 -15
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/contract.hbs +0 -141
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/helpers.js +0 -46
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/page.hbs +0 -4
- package/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/properties.js +0 -88
- package/lib/openzeppelin-contracts-upgradeable.git/docs/antora.yml +0 -6
- package/lib/openzeppelin-contracts-upgradeable.git/docs/config.js +0 -21
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/nav.adoc +0 -23
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/access-control.adoc +0 -217
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/crosschain.adoc +0 -210
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/crowdsales.adoc +0 -11
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/drafts.adoc +0 -19
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc1155.adoc +0 -153
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc20-supply.adoc +0 -113
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc20.adoc +0 -85
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc721.adoc +0 -90
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/erc777.adoc +0 -73
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/extending-contracts.adoc +0 -129
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/governance.adoc +0 -321
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/index.adoc +0 -63
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/releases-stability.adoc +0 -85
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/tokens.adoc +0 -32
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/upgradeable.adoc +0 -73
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/utilities.adoc +0 -190
- package/lib/openzeppelin-contracts-upgradeable.git/docs/modules/ROOT/pages/wizard.adoc +0 -15
- package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/contract.hbs +0 -85
- package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/helpers.js +0 -46
- package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/page.hbs +0 -4
- package/lib/openzeppelin-contracts-upgradeable.git/docs/templates/properties.js +0 -49
- package/lib/openzeppelin-contracts.git/docs/antora.yml +0 -6
- package/lib/openzeppelin-contracts.git/docs/config.js +0 -21
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/nav.adoc +0 -23
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/access-control.adoc +0 -217
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/crosschain.adoc +0 -210
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/crowdsales.adoc +0 -11
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/drafts.adoc +0 -19
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc1155.adoc +0 -153
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc20-supply.adoc +0 -113
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc20.adoc +0 -85
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc721.adoc +0 -90
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/erc777.adoc +0 -73
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/extending-contracts.adoc +0 -129
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/governance.adoc +0 -321
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/index.adoc +0 -63
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/releases-stability.adoc +0 -85
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/tokens.adoc +0 -32
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/upgradeable.adoc +0 -73
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/utilities.adoc +0 -190
- package/lib/openzeppelin-contracts.git/docs/modules/ROOT/pages/wizard.adoc +0 -15
- package/lib/openzeppelin-contracts.git/docs/templates/contract.hbs +0 -85
- package/lib/openzeppelin-contracts.git/docs/templates/helpers.js +0 -46
- package/lib/openzeppelin-contracts.git/docs/templates/page.hbs +0 -4
- package/lib/openzeppelin-contracts.git/docs/templates/properties.js +0 -49
- package/lib/reality-eth-monorepo/packages/docs/Audit_Reality_v3_202108.pdf +0 -0
- package/lib/reality-eth-monorepo/packages/docs/Makefile +0 -20
- package/lib/reality-eth-monorepo/packages/docs/arbitrators.rst +0 -85
- package/lib/reality-eth-monorepo/packages/docs/audit.rst +0 -12
- package/lib/reality-eth-monorepo/packages/docs/audit_v2.rst +0 -249
- package/lib/reality-eth-monorepo/packages/docs/audit_v2_ERC20.rst +0 -1075
- package/lib/reality-eth-monorepo/packages/docs/audit_v3.rst +0 -70
- package/lib/reality-eth-monorepo/packages/docs/conf.py +0 -155
- package/lib/reality-eth-monorepo/packages/docs/contract_explanation.rst +0 -82
- package/lib/reality-eth-monorepo/packages/docs/contracts.rst +0 -277
- package/lib/reality-eth-monorepo/packages/docs/dapp.rst +0 -126
- package/lib/reality-eth-monorepo/packages/docs/dapp_links.rst +0 -67
- package/lib/reality-eth-monorepo/packages/docs/fees.rst +0 -89
- package/lib/reality-eth-monorepo/packages/docs/index.rst +0 -26
- package/lib/reality-eth-monorepo/packages/docs/javascript.rst +0 -142
- package/lib/reality-eth-monorepo/packages/docs/make.bat +0 -36
- package/lib/reality-eth-monorepo/packages/docs/question_box.png +0 -0
- package/lib/reality-eth-monorepo/packages/docs/requirements.txt +0 -24
- package/lib/reality-eth-monorepo/packages/docs/whitepaper.rst +0 -165
- package/script/AddAdminToLand.s.sol +0 -29
- package/script/ClaimMerkleRoot.s.sol +0 -34
- package/script/CreateLand.s.sol +0 -28
- package/script/CreateMarkets.s.sol +0 -71
- package/script/DeployContracts.s.sol +0 -94
- package/script/DeployMerkleRewardsDistributor.s.sol +0 -27
- package/script/DeployToken.s.sol +0 -17
- package/script/DeployUSDT.s.sol +0 -24
- package/script/MintTokens.s.sol +0 -21
- package/script/PublishMerkleRoot.s.sol +0 -50
- package/script/ResolveMarket.s.sol +0 -23
- package/script/TradeMarket.s.sol +0 -28
- package/test/UpdateTest.t.sol +0 -55
- package/test/WhaleTest.t.sol +0 -188
- 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
|
-
|