Skip to content

aldoprogrammer/kopli-payment-salary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kopli Payment Salary

Overview

The Kopli Payment Salary application seamlessly connects the Reactive Network with any EVM-compatible chain, enabling users to easily request funds from a faucet contract on a different blockchain. It’s as simple as sending an email—just a few clicks, and you can access the funds you need across multiple networks. Once the request is processed, users will receive their funds directly in Reactive Kopli, allowing them to interact with decentralized applications on the Reactive Network. The Reactive Network handles all the processing behind the scenes, ensuring a smooth and efficient experience. This streamlined process eliminates barriers and significantly enhances accessibility in the world of decentralized finance, making it easier for anyone to engage with blockchain technology.

Contracts

  • Origin Chain Contract: ReactiveFaucetL1 handles Ether payment requests, defines a maximum payout per request, and emits PaymentRequest events containing details of the transaction.

  • Reactive Contract: ReactiveFaucet operates on the Reactive Network. It subscribes to events on the Sepolia chain, processes callbacks, and distributes Ether to the appropriate receivers based on external PaymentRequest events.

Deployment & Testing

To deploy the contracts to Ethereum Sepolia and Kopli Testnet, follow these steps. Replace the relevant keys, addresses, and endpoints as needed. Make sure the following environment variables are correctly configured before proceeding:

Step 1: Deploy ReactiveFaucetL1

Deploy the ReactiveFaucetL1 contract to Ethereum Sepolia and assign the Deployed to address from the response to REACTIVE_FAUCET_L1_ADDR. You can skip this step and export the pre-deployed REACTIVE_FAUCET_L1_ADDR for Ethereum Sepolia shown above.

forge create --rpc-url $SEPOLIA_RPC --private-key $SEPOLIA_PRIVATE_KEY src/faucet/ReactiveFaucetL1.sol:ReactiveFaucetL1 --constructor-args 1ether

Step 2: Deploy ReactiveFaucet

Deploy the ReactiveFaucet contract to the Reactive Network and assign the Deployed to address from the response to REACTIVE_FAUCET_ADDR.

forge create --rpc-url $REACTIVE_RPC --private-key $REACTIVE_PRIVATE_KEY src/faucet/ReactiveFaucet.sol:ReactiveFaucet --value 0.003ether --constructor-args $REACTIVE_FAUCET_L1_ADDR "10000000000000000"  # Setting max payout to 0.01 ETH (10 wei)

Step 3: Test the Faucet

Send a transaction to request funds from the faucet.

cast send $REACTIVE_FAUCET_L1_ADDR --rpc-url $SEPOLIA_RPC --private-key $SEPOLIA_PRIVATE_KEY --value 0.01ether

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published