Skip to content

Commit 3df6d97

Browse files
Filip-LSzooot
andauthored
[FIL-1353] Client Contract adjustments and clenup (#21)
* FIL-1353 Client Contract adjustments and clenup * completed deal check --------- Co-authored-by: Szooot <michalos277@gmail.com>
1 parent 9b4f2dd commit 3df6d97

File tree

13 files changed

+160
-211
lines changed

13 files changed

+160
-211
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ PRIVATE_KEY_MAINNET=<your_private_key>
1010

1111
FILECOIN_PAY=<filecoin_pay_address>
1212
ALLOCATOR=<llocator_address>
13+
SP_REGISTRY=<sp_registry_address>
1314
TERMINATION_ORACLE=<termination_oracle_address>
1415
ORACLE=<oracle_address>
1516
META_ALLOCATOR=<metaallocator_address>

abis/Client.json

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44
"inputs": [],
55
"stateMutability": "nonpayable"
66
},
7-
{
8-
"type": "function",
9-
"name": "ALLOCATOR_ROLE",
10-
"inputs": [],
11-
"outputs": [
12-
{
13-
"name": "",
14-
"type": "bytes32",
15-
"internalType": "bytes32"
16-
}
17-
],
18-
"stateMutability": "view"
19-
},
207
{
218
"type": "function",
229
"name": "DEFAULT_ADMIN_ROLE",
@@ -210,11 +197,6 @@
210197
"type": "address",
211198
"internalType": "address"
212199
},
213-
{
214-
"name": "allocator",
215-
"type": "address",
216-
"internalType": "address"
217-
},
218200
{
219201
"name": "terminationOracle",
220202
"type": "address",
@@ -537,25 +519,6 @@
537519
],
538520
"anonymous": false
539521
},
540-
{
541-
"type": "event",
542-
"name": "ValidatorLockupPeriodUpdated",
543-
"inputs": [
544-
{
545-
"name": "dealId",
546-
"type": "uint256",
547-
"indexed": true,
548-
"internalType": "uint256"
549-
},
550-
{
551-
"name": "validator",
552-
"type": "address",
553-
"indexed": true,
554-
"internalType": "address"
555-
}
556-
],
557-
"anonymous": false
558-
},
559522
{
560523
"type": "error",
561524
"name": "AccessControlBadConfirmation",
@@ -634,11 +597,6 @@
634597
"name": "InvalidAllocationRequest",
635598
"inputs": []
636599
},
637-
{
638-
"type": "error",
639-
"name": "InvalidAllocatorAddress",
640-
"inputs": []
641-
},
642600
{
643601
"type": "error",
644602
"name": "InvalidCaller",

abis/PoRepMarket.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
"name": "dealId",
7878
"type": "uint256",
7979
"internalType": "uint256"
80+
},
81+
{
82+
"name": "actualSizeBytes",
83+
"type": "uint256",
84+
"internalType": "uint256"
8085
}
8186
],
8287
"outputs": [],
@@ -689,6 +694,12 @@
689694
"indexed": true,
690695
"internalType": "address"
691696
},
697+
{
698+
"name": "actualSizeBytes",
699+
"type": "uint256",
700+
"indexed": false,
701+
"internalType": "uint256"
702+
},
692703
{
693704
"name": "provider",
694705
"type": "uint64",

script/Deploy.s.sol

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ contract Deploy is Script, DeployUtils {
3636
address internal spRegistry;
3737
address internal filecoinPay;
3838
address internal admin;
39-
address internal allocator;
4039
address internal terminationOracle;
4140
address internal oracleAddress;
4241
address internal poRepService;
@@ -47,7 +46,6 @@ contract Deploy is Script, DeployUtils {
4746

4847
function run() external {
4948
admin = vm.addr(vm.envUint("PRIVATE_KEY_TEST"));
50-
allocator = vm.envAddress("ALLOCATOR");
5149
terminationOracle = vm.envAddress("TERMINATION_ORACLE");
5250
filecoinPay = vm.envAddress("FILECOIN_PAY");
5351
oracleAddress = vm.envAddress("ORACLE");
@@ -60,7 +58,7 @@ contract Deploy is Script, DeployUtils {
6058
(validatorFactory, validatorFactoryImpl, validatorImpl) = _deployValidatorFactory(admin);
6159
(poRepMarket, poRepMarketImpl) = _deployPoRepMarket(admin, validatorFactory, spRegistry);
6260
(clientSmartContract, clientSmartContractImpl) =
63-
_deployClientSmartContract(admin, allocator, terminationOracle, poRepMarket, metaAllocator);
61+
_deployClientSmartContract(admin, terminationOracle, poRepMarket, metaAllocator);
6462
(sliOracle, sliOracleImpl) = _deploySLIOracle(admin, oracleAddress);
6563
(sliScorer, sliScorerImpl) = _deploySliScorer(admin, sliOracle);
6664
(spRegistry, spRegistryImpl) = _deploySPRegistry(admin);
@@ -109,14 +107,13 @@ contract Deploy is Script, DeployUtils {
109107

110108
function _deployClientSmartContract(
111109
address _admin,
112-
address _allocator,
113110
address _terminationOracle,
114111
address _porepMarket,
115112
address _metaAllocator
116113
) internal returns (address proxy, address impl) {
117114
Client _impl = new Client();
118115
bytes memory init =
119-
abi.encodeCall(Client.initialize, (_admin, _allocator, _terminationOracle, _porepMarket, _metaAllocator));
116+
abi.encodeCall(Client.initialize, (_admin, _terminationOracle, _porepMarket, _metaAllocator));
120117
proxy = createProxy(init, address(_impl));
121118
impl = address(_impl);
122119
}
@@ -160,9 +157,9 @@ contract Deploy is Script, DeployUtils {
160157
json.serialize("ValidatorBeacon", validatorBeacon);
161158
json.serialize("ValidatorImpl", validatorImpl);
162159
json.serialize("FilecoinPay", filecoinPay);
163-
json.serialize("Allocator", allocator);
164160
json.serialize("PoRepService", poRepService);
165161
json.serialize("MetaAllocator", metaAllocator);
162+
json.serialize("SPRegistry", spRegistry);
166163
string memory output = json.serialize("TerminationOracle", terminationOracle);
167164

168165
save(output);

0 commit comments

Comments
 (0)