-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from fractalplatform/vmfix
fixvmbug
- Loading branch information
Showing
2 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,52 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
contract MultiAsset { | ||
function() public payable { | ||
constructor() public payable { | ||
|
||
} | ||
function reg(string desc) public { | ||
issueasset(desc); | ||
} | ||
function add(address assetId, uint256 value) public { | ||
addasset(assetId,value); | ||
|
||
function reg(string desc) public returns(uint256){ | ||
return issueasset(desc); | ||
} | ||
function transAsset(address to, address assetId, uint256 value) public payable { | ||
to.transferex(assetId, value); | ||
|
||
function destroyasset(uint256 assetId, uint256 value) public returns(uint256) { | ||
return destroyasset(assetId, value); | ||
} | ||
|
||
function getaccountid(address desc) public returns(uint256) { | ||
return getaccountid(desc); | ||
} | ||
|
||
function add(uint256 assetId, address toname,uint256 value) public returns(uint256) { | ||
return addasset(assetId,toname,value); | ||
} | ||
|
||
function changeOwner(address newOwner, uint256 assetId) public returns(uint256) { | ||
return setassetowner(assetId, newOwner); | ||
} | ||
function changeOwner(address newOwner, address assetId) public { | ||
setassetowner(assetId, newOwner); | ||
|
||
function transAsset(address to, uint256 assetId, uint256 value) public payable { | ||
to.transferex(assetId, value); | ||
} | ||
function getBalanceEx(address to,address assetId) public { | ||
|
||
function getBalanceEx(address to,uint256 assetId) public { | ||
log1(bytes32(to.balanceex(assetId)),"getbalanceex"); | ||
} | ||
|
||
function getAssetAmount(uint256 assetId, uint256 time) public{ | ||
uint256 x; | ||
x = assetamount(assetId,time); | ||
log1(bytes32(x),"getassetamount"); | ||
} | ||
|
||
function getAssetAmount(uint256 assetId, uint256 time) public{ | ||
uint256 x; | ||
x = assetamount(assetId,time); | ||
log1(bytes32(x),"getassetamount"); | ||
} | ||
function getSnapshotTime(uint256 t,uint256 time) public{ | ||
uint256 x; | ||
x = snapshottime(t,time); | ||
log1(bytes32(x),"getSnapshotTime" ); | ||
|
||
} | ||
function getSnapBalance(address to,uint256 assetId,uint256 time) public { | ||
uint256 x; | ||
x = snapshottime(t,time); | ||
log1(bytes32(x),"getSnapshotTime" ); | ||
} | ||
function getSnapBalance(address to,uint256 assetId,uint256 time,uint256 t) public { | ||
uint256 x ; | ||
x = to.snapbalance(assetId,time); | ||
x = to.snapbalance(assetId,time,t); | ||
log1(bytes32(x),"getSnapBalance"); | ||
} | ||
} |