mirror of
https://github.com/logos-messaging/logos-messaging-rlnv2-contract.git
synced 2026-01-02 14:03:07 +00:00
* Add proxy contract for TST * Fix token proxy update function to use provided new TST address * Transfer token proxy contract ownership to deployer * Add Token Proxy Contract Owner as init input * Add UUPSUPgradeable to TST * Formatting * fix import format * Add README to explain TST usage * Linting fix * Check TST test transfer return val * Add descriptions in README for TST usage * Fix linting * Use TST token deployer in test conrtact, update test README * USe assertTrue in TST test
24 lines
799 B
Solidity
24 lines
799 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, ());
|
|
|
|
// Deploy the proxy with initialization data
|
|
return new ERC1967Proxy(implementation, data);
|
|
}
|
|
}
|