Module: AwakenSwapContract.cs
Function: Empty Initialize(InitializeInput input)
Initializes the contract. Can only be called by deployer.
Inputs
input.AwakenTokenContractAddress
Validation: No validation.
Impact: Sets the address of the LP token contract, which should be a deployment of AwakenTokenContract.
input.Admin
Validation: Defaults to sender if null.
Impact: Sets the admin address.
Branches and code coverage (including function calls)
Intended branches
Negative behavior
Function call analysis
This function makes no external state-mutating calls.
Function: Address CreatePair(CreatePairInput input)
Creates a new swap pair. Can be called by anyone.
Inputs
input.SymbolPair
Validation: Must be a single symbol pair. Symbols may not be the same, and the pair may not already exist.
Impact: Symbol pair to create a swap on.
Branches and code coverage (including function calls)
Intended branches
Negative behavior
Function call analysis
CreatePair -> LPTokenContract.Create
Argument control?
Symbol
: Normalized token pair. Validity checked by contract.Decimals
: Constant8
.TokenName
: Formatted string.Issuer
: ConstantContext.Self
.IsBurnable
: Constanttrue
.TotalSupply
: Constantlong.MaxValue
.
Impact: Creates the new token pair on the underlying AwakenTokenContract, setting the issuer to this swap contract.