Skip to content

Latest commit

 

History

History
88 lines (40 loc) · 2.29 KB

Oracle.md

File metadata and controls

88 lines (40 loc) · 2.29 KB

Module 0x1::PriceOracleScripts

Function register_oracle

public(script) fun register_oracle<OracleT: copy, drop, store>(sender: signer, precision: u8)
Implementation
public(script) fun register_oracle<OracleT: copy+store+drop>(sender: signer, precision: u8){
    PriceOracle::register_oracle<OracleT>(&sender, precision)
}

Function init_data_source

public(script) fun init_data_source<OracleT: copy, drop, store>(sender: signer, init_value: u128)
Implementation
public(script) fun init_data_source<OracleT: copy+store+drop>(sender: signer, init_value: u128){
    PriceOracle::init_data_source<OracleT>(&sender, init_value);
}

Function update

public(script) fun update<OracleT: copy, drop, store>(sender: signer, value: u128)
Implementation
public(script) fun update<OracleT: copy+store+drop>(sender: signer, value: u128){
    PriceOracle::update<OracleT>(&sender, value);
}