-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.js
57 lines (48 loc) · 1.87 KB
/
deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const {ethers} = require("hardhat");
async function main() {
const forwarderAddress = process.env.FORWARDER_ADDRESS || '0x985999389f85E5eA4425ac7379b1F7D56e694785'
const [deployer] = await ethers.getSigners();
console.log('Deploying contracts with the account: ' + deployer.address);
const Prices = await ethers.getContractFactory('Prices');
const prices = await Prices.deploy();
console.log("Prices: ", prices.target);
const Predictions = await ethers.getContractFactory('Predictions');
const predictions = await Predictions.deploy(
'Predictions',
'SAP',
'https://doc.sanr-api.santiment.net',
prices.target,
forwarderAddress
);
console.log("Predictions: ", predictions.target);
const ERC20ForCompetitions = await ethers.getContractFactory('ERC20ForCompetitions');
const erc20ForCompetitions = await ERC20ForCompetitions.deploy(
'ERC20 Competition Reward',
'TCR',
forwarderAddress
);
console.log("ERC20ForCompetitions: ", erc20ForCompetitions.target);
const Competitions = await ethers.getContractFactory('Rewarding');
const competitions = await Competitions.deploy(
erc20ForCompetitions.target,
predictions.target,
);
console.log("Competitions: ", competitions.target);
const Signals = await ethers.getContractFactory('Signals');
const signals = await Signals.deploy(
'Signals',
'SAP',
'https://doc.sanr-api.santiment.net',
forwarderAddress
);
console.log("Signals: ", signals.target);
const Subscriptions = await ethers.getContractFactory('SanrSharesV1');
const subscriptions = await Subscriptions.deploy();
console.log("Subscriptions: ", subscriptions.target);
}
main()
.then(() => process.exit())
.catch(error => {
console.error(error);
process.exit(1);
})