From e1eeac703ee902e84df22f46186cbac2844da479 Mon Sep 17 00:00:00 2001 From: weiqiushi Date: Fri, 29 Dec 2023 19:03:26 +0800 Subject: [PATCH] Reduce ShowData log param --- contracts/public_data_storage.sol | 4 ++-- scripts/deploy.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/public_data_storage.sol b/contracts/public_data_storage.sol index 44c783c..3683778 100644 --- a/contracts/public_data_storage.sol +++ b/contracts/public_data_storage.sol @@ -111,7 +111,7 @@ contract PublicDataStorage { event SponsorChanged(bytes32 mixedHash, address oldSponsor, address newSponsor); event SupplierReward(address supplier, bytes32 mixedHash, uint256 amount); event SupplierPubished(address supplier, bytes32 mixedHash, uint256 amount); - event ShowDataProof(address supplier, bytes32 dataMixedHash, uint256 nonce_block_high, uint32 index_m, bytes32 proof_result); + event ShowDataProof(address supplier, bytes32 dataMixedHash); event WithdrawAward(bytes32 mixedHash, address user, uint256 amount); constructor(address _gwtToken, address _Foundation) { @@ -404,7 +404,7 @@ contract PublicDataStorage { } } - emit ShowDataProof(msg.sender, dataMixedHash, nonce_block, index, publicDataInfo.proof_result); + emit ShowDataProof(msg.sender, dataMixedHash); CycleInfo storage cycleInfo = cycle_infos[_cycleNumber()]; CycleDataInfo storage dataInfo = cycleInfo.data_infos[dataMixedHash]; diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 9ed7080..842cd9a 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -13,8 +13,9 @@ async function main() { let listLibrary = await (await ethers.getContractFactory("SortedScoreList")).deploy(); let proofLibrary = await (await ethers.getContractFactory("PublicDataProof")).deploy(); + let foundationAddress = (await ethers.getSigners())[19].address; - const publicDataStorage = await (await ethers.deployContract("PublicDataStorage", [gwtAddress], {libraries: { + const publicDataStorage = await (await ethers.deployContract("PublicDataStorage", [gwtAddress, foundationAddress], {libraries: { "SortedScoreList": await listLibrary.getAddress(), "PublicDataProof": await proofLibrary.getAddress() }})).waitForDeployment();