/refund-contract

a contract that returns all native currency sent to it back to tx.origin

Primary LanguageSolidityGNU Affero General Public License v3.0AGPL-3.0

RefundContract

a contract that returns all native currency sent to it back to tx.origin.


To Deploy

  1. Install Foundry - you can get it by following the instructions here under the "Use Foundryup" section. Namely:
    • Run curl -L https://foundry.paradigm.xyz | bash
    • Run foundryup
  2. Run forge create RefundContract --rpc-url <RPC_URL> --private-key <YOUR_PRIVATE_KEY> where:
    • <RPC_URL> = An RPC url by which to access the chain you want to deploy to (you can find a bunch of public ones here if you need)
    • <YOUR_PRIVATE_KEY> = The private key of the wallet (THIS SHOULD BE A HOT WALLET, DO NOT DEPLOY THINGS FROM WALLETS THAT HAVE A LOT OF MONEY IN THEM) you would like to deploy from - there are other ways connect a wallet with forge's create command if you'd like to check them out here too

Once you deploy, when you send the chain's native currency to this contract, it will return it to the address that sent it (tx.origin to be specific).