native: allow to set oracle request price
This commit is contained in:
parent
27fc28bd69
commit
256cd09228
4 changed files with 84 additions and 6 deletions
|
@ -14,3 +14,13 @@ func Request(url string, filter []byte, cb string, userData interface{}, gasForR
|
|||
contract.States|contract.AllowNotify,
|
||||
url, filter, cb, userData, gasForResponse)
|
||||
}
|
||||
|
||||
// GetPrice represents `getPrice` method of Oracle native contract.
|
||||
func GetPrice() int {
|
||||
return contract.Call(interop.Hash160(Hash), "getPrice", contract.ReadStates).(int)
|
||||
}
|
||||
|
||||
// SetPrice represents `setPrice` method of Oracle native contract.
|
||||
func SetPrice(amount int) {
|
||||
contract.Call(interop.Hash160(Hash), "setPrice", contract.States, amount)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue