a WEB3 travel plan payment subsription wallet service
- smart contract
- smart contract test - coverage and audit
- deployment tools (muliple networks)
- off chain integrators
- real time RPC log consumer and ETL services
-
TravelPlan
: escrow and crowd-funding service: where user creates campaign(s) against flywallet travel-plan(s).- User creates a
WEB3-TravelPlan
againstFlywallet-TravelPlan
that locks funds in escrow service. - Contributions can be made ad hoc by anyone or/and scheduled with
PaymentPlan
contract. - User can claim specific
Plan
that will result in funds to be withdawn to Flywallet web3-wallet address, followed by the actual booking.
- User creates a
-
PaymentPlan
: A companion object that allows any user to schedule payments to specificTravelPlan
(s).- user creates
PaymentPlan
(s) againts specificTravelPlan
(s) that creates scheduled payments to it - user can cancel any plan at any time but funds are locked in
TravelPlan
unless userclaims
it - off chain application will attempt to make shceduled payment on behalf of the user
- in case of insufficent funds: next scheduled attempt will trigger any missed payments on top of scheduled one
- user can also make missing payments manually
- user creates
User wants to make multiple future travel reservation and crowd-fund - schedule payments towards them.
Follow the above diagram:
-
User makes a travel plan(s) via flywallet booking service.
-
User creates savings plan(s) this time in
TravelPlan
smart contract where contributions will be made and funds will be stored against1
. -
User creates
PaymentPlan
(s) againts specificTravelPlan
and defining how much, how many and how ofter he/she wishes to make payments of. -
Schedules payments are triggered automatically as per
3
. Funds are moved from user's wallet toTravelPlan
's contract. -
In addition, user can contribute directly to any
TravelPlan
(s) as long as they exist and have not been claimed. -
User decided that ammout he/she collected is sufficient for the desired trip(s), and claims specific
TravelPlan
-
TravelPlan
makes a withdrawal to theflywallet-web3-address
for the ammount contributed in this plan UUID. -
FW
receives web3 funds, acknowleges their recepit and transferes the ammount into user's fiat account insideFW-web-app
-
Immadiatelly after,
FW
purchases the travel booking(s)
-
createTravelPlan(uint256 operatorPlanID_, uint256 operatorUserID_
-
contributeToTravelPlan(uint256 UUID, uint256 amount)
-
claimTravelPlan(uint256 UUID, uint256 amount)
-
travelPlanDetails(uint256 UUID) returns (TravelPlan)
-
createPaymentPlan(uint256 _travelPlanID, uint256 amountPerInterval, uint256 totalIntervals,uint256 intervalLength)
-
cancelPaymentPlan(uint256 UUID)
-
paymentPlanDetails(uint256 UUID) returns (PaymentPlan)
-
runInterval(uint256 UUID)
createTravelPaymentPlan(uint256 operatorPlanID_,uint256 operatorUserID_, uint256 amountPerInterval,uint256 totalIntervals,uint256 intervalLength)
- NOTE: user's address needs to approve to spend agreed ammount by calling:
token.approve(address(TravelSaver), totalAmount)
andtoken.approve(address(TravelSaver), totalAmount)
- NOTE: both contracts interact with eachother only within deployed specfic network with specfic
IERC20
address.
-
-
Celo
-
alfajores:
-
mainnet:
-
-
-
Polygon
-
mumbai:
-
USDC:
0xe11A86849d99F524cAC3E7A0Ec1241828e332C62
-
TravelSaver:
0x262997A234F193182ab87A63d4AE2D7273BE7e21
-
operatorWalletAddress:
0x2b5Fc7f001a173D49B29e34993bB2feF41Ccd803
-
-
mainnet:
-
USDC:
0x2791bca1f2de4661ed88a30c99a7a9449aa84174
-
TravelSaver:
0x207856B02b264b7C60fdE304658d683184254330
-
operatorWalletAddress:
0x383bC9Eae0DfAEC56d10a12BaF23603701A4A004
-
-
address _IERC20
hardcoded address of the ERC20 EUR/USD PEGGED and NON DEFLACTIONARY token that serves a currency of the contractaddress _operatorWallet
wallet address where all funds will be transfered when saving plan is sucessful, hardcoded address of the operator wallet where funds are send from travel-plan as external multisg wallet that is opearated and solely responsible for by the ticket issuer
-
npm install hardhat
-
npx hardhat coverage
-
npx hardhat run --network {NETWORK} scripts/deploy-{NETWORK}-{BRANCH}-{ERC20}.ts
Copyright (c) 2023-present Flywallet Inc.
Licensed under Apache-2.0