0

I want to send some amount of ether(let say 0.1 ether) on every 1st of month to another address. I have a smart contract to send ethers from one address to another but it's a manual process. For every transfer, i need to confirm the trxn in metamask (i don't want to confirm trxn every time.) I want the functionality like an EMI payment(user signs/agree/confirms the trxn once and payment will happen every month till the no of instalment completes.

Eg. Account 1 = 0x1234

Account 2 = 0x9876

total amount to transfer = 1 ETH

no of instalments = 10

EMI amount per month => 1/10 = 0.1 ETH

Now Account1 will confirm/sign the trxn once at the starting and after that every month 0.1 ETH will be transferred to Account2.

The approach i have that i can run a cron in JS and call transfer() function of my contract every month. But the problem is, it will pop the metamask and ask confirmation which i don't want. Also i can't ask wallet pvt key from my users to submit it on my website. Is there any way that i sign/confirm the trxn at the starting and trigger payment on every month.

Thanks in advance

1 Answer 1

0

send transactions with web3 .js/.py. it will require public key, private key, rpc provider

Ref: https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction

Solidity don't offer setInterval or Timeout yet.

3
  • thanks aakash4dev for reviewing my question. As i said that i can send trxn using web3 but it will require user's private key(if done through backend) or user have to approve the trxn through metamask(if done through dAPP). Think in a way that i want to offer a service to my customers that they can login into my website and use this EMI feature. In which they don't need to submit their pvt key to my website instead metamask will popup and ask their approval(only once). Now i want a process/system, on every month 0.1 ETH will be debited from customers wallet and send to customer's friend. May 12, 2022 at 8:58
  • o. means you wanna auto deduct as like bank auto deduct money for EMI, SIP, Insurence etc. This feature is not yet available at metamask or any wallet or Eth/pther blockchain yet.
    – aakash4dev
    May 12, 2022 at 13:50
  • There are 2 solutions: 1. make chrome extension to interact with metamask or a metamask type extension with features you want. 2. make a mobile app, and deduct money by connecting it to that app, which contrain private & public keys of uses. as like Binance Metamask WazirX Coinbase etc do. actually, I work at @vayupankh along with other dApp developers (in India). You can give us a Contract to make this DeFi Project & chrome extension & android+IOS app. we may try. I'm not sure, but we may try. ask twitter.com/ankur_rakhi or direct text me here. I may ask all.
    – aakash4dev
    May 12, 2022 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.