Module 0x1::PriceOracleScripts
use 0x1::PriceOracle;
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);
}