Skip to content

Commit

Permalink
Merge pull request #33 from Reactive-Network/edit-callback-payment
Browse files Browse the repository at this point in the history
edited callback payment
  • Loading branch information
konstantinkoniukov authored Sep 26, 2024
2 parents 86f4354 + 6baf352 commit 97953b0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/docs/system-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ The callback proxy operates independently on destination chains and as an integr

Callback execution is tied to payment, ensuring contracts either have sufficient balance or pay immediately upon receiving a callback. Failure to pay results in the contract being blacklisted, blocking future callbacks and transactions. Debt can be cleared using the `requestPayment` method, which restores the contract’s functionalities.

### Prepayment
**Direct Transfers**: To transfer funds directly to your callback contract, use the following command. This sends 0.1 ether to the contract address on the destination chain:

**Direct Transfers**: The system contract and proxies accept direct transfers for prepayment.

**Third-Party Payments**: Third parties can fund contracts using the `depositTo` method.
```bash
cast send $CALLBACK_ADDR --rpc-url $DESTINATION_CHAIN_RPC --private-key $DESTINATION_CHAIN_PRIVATE_KEY --value 0.1ether
```

To fund the callback contract:
**Depositing Funds to Callback Proxy**: You can deposit funds to a contract using the `depositTo` method. This command sends 0.1 ether to the callback proxy, specifying the callback contract address as the recipient:

```bash
cast send $CALLBACK_ADDR --rpc-url $SEPOLIA_RPC --private-key $SEPOLIA_PRIVATE_KEY --value 0.1ether
cast send --rpc-url $DESTINATION_CHAIN_RPC --private-key $DESTINATION_CHAIN_PRIVATE_KEY $CALLBACK_PROXY_ADDR "depositTo(address)" $CALLBACK_ADDR --value 0.1ether
```

To deposit funds into the callback proxy:
**Checking Reactive Contract Balance**: To check the balance of a reactive contract on the Reactive Network, use the following command:

```bash
cast send --rpc-url $SEPOLIA_RPC --private-key $SEPOLIA_PRIVATE_KEY $CALLBACK_PROXY_ADDR "depositTo(address)" $CALLBACK_ADDR --value 0.1ether
cast balance --rpc-url $REACTIVE_RPC $REACTIVE_CONTRACT_ADDR
```

:::tip[On-The-Spot Payment]
Expand Down

0 comments on commit 97953b0

Please sign in to comment.