Greetings everyone,
Brief about "MOMP Network"
"MOMP" (Money Over Mail Protocol) provides a mechanism for sending money to email addresses on top of decentralized network. MOMP itself is a set of rules (Protocol) originally created by "Jeevanjot Singh" and currently implemented by momp.network. Learn more about "MOMP" from the document
Process to interact with "MOMP" smart contract
You need a supported web wallet to perform any operation for "MOMP", Currently supported wallet is Superhero and you can add it on your browser from extension marketplace, For e.g. Chrome browser wallet extension
There are some useful methods that might doesn't exist in a front-end currently. You can directly use the "MOMP" smart contract to interact with those methods.
First Steps:
For ease, Use an online editor to load the MOMP smart contract e.g. Ae studio. Visit https://studio.aepps.com/ and change your settings from Testnet to
Mainnet
. Select option Browser Wallet and make sure that your wallet's network isMainnet
. Look for permissions and if agree then click accept.
Now, Copy the smart contract code of "MOMP" from github link and add it in a new file inside the editor.
Now, You need to call the existing contract instead of deploying new one. The existing MOMP contract is deployed on mainnet address at
ct_2uJthb5s1D8c8F8ZYMAZ6LYGWno5ubFnrmkkHLE1FBzN3JruQw
. So fill this contract address the input field next to use at address and click thatuse at address
Now, You can see your contract under
Deployed Contract
section. Expand the contract to see its methods.
Calling methods
There are numerous methods that are useful for an individual to learn more about MOMP. But lets focus on some that currently you can use easily.
Call Locally
methods are read only methods that won't require any transaction fee and can be called with appropriate parameters ([]) to get the status of a state variable or any other information returnable.
get_base_fee
(get base fee) :- It gets you the current base fee (Transaction fee - SMTP base fee) of MOMP smart contract.get_registration_fee
(get registration fee) :- It gets you current registration fee that is required to register & verify your email on top of smart contract.get_time_for_refund_in
(get time for refund in) :- It gets you current millisecond value that is being added to each payment to mark its expiry (transaction block time + returned value)clients_balance
(clients balance) [Email {hashed using Sha256}] :- Using unregistered (unverified) email (hashed with sha256 in bytes32 format), you can fetch your current balance in the smart contract.clients_pub_key
(clients pub key) [Email {hashed using Sha256}] :- Using the email (hashed with sha256 in bytes32 format), You can find public key of the email.get_time_for_refund_in_for_payment_id
(get time for refund in for payment id) [Payment id, Address of sender] :- It gets you current millisecond value (UNIX Timestamp) that show when a payment will expire (Can be claimed from both side now [Sender & Receiver])
claim refund
(claim refund) [Payment Id] :- Using payment ID, Sender can claim their amount back if it is expired.getNextQueryID
:- It fetches the upcoming payment ID or query ID from Say Network's SMTP module for visual use.
Note:
- In this process neither sender nor receiver will ever need to expose their email on the public blockchain network.
Learn more about this protocol from this document (AKA white paper)
Top comments (0)