@@ -28,7 +28,7 @@ access(all) contract SwapPair: FungibleToken {
2828 access (all ) var price0CumulativeLastScaled : UInt256
2929 access (all ) var price1CumulativeLastScaled : UInt256
3030
31- /// Transaction lock
31+ /// Transaction lock
3232 access (self ) var lock : Bool
3333
3434 /// √(reserve0 * reserve1) for volatile pool, or √√[(r0^3 * r1 + r0 * r1^3) / 2] for stable pool, as of immediately after the most recent liquidity event
@@ -92,7 +92,7 @@ access(all) contract SwapPair: FungibleToken {
9292 /// SwapPair doesn't support MetadataViews api as this is not just a normal FT, and there could be multiple types of lpTokens
9393 /// for different SwapPairs, so it is stored in LpTokenCollection instead (not directly associated with a StoragePath).
9494 access (all ) view fun getViews (): [Type ] { return [] }
95- access (all ) fun resolveView (_ view : Type ): AnyStruct ? { return nil }
95+ access (all ) fun resolveView (_ _view : Type ): AnyStruct ? { return nil }
9696
9797 /// withdraw
9898 ///
@@ -166,8 +166,8 @@ access(all) contract SwapPair: FungibleToken {
166166 ///
167167 /// SwapPair doesn't support MetadataViews api as this is not just a normal FT, and there could be multiple types of lpTokens
168168 /// for different SwapPairs, so it is stored in LpTokenCollection instead (not directly associated with a StoragePath).
169- access (all ) view fun getContractViews (resourceType : Type ? ): [Type ] { return [] }
170- access (all ) fun resolveContractView (resourceType : Type ? , viewType : Type ): AnyStruct ? { return nil }
169+ access (all ) view fun getContractViews (resourceType _ : Type ? ): [Type ] { return [] }
170+ access (all ) fun resolveContractView (resourceType _resourceType : Type ? , viewType _viewType : Type ): AnyStruct ? { return nil }
171171
172172 /// createEmptyVault
173173 //
@@ -176,7 +176,7 @@ access(all) contract SwapPair: FungibleToken {
176176 /// and store the returned Vault in their storage in order to allow their
177177 /// account to be able to receive deposits of this token type.
178178 ///
179- access (all ) fun createEmptyVault (vaultType : Type ): @SwapPair.Vault {
179+ access (all ) fun createEmptyVault (vaultType _ : Type ): @SwapPair.Vault {
180180 return <- create Vault (balance : 0.0 )
181181 }
182182
@@ -191,7 +191,7 @@ access(all) contract SwapPair: FungibleToken {
191191 self .totalSupply = self .totalSupply + amount
192192 emit TokensMinted (amount : amount )
193193 return <- create Vault (balance : amount )
194- }
194+ }
195195
196196 /// Burn lpTokens
197197 access (self ) fun burnLpToken (from : @SwapPair.Vault ) {
@@ -210,7 +210,7 @@ access(all) contract SwapPair: FungibleToken {
210210 msg : " SwapPair: added zero liquidity" ,
211211 err : SwapError .ErrorCode .ADD_ZERO_LIQUIDITY
212212 )
213- (tokenAVault .isInstance (self .token0VaultType ) && tokenBVault .isInstance (self .token1VaultType )) ||
213+ (tokenAVault .isInstance (self .token0VaultType ) && tokenBVault .isInstance (self .token1VaultType )) ||
214214 (tokenBVault .isInstance (self .token0VaultType ) && tokenAVault .isInstance (self .token1VaultType )):
215215 SwapError .ErrorEncode (
216216 msg : " SwapPair: added incompatible liquidity pair vaults" ,
@@ -533,7 +533,7 @@ self.lock = false
533533 self .price1CumulativeLastScaled = SwapConfig .overflowAddUInt256 (
534534 self .price1CumulativeLastScaled ,
535535 SwapConfig .UFix64ToScaledUInt256 (price1 ) * timeElapsedScaled / SwapConfig .scaleFactor
536- )
536+ )
537537 }
538538 self .blockTimestampLast = blockTimestamp
539539 }
0 commit comments