diff --git a/foundry.toml b/foundry.toml index 049f0609c..218285c8d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -16,7 +16,7 @@ verbosity = 0 ffi = false libs = ["lib"] fs_permissions = [{ access = "read-write", path = "./script/" }] -remappings = ["solmate/=lib/ERC1155A/lib/solmate/src/"] +remappings = ["solmate/=lib/ERC1155A/lib/solmate/src/","ERC1155A/=lib/ERC1155A/src/"] [profile.localdev] solc_version = "0.8.23" # Override for the solc version (setting this ignores `auto_detect_solc`) @@ -30,7 +30,7 @@ verbosity = 0 ffi = false libs = ["lib"] fs_permissions = [{ access = "read-write", path = "./script/" }] -remappings = ["solmate/=lib/ERC1155A/lib/solmate/src/"] +remappings = ["solmate/=lib/ERC1155A/lib/solmate/src/","ERC1155A/=lib/ERC1155A/src/"] [profile.coverage] fuzz = { runs = 1, max_test_rejects = 350_000 } diff --git a/lib/ERC1155A b/lib/ERC1155A index f46fa5420..05e542175 160000 --- a/lib/ERC1155A +++ b/lib/ERC1155A @@ -1 +1 @@ -Subproject commit f46fa542026b860717d48bd1c09acbb8b68a0b57 +Subproject commit 05e542175bda12d7a7fa723ede554542b424ce8c diff --git a/script/Abstract.Deploy.Single.s.sol b/script/Abstract.Deploy.Single.s.sol index ed946f23d..16d443506 100644 --- a/script/Abstract.Deploy.Single.s.sol +++ b/script/Abstract.Deploy.Single.s.sol @@ -574,7 +574,9 @@ abstract contract AbstractDeploySingle is Script { vars.superPositions = address( new SuperPositions{ salt: salt }( "https://ipfs-gateway.superform.xyz/ipns/k51qzi5uqu5dg90fqdo9j63m556wlddeux4mlgyythp30zousgh3huhyzouyq8/JSON/", - vars.superRegistry + vars.superRegistry, + "SuperPositions", + "SP" ) ); diff --git a/src/SuperPositions.sol b/src/SuperPositions.sol index a6dfe56cc..ce7535e69 100644 --- a/src/SuperPositions.sol +++ b/src/SuperPositions.sol @@ -119,7 +119,14 @@ contract SuperPositions is ISuperPositions, ERC1155A, Broadcastable { /// @param dynamicURI_ URL for external metadata of ERC1155 SuperPositions /// @param superRegistry_ the superform registry contract - constructor(string memory dynamicURI_, address superRegistry_) { + constructor( + string memory dynamicURI_, + address superRegistry_, + string memory name_, + string memory symbol_ + ) + ERC1155A(name_, symbol_) + { if (block.chainid > type(uint64).max) { revert Error.BLOCK_CHAIN_ID_OUT_OF_BOUNDS(); } @@ -369,8 +376,8 @@ contract SuperPositions is ISuperPositions, ERC1155A, Broadcastable { } (address superform,,) = id.getSuperform(); - string memory name = string.concat("SuperPositions AERC20 ", IBaseForm(superform).superformYieldTokenName()); - string memory symbol = string.concat("aERC20-", IBaseForm(superform).superformYieldTokenSymbol()); + string memory name = IBaseForm(superform).superformYieldTokenName(); + string memory symbol = IBaseForm(superform).superformYieldTokenSymbol(); uint8 decimal = uint8(IBaseForm(superform).getVaultDecimals()); aErc20Token = address(new aERC20(name, symbol, decimal)); /// @dev broadcast and deploy to the other destination chains diff --git a/src/forms/ERC4626FormImplementation.sol b/src/forms/ERC4626FormImplementation.sol index ee752acf5..0d563a171 100644 --- a/src/forms/ERC4626FormImplementation.sol +++ b/src/forms/ERC4626FormImplementation.sol @@ -135,12 +135,12 @@ abstract contract ERC4626FormImplementation is BaseForm, LiquidityHandler { /// @inheritdoc BaseForm function superformYieldTokenName() external view virtual override returns (string memory) { - return string(abi.encodePacked("Superform ", IERC20Metadata(vault).name())); + return string(abi.encodePacked(IERC20Metadata(vault).name(), " SuperPosition")); } /// @inheritdoc BaseForm function superformYieldTokenSymbol() external view virtual override returns (string memory) { - return string(abi.encodePacked("SUP-", IERC20Metadata(vault).symbol())); + return string(abi.encodePacked("sp-", IERC20Metadata(vault).symbol())); } /// @inheritdoc BaseForm diff --git a/test/unit/superform-forms/superform-form.ERC4626Form.t.sol b/test/unit/superform-forms/superform-form.ERC4626Form.t.sol index 766f68bbe..eadef39ec 100644 --- a/test/unit/superform-forms/superform-form.ERC4626Form.t.sol +++ b/test/unit/superform-forms/superform-form.ERC4626Form.t.sol @@ -86,7 +86,7 @@ contract SuperformERC4626FormTest is ProtocolActions { string memory symbol = ERC4626Form(payable(superformCreated)).superformYieldTokenSymbol(); - assertEq(symbol, "SUP-Mock"); + assertEq(symbol, "sp-Mock"); } function test_superformVaultSharesAmountToUnderlyingAmount() public { @@ -357,7 +357,7 @@ contract SuperformERC4626FormTest is ProtocolActions { string memory tokenName = ERC4626Form(payable(superformCreated)).superformYieldTokenName(); - assertEq(tokenName, "Superform Mock Vault"); + assertEq(tokenName, "Mock Vault SuperPosition"); } function test_superformDirectDepositWithoutAllowance() public { diff --git a/test/utils/BaseSetup.sol b/test/utils/BaseSetup.sol index 7cb4a542e..4b250428f 100644 --- a/test/utils/BaseSetup.sol +++ b/test/utils/BaseSetup.sol @@ -690,7 +690,9 @@ abstract contract BaseSetup is DSTest, StdInvariant, Test { vars.superPositions = address( new SuperPositions{ salt: salt }( "https://ipfs-gateway.superform.xyz/ipns/k51qzi5uqu5dg90fqdo9j63m556wlddeux4mlgyythp30zousgh3huhyzouyq8/JSON/", - vars.superRegistry + vars.superRegistry, + "SuperPositions", + "SP" ) );