Skip to content

Commit

Permalink
Added Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkc2303 committed Dec 10, 2023
1 parent bea8186 commit 4cc0b26
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
49 changes: 49 additions & 0 deletions smart-contract.sol
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
4 changes: 2 additions & 2 deletions src/components/laptop.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className='flex py-12 xl:py-28 px-3 xl:px-20 max-h-fit iframe-cover flex-col xl:flex-row gap-8'>
<div className='xl:basis-2/3 h-full iframe-cover'>
<Image src={Laptop} alt="Dextr Hero Image" objectFit='contain' />
<Image src={Home2} alt="Dextr Hero Image" objectFit='contain' width={500} />
</div>
<div className='flex justify-evenly flex-col xl:basis-1/3'>
<h1 className='font-primary font-bold text-3xl xl:text-6xl text-center xl:text-right'>Smartest way to exchange value!</h1>
Expand Down

0 comments on commit 4cc0b26

Please sign in to comment.