Skip to content

Commit 39ece70

Browse files
author
Yash Agrawal
committed
fix: use dynamic sbt name, symbol in initialize
1 parent e48b38c commit 39ece70

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

contracts/SBT.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ contract SBT is ISBT, ERC721EnumerableUpgradeable {
5858
}
5959

6060
function initialize(
61+
string memory sbtName,
62+
string memory sbtSymbol,
6163
address minterUpdater,
6264
address[] memory minters
6365
) external initializer {
64-
__ERC721_init("Dev Protocol SBT V1", "DEV-SBT-V1");
66+
__ERC721_init(sbtName, sbtSymbol);
6567

6668
_minterUpdater = minterUpdater;
6769
for (uint256 i = 0; i < minters.length; i++) {

contracts/SBTFactory.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ contract SBTFactory is ISBTFactory, OwnableUpgradeable {
2121
}
2222

2323
function makeNewSBT(
24+
string memory sbtName,
25+
string memory sbtSymbol,
2426
address proxyAdmin,
2527
bytes memory proxyCallData,
2628
address minterUpdater,
@@ -52,7 +54,7 @@ contract SBTFactory is ISBTFactory, OwnableUpgradeable {
5254
sbtProxyMapping[identifier] = address(proxy);
5355

5456
// Initialize the proxy.
55-
SBT(proxy).initialize(minterUpdater, minters);
57+
SBT(proxy).initialize(sbtName, sbtSymbol, minterUpdater, minters);
5658

5759
return address(proxy);
5860
}

contracts/interfaces/ISBTFactory.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pragma solidity =0.8.9;
44
interface ISBTFactory {
55
/*
66
* @dev makes new SBT contract which is upgradeable.
7+
* @param sbtName The name of the SBT token to be created.
8+
* @param sbtSymbol The symbol of the SBT token to be created.
79
* @param proxyAdmin owner of the proxy contract which will be deployed.
810
* @param proxyCallData the data which denotes function calls, etc when deploying new proxy contract.
911
* @param minterUpdater the address which can add/remove minter access eoa.
@@ -12,6 +14,8 @@ interface ISBTFactory {
1214
* @return uint256[] token id list
1315
*/
1416
function makeNewSBT(
17+
string memory sbtName,
18+
string memory sbtSymbol,
1519
address proxyAdmin,
1620
bytes memory proxyCallData,
1721
address minterUpdater,

0 commit comments

Comments
 (0)