mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-11-26 07:46:47 +01:00
Mohammed Sohail
99cdb6d0aa
* Demurrage contracts require setting the approval value to 0 before updating the value after the initial limit is set * This implementation auto-revokes every 15 min after arequest is created. Subsequent requests will fail untill the value is set back to 0
29 lines
571 B
Go
29 lines
571 B
Go
package tasker
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type (
|
|
QueueName string
|
|
TaskName string
|
|
)
|
|
|
|
type Task struct {
|
|
Id string `json:"id"`
|
|
Payload json.RawMessage `json:"payload"`
|
|
}
|
|
|
|
const (
|
|
AccountRegisterTask TaskName = "sys:register_account"
|
|
AccountRefillGasTask TaskName = "sys:refill_gas"
|
|
SignTransferTask TaskName = "usr:sign_transfer"
|
|
SignTransferTaskAuth TaskName = "usr:sign_transfer_auth"
|
|
DispatchTxTask TaskName = "rpc:dispatch"
|
|
)
|
|
|
|
const (
|
|
HighPriority QueueName = "high_priority"
|
|
DefaultPriority QueueName = "default_priority"
|
|
)
|