-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Doge-is-Dope/ios-project
Ios project
- Loading branch information
Showing
12 changed files
with
125 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ struct SignInScreen: View { | |
var onSignIn: (() -> Void)? | ||
|
||
@StateObject private var viewModel: SignInViewModel | ||
@State private var emailText: String = "" | ||
@State private var emailText: String = "[email protected]" | ||
|
||
init(viewModel: SignInViewModel, onSignIn: (() -> Void)? = nil) { | ||
_viewModel = StateObject(wrappedValue: viewModel) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
DripApp/Drip-iOS/Drip/Services/DripERC20Contract/ClaimReward.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// ClaimReward.swift | ||
// Drip | ||
// | ||
// Created by Shane Chi on 2024/11/16. | ||
// | ||
|
||
import Foundation | ||
import BigInt | ||
import web3 | ||
|
||
struct ClaimReward: ABIFunction { | ||
public var from: web3.EthereumAddress? | ||
|
||
public static let name = "setBalance" | ||
public let gasPrice: BigUInt? = nil | ||
public let gasLimit: BigUInt? = nil | ||
public let contract: EthereumAddress | ||
|
||
// function params | ||
private let ownerAddress: EthereumAddress | ||
private let amount: BigUInt | ||
|
||
init( | ||
from: web3.EthereumAddress?, | ||
contract: EthereumAddress, | ||
ownerAddress: String, | ||
amount: BigUInt | ||
) { | ||
self.from = from | ||
self.contract = contract | ||
self.ownerAddress = EthereumAddress(stringLiteral: ownerAddress) | ||
self.amount = amount | ||
} | ||
|
||
func encode(to encoder: ABIFunctionEncoder) throws { | ||
try encoder.encode(ownerAddress) | ||
try encoder.encode(amount) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters