getHost() :
This function returns the address of the host of the ISuperTokenFactory contract. It does this by accessing the _host variable, which is a private variable that stores the address of the host. (autogenerated documentation)
initialize() :
This function initializes the SuperTokenLogic, which is a logic system that is used to manage user authentication and authorization. It works by setting up the necessary parameters and data structures needed for the system to function properly. It also sets up the logic for how the system will handle authentication and authorization requests. (autogenerated documentation)
proxiableUUID() :
This function returns a unique identifier (bytes32) for the SuperTokenFactory contract. It does this by using the keccak256 hashing algorithm to generate a unique identifier based on the string "org.superfluid-finance.contracts.SuperTokenFactory.implementation". This ensures that the identifier is unique and can be used to identify the contract. (autogenerated documentation)
updateCode(address) :
This function allows the host to update the code address of the SuperToken contract. It works by first checking that the sender of the transaction is the host, and then calling the _updateCodeAddress() and _updateSuperTokenLogic() functions to update the code address and logic of the SuperToken contract. (autogenerated documentation)
_updateSuperTokenLogic() :
This function is used to update the SuperTokenLogic contract. It creates a new instance of the SuperToken contract, sets it as the _superTokenLogic variable, and then calls the castrate() function on the UUPSProxiable contract. Finally, it emits an event to signal that the SuperTokenLogic has been created. (autogenerated documentation)
getSuperTokenLogic() :
This function is a getter that returns the value of the private variable _superTokenLogic. It is an accessor method that allows external code to view the value of the private variable without directly accessing it. (autogenerated documentation)
createSuperTokenLogic() :
This function creates a SuperToken wrapper for a given ERC20 token. It first checks if a SuperToken wrapper already exists for the given ERC20 token, and if not, it creates a new UUPSProxy contract and initializes it with the address of the SuperToken logic contract. It then initializes the SuperToken wrapper with the given ERC20 token's details, such as its name, symbol, and decimals. Finally, it emits an event to signal that the SuperToken has been created. (autogenerated documentation)
createCanonicalERC20Wrapper() :
This function creates a new ERC20 wrapper token (known as a SuperToken) that is based on an existing ERC20 token (known as the underlying token). The function takes in the address of the underlying token as an argument and uses it to create a new UUPSProxy contract. The proxy contract is then initialized with the address of the SuperTokenLogic contract, which contains the logic for the SuperToken. The SuperToken is then initialized with the details of the underlying token, such as its name, symbol, and decimals. Finally, an event is emitted to signal that the SuperToken has been created. (autogenerated documentation)
createERC20Wrapper(uint8,string,string) :
This function creates a new ERC20 wrapper token (superToken) that is based on an existing ERC20 token (underlyingToken). The wrapper token is initialized with the underlying token's address, the number of decimals of the underlying token, the upgradability of the wrapper token (NON_UPGRADABLE, SEMI_UPGRADABLE, or FULLY_UPGRADABLE), and the name and symbol of the wrapper token. Depending on the upgradability of the wrapper token, a different proxy contract is created and initialized. Finally, the wrapper token is initialized with the underlying token's address, decimals, name, and symbol, and an event is emitted to (autogenerated documentation)
createERC20Wrapper(string,string) :
This function creates an ERC20Wrapper, which is a type of ISuperToken. It takes in an ERC20WithTokenInfo as an argument, which contains information about the underlying token, as well as an Upgradability argument, which determines whether the token is upgradable or not. It also takes in two strings, name and symbol, which are used to set the name and symbol of the token. The function then calls the createERC20Wrapper function, passing in the underlying token, the decimals of the underlying token, the upgradability argument, and the name and symbol strings. The createERC20Wrapper function then creates the ERC20Wrapper and returns it as an ISuper (autogenerated documentation)
initializeCustomSuperToken(address) :
This function initializes a custom SuperToken proxy. It takes in an address of the custom SuperToken proxy as an argument and uses it to create a UUPSProxy instance. It then calls the initializeProxy function on the UUPSProxy instance, passing in the address of the SuperTokenLogic contract. Finally, it emits an event to indicate that the custom SuperToken has been created. (autogenerated documentation)
computeCanonicalERC20WrapperAddress(address) :
This function computes the address of a Canonical ERC20 Wrapper contract for a given underlying token address. It first checks if the wrapper contract has already been deployed for the given underlying token address, and if so, it returns the existing address. If the wrapper contract has not yet been deployed, it computes the address of the wrapper contract by hashing the contract's bytecode, the address of the contract calling the function, and the underlying token address. It then returns the computed address and a boolean indicating whether the wrapper contract has been deployed. (autogenerated documentation)
getCanonicalERC20Wrapper(address) :
This function retrieves the address of the Canonical ERC20 Wrapper contract associated with a given underlying token address. It does this by accessing the _canonicalWrapperSuperTokens mapping, which stores the address of the Canonical ERC20 Wrapper contract associated with each underlying token address. (autogenerated documentation)
initializeCanonicalWrapperSuperTokens() :
This function is used to initialize the CanonicalWrapperSuperTokens mapping. It is called by the Governance contract and only allows the Governance contract owner to call it. It takes an array of InitializeData structs as an argument, which contains the underlying token address and the corresponding SuperToken address. The function then iterates through the array and sets the mapping of the underlying token address to the SuperToken address. (autogenerated documentation)
create() :
This function creates a new SuperToken contract and returns its address. It takes an ISuperfluid host as an argument, which is used to initialize the SuperToken contract. The SuperToken contract is then deployed to the blockchain and its address is returned. (autogenerated documentation)