Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hashrate-Node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanjinfei
hashrate-Node
Commits
0d016ad3
Commit
0d016ad3
authored
Sep 26, 2023
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redeploy contract
parent
8cffc4e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
3 deletions
+53
-3
event.go
common/event.go
+2
-2
VmCreate.abi
contract/VmCreateContract/VmCreate.abi
+19
-0
VmCreate.go
contract/VmCreateContract/VmCreate.go
+32
-1
No files found.
common/event.go
View file @
0d016ad3
...
@@ -12,6 +12,6 @@ const (
...
@@ -12,6 +12,6 @@ const (
// VmCreateContract 虚拟机创建合约
// VmCreateContract 虚拟机创建合约
const
(
const
(
VmContract
=
"0x
3354D08f158d2BEFA7071F459A0a4ca2Ef797974
"
VmContract
=
"0x
16bAf274413752C696fddDbeF9A08BCa1D01A230
"
VmCreateContract
=
"0x
EE436a4C761f79d42154a4e526019063d3a7da41
"
VmCreateContract
=
"0x
d1534273B46261a2C38d210b21Ed0C80C89b2445
"
)
)
contract/VmCreateContract/VmCreate.abi
View file @
0d016ad3
...
@@ -271,6 +271,25 @@
...
@@ -271,6 +271,25 @@
"stateMutability": "view",
"stateMutability": "view",
"type": "function"
"type": "function"
},
},
{
"inputs": [
{
"internalType": "string",
"name": "taskId",
"type": "string"
}
],
"name": "getTaskTimestamp",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
{
"inputs": [
"inputs": [
{
{
...
...
contract/VmCreateContract/VmCreate.go
View file @
0d016ad3
...
@@ -30,7 +30,7 @@ var (
...
@@ -30,7 +30,7 @@ var (
// VmCreateMetaData contains all meta data concerning the VmCreate contract.
// VmCreateMetaData contains all meta data concerning the VmCreate contract.
var
VmCreateMetaData
=
&
bind
.
MetaData
{
var
VmCreateMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
const
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
callerIp
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
cpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuCores
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
gpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
gpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
memNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
os
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
vmName
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
AddCreateVMInfoEvent
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
previousOwner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
newOwner
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
OwnershipTransferred
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
creater
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
snatcher
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
SnatchTaskEvent
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
_const
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractICloudConstant
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_admin
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
addAdmin
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
callerIp
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
cpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuCores
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
gpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
gpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
memSize
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
os
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
vmName
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
addVirtualMachine
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_admin
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
delAdmin
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
vmId
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
finishTask
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
start
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
count
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
getTaskId
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string[]
\"
,
\"
name
\"
:
\"
res
\"
,
\"
type
\"
:
\"
string[]
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
getVmCreateProgress
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
getVmId
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_addr
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
isAdmin
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
owner
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
renounceOwnership
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
const
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
setConstant
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
creater
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
snatchTask
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
taskOwnerMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
taskProgress
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
taskSnatchMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
taskTimeMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
taskVmidMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
newOwner
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
transferOwnership
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
createStage
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
createProgress
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
updateVmCreateProgress
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
const
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
callerIp
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
cpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuCores
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
gpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
gpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
memNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
os
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
vmName
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
AddCreateVMInfoEvent
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
previousOwner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
newOwner
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
OwnershipTransferred
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
creater
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
snatcher
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
SnatchTaskEvent
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
_const
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractICloudConstant
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_admin
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
addAdmin
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
callerIp
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
cpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
cpuCores
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
gpuModel
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
gpuNum
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
uint64
\"
,
\"
name
\"
:
\"
memSize
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
os
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
vmName
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
addVirtualMachine
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_admin
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
delAdmin
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
vmId
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
finishTask
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
start
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
count
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
getTaskId
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string[]
\"
,
\"
name
\"
:
\"
res
\"
,
\"
type
\"
:
\"
string[]
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
get
TaskTimestamp
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
get
VmCreateProgress
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
getVmId
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_addr
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
isAdmin
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
owner
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
renounceOwnership
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
const
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
setConstant
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
creater
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
snatchTask
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
taskOwnerMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
taskProgress
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
taskSnatchMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
taskTimeMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
taskVmidMapping
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
newOwner
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
transferOwnership
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
taskId
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
createStage
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
createProgress
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
updateVmCreateProgress
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
}
}
// VmCreateABI is the input ABI used to generate the binding from.
// VmCreateABI is the input ABI used to generate the binding from.
...
@@ -241,6 +241,37 @@ func (_VmCreate *VmCreateCallerSession) GetTaskId(start uint8, count uint8) ([]s
...
@@ -241,6 +241,37 @@ func (_VmCreate *VmCreateCallerSession) GetTaskId(start uint8, count uint8) ([]s
return
_VmCreate
.
Contract
.
GetTaskId
(
&
_VmCreate
.
CallOpts
,
start
,
count
)
return
_VmCreate
.
Contract
.
GetTaskId
(
&
_VmCreate
.
CallOpts
,
start
,
count
)
}
}
// GetTaskTimestamp is a free data retrieval call binding the contract method 0xb8c467e0.
//
// Solidity: function getTaskTimestamp(string taskId) view returns(uint256)
func
(
_VmCreate
*
VmCreateCaller
)
GetTaskTimestamp
(
opts
*
bind
.
CallOpts
,
taskId
string
)
(
*
big
.
Int
,
error
)
{
var
out
[]
interface
{}
err
:=
_VmCreate
.
contract
.
Call
(
opts
,
&
out
,
"getTaskTimestamp"
,
taskId
)
if
err
!=
nil
{
return
*
new
(
*
big
.
Int
),
err
}
out0
:=
*
abi
.
ConvertType
(
out
[
0
],
new
(
*
big
.
Int
))
.
(
**
big
.
Int
)
return
out0
,
err
}
// GetTaskTimestamp is a free data retrieval call binding the contract method 0xb8c467e0.
//
// Solidity: function getTaskTimestamp(string taskId) view returns(uint256)
func
(
_VmCreate
*
VmCreateSession
)
GetTaskTimestamp
(
taskId
string
)
(
*
big
.
Int
,
error
)
{
return
_VmCreate
.
Contract
.
GetTaskTimestamp
(
&
_VmCreate
.
CallOpts
,
taskId
)
}
// GetTaskTimestamp is a free data retrieval call binding the contract method 0xb8c467e0.
//
// Solidity: function getTaskTimestamp(string taskId) view returns(uint256)
func
(
_VmCreate
*
VmCreateCallerSession
)
GetTaskTimestamp
(
taskId
string
)
(
*
big
.
Int
,
error
)
{
return
_VmCreate
.
Contract
.
GetTaskTimestamp
(
&
_VmCreate
.
CallOpts
,
taskId
)
}
// GetVmCreateProgress is a free data retrieval call binding the contract method 0xb1870375.
// GetVmCreateProgress is a free data retrieval call binding the contract method 0xb1870375.
//
//
// Solidity: function getVmCreateProgress(string taskId) view returns(uint256, uint256)
// Solidity: function getVmCreateProgress(string taskId) view returns(uint256, uint256)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment