README and comments updates

This commit is contained in:
stubbsta 2025-09-17 13:42:37 +02:00
parent a6bee099a2
commit 3b409b4338
No known key found for this signature in database
2 changed files with 4 additions and 6 deletions

View File

@ -21,7 +21,8 @@ token distribution while mimicking DAI's behaviour.
## Usage
Add environment variable `MAX_SUPPLY` to set the maximum supply of the token, otherwise it defaults to 10 million tokens.
Add environment variable `MAX_SUPPLY` to set the maximum supply of the token, otherwise it defaults to 10 million
tokens.
### Deploy new TestStableToken with proxy contract

View File

@ -103,15 +103,12 @@ contract TestStableTokenFactory is BaseScript {
// Deploy the implementation
address implementation = address(new TestStableToken());
// Encode initializer calldata to run in proxy context (maxSupply)
bytes memory initData = abi.encodeCall(TestStableToken.initialize, (defaultMaxSupply));
// Encode initializer calldata to run in proxy context (maxSupply)
bytes memory initData = abi.encodeCall(TestStableToken.initialize, (defaultMaxSupply));
// Deploy ERC1967Proxy with initialization data so storage (owner, maxSupply) is set atomically
ERC1967Proxy proxy = new ERC1967Proxy(implementation, initData);
// // Only check maxSupply was initialized; owner checks are optional for basic deployments
// address proxyAddr = address(proxy);
return address(proxy);
}
}