Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Hooks in Smart Contract

Vinay Rawal answered on March 9, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • 2. How many hooks can be there in smart contracts?
  • Hooks in Smart Contract Continued…
  • Smart Contract hook called on Account creation
  • Smart Contract hook called on migration
  • Smart contract - Can schedules be customized for each product?
  • contract hooks.

  • Hooks in Smart Contract

    0

    Hooks

    Encodes the Terms & Conditions of a product’s financial behavior

    Some key hooks are as follows,

    1.

    post_activate_code hook As soon as the account is opened on vault via core api , When we move an account’s status to open, the post_activate_code will run

    immediately . This hook could take an action such as disburse a loan amount to a linked CASA account on the opening of the loan product o r d isburse a small sign

    up bonus to a wallet account that was opened by the customer during a promotional period

    2.

    Schedule_Code Hook Hooks whthatre driven periodically by schedules are executed by the Schedule_Code hook. In addition, on account opening the execution

    schedules job would be run, this would set the schedules which need to be executed at the frequency and timings directed by t he client when writing the Smart

    Contract. Different products can have different schedules, and this is enabled through the use of the execution_schedules hook

    Execution_schedule Hook The frequency/timings of the schedules are defined within the execution_schedules hook

    3.

    Pre_Posting_Code Hook The Pre_posting_code hook runs before a posting is committed to the ledger . The use of the pre_posting_code is to verify that the

    posting is allowed to happen. Checks such as “Would this posting exceed the customer’s maximum balance?” and “Are there any f lag s on this customer’s account

    indicating we should stop this posting?” would occur during the pre_posting_code

    4.

    Post_Posting_Code Hook In the post posting code we would complete actions such as rebalancing of the balances on the account, making automatic savings on

    spending and all other journeys that should be undertaken after a posting has been made

    5.

    Pre_parameter_change_code & Post_parameter_Change_code Changing parameters will be done using our APIs and will have two hooks involved, imagine you

    want to change the Profit Rate on your product. In this situation, the pre_parameter_change_code will run and then once the parameter has been successfully

    changed the post_parameter_change_code will autonomously run. Actions such as recalculating profit on an account could be done in the

    post_parameter_change_code

    6.

    Close_Code Hook The Close_code hook runs after you have requested to close an account using our Core API.When the customer has decided to close their

    account with the bank, so the bank will make an api call to the vault to close it and then the close_code will zero out any accrued interest before the account is

    closed.

    Hooks in Smart Contract

    Notes :

    1.

    Vault supports interest accrual in multi currency for single account

    2.

    Any product type can be configured in Vault

    Popularity 3/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Mar 09 2023
    Vinay Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.