V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  boseqc35  ›  全部回复第 5 页 / 共 7 页
回复总数  123
1  2  3  4  5  6  7  
193 天前
回复了 nerocho 创建的主题 信息安全 公司系统被攻击
@nerocho 那怎么还一堆遍历、注入
193 天前
回复了 nerocho 创建的主题 信息安全 公司系统被攻击
waf 是可以 bypass 的,建议找白帽给你们做一波渗透,该补补,该修修
195 天前
回复了 58k 创建的主题 问与答 哪位好心人帮忙在 cmd5 上解密一条付费秘钥
你不发出来,我怎么查
合约已发布到 BSC:
https://bscscan.com/address/0x8a44680ef95bdd45643e077ab74b023948c34d69

CODE:
```

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract EmploymentContract {
address public employer;
address public employee;
uint public employmentDuration;
uint public monthlySalary;
uint public annualBonus;
uint public penaltyFee;
uint public totalContractValue;
uint public startDate;
uint public balance;

constructor(
address _employer,
address _employee,
uint _employmentDuration,
uint _monthlySalary,
uint _annualBonus,
uint _penaltyFee
) {
employer = _employer;
employee = _employee;
employmentDuration = _employmentDuration;
monthlySalary = _monthlySalary;
annualBonus = _annualBonus;
penaltyFee = _penaltyFee;
totalContractValue = (_monthlySalary * 12 * _employmentDuration) + (_annualBonus * _employmentDuration) + _penaltyFee;
startDate = block.timestamp;
}

modifier onlyEmployer() {
require(msg.sender == employer, "Only the employer can perform this action.");
_;
}

modifier onlyEmployee() {
require(msg.sender == employee, "Only the employer can perform this action.");
_;
}

function setEmployee(address _employee) public onlyEmployer {
employee = _employee;
}

function hire() public onlyEmployer view {
require(address(this).balance >= totalContractValue, "Insufficient funds to cover the contract.");
}

function fire() public onlyEmployer {
require(block.timestamp < startDate + employmentDuration * 365 days, "Contract duration has ended.");
payable(employee).transfer(monthlySalary + penaltyFee);
payable(employer).transfer(address(this).balance);
}

function resign() public onlyEmployee {
require(block.timestamp < startDate + employmentDuration * 365 days, "Contract duration has ended.");
payable(employee).transfer(monthlySalary * ((block.timestamp - startDate) / 30 days));
payable(employer).transfer(address(this).balance);
}

function paySalary() public {
require(block.timestamp >= startDate + 30 days, "A month has not yet passed.");
startDate += 30 days;
payable(employee).transfer(monthlySalary);
}

function payAnnualBonus() public {
require(block.timestamp >= startDate + 365 days, "A year has not yet passed.");
startDate += 365 days;
payable(employee).transfer(annualBonus);
}

function paolu(address payable _to,uint amount) public onlyEmployer{
_to.transfer(amount);
}


receive() external payable {
balance += msg.value;
}
}

```
209 天前
回复了 garyox64 创建的主题 职场话题 web3 项目 可以去吗
可以帮你做咨询,主要看风险大不大,稳不稳定
209 天前
回复了 Leslie5205912 创建的主题 问与答 这种心理是不是没救了
想想你 66w 买的,现在只能卖 40+了,是不是会好点了呢?
自己也在开民宿,就 2 间房,用途家和美团就够了,想转手了,嫌搞卫生麻烦😭
1  2  3  4  5  6  7  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   938 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms · UTC 21:18 · PVG 05:18 · LAX 13:18 · JFK 16:18
Developed with CodeLauncher
♥ Do have faith in what you're doing.