diff --git a/abi/contracts/SimpleEmployment.sol/SimpleEmployment.json b/abi/contracts/SimpleEmployment.sol/SimpleEmployment.json index cbe2f52..724b95c 100644 --- a/abi/contracts/SimpleEmployment.sol/SimpleEmployment.json +++ b/abi/contracts/SimpleEmployment.sol/SimpleEmployment.json @@ -49,6 +49,25 @@ "name": "LogPaymentMade", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "LogPaymentWithdrawn", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -109,6 +128,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "availableToWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -335,9 +367,9 @@ "type": "uint128" }, { - "internalType": "uint128", + "internalType": "uint120", "name": "timeStamp", - "type": "uint128" + "type": "uint120" } ], "stateMutability": "view", @@ -525,5 +557,18 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "withdrawPayment", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ] diff --git a/contracts/SimpleEmployment.sol b/contracts/SimpleEmployment.sol index 7543a7f..47539dc 100644 --- a/contracts/SimpleEmployment.sol +++ b/contracts/SimpleEmployment.sol @@ -341,12 +341,13 @@ contract SimpleEmployment { function contractDataHash(uint256 signingDate_) public view returns (bytes32){ return keccak256(abi.encodePacked( "ChainPact - I hereby sign the following ", - pactData.employee, - pactData.employer, - pactData.payScheduleDays, - pactData.payAmount, - signingDate_, - address(this))); + "For this pact named ", pactData.pactName, + "Employee ", pactData.employee, + "Employer ", pactData.employer, + "Pay Schedule in days ", pactData.payScheduleDays, + "payAmount in native ", pactData.payAmount, + "Signing DateTime ", signingDate_, + "Address of this contract ", address(this))); } function recoverContractSigner(bytes memory signature, uint256 signingDate_) public view returns (address){