基于BodingCurve价格发现的代币

基于BondingCurve价格发现的代币

相关链接

关于抢跑问题

  • 通过设置一个最大的gas price,可以避免抢跑问题
1
2
3
4
5
6
7
8
9
10
11
12
13

contract CappedGasPrice is Ownable {
uint256 public maxGasPrice = 1 * 10**18; // Adjustable value

modifier validGasPrice() {
require(tx.gasprice <= maxGasPrice, "Transaction gas price cannot exceed maximum gas price.");
_;
}

function setMaxGasPrice(uint256 gasPrice) public onlyOwner {
maxGasPrice = gasPrice;
}
}
  • Copyrights © 2021-2024 youngqqcn

请我喝杯咖啡吧~