diff --git a/smart-contract.sol b/smart-contract.sol new file mode 100644 index 0000000..088640f --- /dev/null +++ b/smart-contract.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +contract WorkRoll { + + struct Agreement { + address client; + address freelancer; + uint amount; + uint[] milestones; + } + + Agreement public newAgreement; + + + constructor( + address _client, + address _freelancer, + uint _amount, + uint[] memory _milestones + ) { + newAgreement.client = _client; + newAgreement.freelancer = _freelancer; + newAgreement.amount = _amount; + + + for (uint i = 0; i < _milestones.length; i++) { + newAgreement.milestones.push(_milestones[i]); + } + } + + + + function checkPay(uint _globalAmount, uint[] memory _globalSplit) public pure returns(bool) { + uint splitPay = 0; + + for (uint i = 0; i < _globalSplit.length ; i++) + { + splitPay = splitPay + _globalSplit[i]; + } + + if(_globalAmount == splitPay){ + return true; + } + else{ + return false; + } + } +} \ No newline at end of file diff --git a/src/components/laptop.tsx b/src/components/laptop.tsx index 9377b90..9d8ced7 100644 --- a/src/components/laptop.tsx +++ b/src/components/laptop.tsx @@ -1,13 +1,13 @@ import React from 'react' import Image from 'next/image' -import Laptop from '../images/laptop.svg' +import Home2 from '../images/home2.jpeg' export default function laptop() { return (
- Dextr Hero Image + Dextr Hero Image

Smartest way to exchange value!