[][src]Function ontio_std::contract::ong::approve

pub fn approve(from: &Address, to: &Address, amount: U128) -> bool

from-address can allow to-address to transfer a certain amount of assets from from-address.

Example

    let input = input();
    let mut source = Source::new(&input);
    let (from,to,amount) = source.read().unwrap();
    ong::approve(from, to, amount);