@reality.eth/contracts 3.0.46 → 3.0.48
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/.prettierrc +16 -0
- package/abi/solc-0.8.20/RealityETH-4.0.abi.json +1 -0
- package/abi/solc-0.8.20/RealityETH_ERC20-4.0.abi.json +1 -0
- package/bytecode/Arbitrator.bin +1 -1
- package/bytecode/RealityETH-3.0.bin +1 -1
- package/bytecode/RealityETH-4.0.bin +1 -0
- package/bytecode/RealityETH_ERC20-3.0.bin +1 -1
- package/bytecode/RealityETH_ERC20-4.0.bin +1 -0
- package/chains/chainid.network.json +5033 -431
- package/chains/deployments/300/ETH/RealityETH-3.0.json +7 -0
- package/chains/supported.json +3 -0
- package/development/contracts/.solhint.json +9 -0
- package/development/contracts/Arbitrator.sol +32 -56
- package/development/contracts/BalanceHolder.sol +4 -10
- package/development/contracts/BalanceHolder_ERC20.sol +5 -11
- package/development/contracts/CallbackClient.sol +3 -10
- package/development/contracts/ERC20Token.sol +29 -30
- package/development/contracts/ExplodingCallbackClient.sol +1 -4
- package/development/contracts/IArbitrator.sol +10 -7
- package/development/contracts/IArbitratorCore.sol +7 -14
- package/development/contracts/IArbitratorCrowdFundable.sol +3 -2
- package/development/contracts/IArbitratorErrors.sol +10 -0
- package/development/contracts/IArbitratorForeignProxy.sol +1 -1
- package/development/contracts/IArbitratorLegacy.sol +3 -3
- package/development/contracts/IArbitratorManagement.sol +15 -27
- package/development/contracts/IBalanceHolder.sol +3 -3
- package/development/contracts/IBalanceHolder_ERC20.sol +5 -5
- package/development/contracts/IERC20.sol +4 -5
- package/development/contracts/IOwned.sol +3 -3
- package/development/contracts/IRealityETH.sol +5 -58
- package/development/contracts/IRealityETHCommitReveal.sol +17 -0
- package/development/contracts/IRealityETHCommitReveal_ERC20.sol +16 -0
- package/development/contracts/IRealityETHCore.sol +135 -0
- package/development/contracts/IRealityETHCore_ERC20.sol +149 -0
- package/development/contracts/IRealityETHErrors.sol +86 -0
- package/development/contracts/IRealityETHErrors_ERC20.sol +13 -0
- package/development/contracts/IRealityETH_ERC20.sol +5 -62
- package/development/contracts/Owned.sol +4 -6
- package/development/contracts/{RealityETH-3.0.sol → RealityETH-4.0.sol} +221 -383
- package/development/contracts/{RealityETH_ERC20-3.0.sol → RealityETH_ERC20-4.0.sol} +238 -474
- package/development/contracts/RealityETH_ERC20_Factory.sol +47 -42
- package/development/contracts/RegisteredWalletArbitrator.sol +8 -15
- package/development/contracts/compile.py +3 -0
- package/development/scripts/string_to_error.py +111 -0
- package/development/version_checksums/check_matches_flat.sh +20 -0
- package/development/version_checksums/check_matches_last.sh +37 -0
- package/development/version_checksums/log_bytecode_history.sh +41 -0
- package/generated/chains.json +33 -5
- package/generated/contracts.json +10 -0
- package/generated/tokens.json +1 -0
- package/non_standard_deployments/zksync/LICENSE +21 -0
- package/non_standard_deployments/zksync/README.md +51 -0
- package/non_standard_deployments/zksync/deploy/deploy.ts +11 -0
- package/non_standard_deployments/zksync/deploy/utils.ts +168 -0
- package/non_standard_deployments/zksync/hardhat.config.ts +55 -0
- package/non_standard_deployments/zksync/package-lock.json +6295 -0
- package/non_standard_deployments/zksync/package.json +34 -0
- package/package.json +7 -3
- package/scripts/transfer_arbitrator.js +60 -0
- package/tests/python/requirements.txt +55 -54
- package/tests/python/test.py +150 -50
- package/tests/python/test_erc20.py +15 -14
- package/tokens/ETH.json +3 -2
- package/non_standard_deployments/zksync2/README +0 -21
- package/non_standard_deployments/zksync2/contracts/RealityETH_ERC20-3.0.sol +0 -1096
- package/non_standard_deployments/zksync2/deploy/deploy.ts +0 -62
- package/non_standard_deployments/zksync2/deploy/deploy_erc20.ts +0 -56
- package/non_standard_deployments/zksync2/deploy/deploy_mainnet.ts +0 -46
- package/non_standard_deployments/zksync2/hardhat.config.ts +0 -27
- package/non_standard_deployments/zksync2/package.json +0 -15
- package/non_standard_deployments/zksync2/yarn.lock +0 -2898
- /package/non_standard_deployments/{zksync2 → zksync}/contracts/RealityETH-3.0.sol +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Set the token address, it shouldn't be 0x000000000000000000000000000000000000800A
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { utils, Wallet } from "zksync-web3";
|
|
6
|
-
import * as ethers from "ethers";
|
|
7
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
8
|
-
import { Deployer } from "@matterlabs/hardhat-zksync-deploy";
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
|
|
11
|
-
// An example of a deploy script that will deploy and call a simple contract.
|
|
12
|
-
export default async function (hre: HardhatRuntimeEnvironment) {
|
|
13
|
-
console.log(`Running deploy script for the reality.eth contract`);
|
|
14
|
-
|
|
15
|
-
const key_file = '/home/ed/secrets/zksync_goerli.sec';
|
|
16
|
-
const priv = fs.readFileSync(key_file, 'utf8').replace(/\n$/, "");
|
|
17
|
-
|
|
18
|
-
// Initialize the wallet.
|
|
19
|
-
const wallet = new Wallet(priv);
|
|
20
|
-
console.log('gas to pay from address', wallet.address);
|
|
21
|
-
|
|
22
|
-
// Create deployer object and load the artifact of the contract we want to deploy.
|
|
23
|
-
const deployer = new Deployer(hre, wallet);
|
|
24
|
-
const artifact = await deployer.loadArtifact("RealityETH_zksync_v3_0");
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
// Deposit some funds to L2 in order to be able to perform L2 transactions.
|
|
28
|
-
const depositAmount = ethers.utils.parseEther("0.5");
|
|
29
|
-
const depositHandle = await deployer.zkWallet.deposit({
|
|
30
|
-
to: deployer.zkWallet.address,
|
|
31
|
-
token: utils.ETH_ADDRESS,
|
|
32
|
-
amount: depositAmount,
|
|
33
|
-
});
|
|
34
|
-
// Wait until the deposit is processed on zkSync
|
|
35
|
-
await depositHandle.wait();
|
|
36
|
-
|
|
37
|
-
console.log('deposit done');
|
|
38
|
-
return;
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
// Deploy this contract. The returned object will be of a `Contract` type, similarly to ones in `ethers`.
|
|
42
|
-
const realityContract = await deployer.deploy(artifact, []);
|
|
43
|
-
|
|
44
|
-
// Show the contract info.
|
|
45
|
-
const contractAddress = realityContract.address;
|
|
46
|
-
console.log(`${artifact.contractName} was deployed to ${contractAddress}`);
|
|
47
|
-
|
|
48
|
-
/*
|
|
49
|
-
// Edit the greeting of the contract
|
|
50
|
-
const token = "0x000000000000000000000000000000000000800A"
|
|
51
|
-
const setTokenHandle = await realityContract.setToken(token);
|
|
52
|
-
await setTokenHandle.wait();
|
|
53
|
-
|
|
54
|
-
const tokenFromContract = await realityContract.token();
|
|
55
|
-
if (tokenFromContract == token) {
|
|
56
|
-
console.log(`Contract greets us with ${token}!`);
|
|
57
|
-
} else {
|
|
58
|
-
console.error(`Contract said something unexpected: ${tokenFromContract}`);
|
|
59
|
-
}
|
|
60
|
-
*/
|
|
61
|
-
}
|
|
62
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Set the token address, it shouldn't be 0x000000000000000000000000000000000000800A
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { utils, Wallet } from "zksync-web3";
|
|
6
|
-
import * as ethers from "ethers";
|
|
7
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
8
|
-
import { Deployer } from "@matterlabs/hardhat-zksync-deploy";
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
|
|
11
|
-
// An example of a deploy script that will deploy and call a simple contract.
|
|
12
|
-
export default async function (hre: HardhatRuntimeEnvironment) {
|
|
13
|
-
console.log(`Running deploy script for the reality.eth contract`);
|
|
14
|
-
|
|
15
|
-
const key_file = '/home/ed/secrets/zksync_goerli.sec';
|
|
16
|
-
const priv = fs.readFileSync(key_file, 'utf8').replace(/\n$/, "");
|
|
17
|
-
|
|
18
|
-
// Initialize the wallet.
|
|
19
|
-
const wallet = new Wallet(priv);
|
|
20
|
-
|
|
21
|
-
// Create deployer object and load the artifact of the contract we want to deploy.
|
|
22
|
-
const deployer = new Deployer(hre, wallet);
|
|
23
|
-
const artifact = await deployer.loadArtifact("RealityETH_ERC20_v3_0");
|
|
24
|
-
|
|
25
|
-
/*
|
|
26
|
-
// Deposit some funds to L2 in order to be able to perform L2 transactions.
|
|
27
|
-
const depositAmount = ethers.utils.parseEther("0.00001");
|
|
28
|
-
const depositHandle = await deployer.zkWallet.deposit({
|
|
29
|
-
to: deployer.zkWallet.address,
|
|
30
|
-
token: utils.ETH_ADDRESS,
|
|
31
|
-
amount: depositAmount,
|
|
32
|
-
});
|
|
33
|
-
// Wait until the deposit is processed on zkSync
|
|
34
|
-
await depositHandle.wait();
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
// Deploy this contract. The returned object will be of a `Contract` type, similarly to ones in `ethers`.
|
|
38
|
-
const realityContract = await deployer.deploy(artifact, []);
|
|
39
|
-
|
|
40
|
-
// Show the contract info.
|
|
41
|
-
const contractAddress = realityContract.address;
|
|
42
|
-
console.log(`${artifact.contractName} was deployed to ${contractAddress}`);
|
|
43
|
-
|
|
44
|
-
// Edit the greeting of the contract
|
|
45
|
-
const token = "0x000000000000000000000000000000000000800A"
|
|
46
|
-
const setTokenHandle = await realityContract.setToken(token);
|
|
47
|
-
await setTokenHandle.wait();
|
|
48
|
-
|
|
49
|
-
const tokenFromContract = await realityContract.token();
|
|
50
|
-
if (tokenFromContract == token) {
|
|
51
|
-
console.log(`Contract greets us with ${token}!`);
|
|
52
|
-
} else {
|
|
53
|
-
console.error(`Contract said something unexpected: ${tokenFromContract}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Wallet, utils } from "zksync-web3";
|
|
2
|
-
import * as ethers from "ethers";
|
|
3
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
4
|
-
import { Deployer } from "@matterlabs/hardhat-zksync-deploy";
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
|
|
7
|
-
const key_file = '/home/ed/secrets/zksync_mainnet.sec';
|
|
8
|
-
const PRIVATE_KEY = fs.readFileSync(key_file, 'utf8').replace(/\n$/, "");
|
|
9
|
-
|
|
10
|
-
// An example of a deploy script that will deploy and call a simple contract.
|
|
11
|
-
export default async function (hre: HardhatRuntimeEnvironment) {
|
|
12
|
-
console.log(`Running deploy script for the reality.eth contract`);
|
|
13
|
-
|
|
14
|
-
// Initialize the wallet.
|
|
15
|
-
const wallet = new Wallet(PRIVATE_KEY);
|
|
16
|
-
|
|
17
|
-
// Create deployer object and load the artifact of the contract you want to deploy.
|
|
18
|
-
const deployer = new Deployer(hre, wallet);
|
|
19
|
-
const artifact = await deployer.loadArtifact("RealityETH_zksync_v3_0");
|
|
20
|
-
|
|
21
|
-
// Estimate contract deployment fee
|
|
22
|
-
const deploymentFee = await deployer.estimateDeployFee(artifact, []);
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
// OPTIONAL: Deposit funds to L2
|
|
26
|
-
// Comment this block if you already have funds on zkSync.
|
|
27
|
-
const depositHandle = await deployer.zkWallet.deposit({
|
|
28
|
-
to: deployer.zkWallet.address,
|
|
29
|
-
token: utils.ETH_ADDRESS,
|
|
30
|
-
amount: deploymentFee.mul(2),
|
|
31
|
-
});
|
|
32
|
-
// Wait until the deposit is processed on zkSync
|
|
33
|
-
await depositHandle.wait();
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
// Deploy this contract. The returned object will be of a `Contract` type, similarly to ones in `ethers`.
|
|
37
|
-
// `greeting` is an argument for contract constructor.
|
|
38
|
-
const parsedFee = ethers.utils.formatEther(deploymentFee.toString());
|
|
39
|
-
console.log(`The deployment is estimated to cost ${parsedFee} ETH`);
|
|
40
|
-
|
|
41
|
-
const realityContract = await deployer.deploy(artifact, []);
|
|
42
|
-
|
|
43
|
-
// Show the contract info.
|
|
44
|
-
const contractAddress = realityContract.address;
|
|
45
|
-
console.log(`${artifact.contractName} was deployed to ${contractAddress}`);
|
|
46
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import "@matterlabs/hardhat-zksync-deploy";
|
|
2
|
-
import "@matterlabs/hardhat-zksync-solc";
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
zksolc: {
|
|
6
|
-
version: "1.3.5",
|
|
7
|
-
compilerSource: "binary",
|
|
8
|
-
settings: {},
|
|
9
|
-
},
|
|
10
|
-
defaultNetwork: "zkSyncTestnet",
|
|
11
|
-
|
|
12
|
-
networks: {
|
|
13
|
-
zkSyncTestnet: {
|
|
14
|
-
url: "https://zksync2-testnet.zksync.dev",
|
|
15
|
-
ethNetwork: "goerli", // Can also be the RPC URL of the network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
|
|
16
|
-
zksync: true,
|
|
17
|
-
},
|
|
18
|
-
zkSyncMainnet: {
|
|
19
|
-
url: "https://zksync2-mainnet.zksync.io",
|
|
20
|
-
ethNetwork: "mainnet",
|
|
21
|
-
zksync: true,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
solidity: {
|
|
25
|
-
version: "0.8.17",
|
|
26
|
-
},
|
|
27
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "zksync2",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"main": "index.js",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"devDependencies": {
|
|
7
|
-
"@matterlabs/hardhat-zksync-deploy": "^0.6.2",
|
|
8
|
-
"@matterlabs/hardhat-zksync-solc": "^0.3.14",
|
|
9
|
-
"ethers": "5",
|
|
10
|
-
"hardhat": "^2.13.0",
|
|
11
|
-
"ts-node": "^10.9.1",
|
|
12
|
-
"typescript": "^4.9.5",
|
|
13
|
-
"zksync-web3": "^0.14.3"
|
|
14
|
-
}
|
|
15
|
-
}
|