logos-messaging-rlnv2-contract/script/DeployTokenWithProxy.s.sol
Tanya S 71191ce151
chore: Add mint function that requires ETH to burn (#33)
* remove ownable to clear compiler error

* Add mintWithEth function to TST to burn Eth

* Update test/README.md with mintWithETH usage

* remove unnecessary 'revert ETHTransferFailed' in mintWithETH

* Move emit functions to top of TestStabletoken.t.sol script

* Add max token supply mechanism for TST

* Linting fix

* Update max eth used in WakuRlnv2 test

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Use 1 to 1 eth burn per token ratio

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-11 10:45:43 +02:00

24 lines
819 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.19 <0.9.0;
import { BaseScript } from "./Base.s.sol";
import { TestStableToken } from "../test/TestStableToken.sol";
import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
contract DeployTokenWithProxy is BaseScript {
function run() public broadcast returns (address) {
return address(deploy());
}
function deploy() public returns (ERC1967Proxy) {
// Deploy the initial implementation
address implementation = address(new TestStableToken());
// Encode the initialize call
bytes memory data = abi.encodeCall(TestStableToken.initialize, (1_000_000 * 10 ** 18));
// Deploy the proxy with initialization data
return new ERC1967Proxy(implementation, data);
}
}