-
Notifications
You must be signed in to change notification settings - Fork 40
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 #820 from binance-chain/develop
Release v0.8.1
- Loading branch information
Showing
39 changed files
with
1,369 additions
and
37 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
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
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package pub | ||
|
||
import "fmt" | ||
|
||
type Mirror struct { | ||
TxHash string | ||
ChainId string | ||
Type string | ||
RelayerFee int64 | ||
Sender string | ||
Contract string | ||
BEP20Name string | ||
BEP20Symbol string | ||
BEP2Symbol string | ||
OldTotalSupply int64 | ||
TotalSupply int64 | ||
Decimals int | ||
Fee int64 | ||
} | ||
|
||
func (msg Mirror) String() string { | ||
return fmt.Sprintf("Mirror: txHash: %s, sender: %s, bep2Symbol: %s", msg.TxHash, msg.Sender, msg.BEP2Symbol) | ||
} | ||
|
||
func (msg Mirror) ToNativeMap() map[string]interface{} { | ||
var native = make(map[string]interface{}) | ||
native["txHash"] = msg.TxHash | ||
native["chainId"] = msg.ChainId | ||
native["type"] = msg.Type | ||
native["relayerFee"] = msg.RelayerFee | ||
native["sender"] = msg.Sender | ||
native["contract"] = msg.Contract | ||
native["bep20Name"] = msg.BEP20Name | ||
native["bep20Symbol"] = msg.BEP20Symbol | ||
native["bep2Symbol"] = msg.BEP2Symbol | ||
native["oldTotalSupply"] = msg.OldTotalSupply | ||
native["totalSupply"] = msg.TotalSupply | ||
native["decimals"] = msg.Decimals | ||
native["fee"] = msg.Fee | ||
return native | ||
} | ||
|
||
// deliberated not implemented Ess | ||
type Mirrors struct { | ||
Height int64 | ||
Num int | ||
Timestamp int64 | ||
Mirrors []Mirror | ||
} | ||
|
||
func (msg Mirrors) String() string { | ||
return fmt.Sprintf("Mirrors in block %d, num: %d", msg.Height, msg.Num) | ||
} | ||
|
||
func (msg Mirrors) ToNativeMap() map[string]interface{} { | ||
var native = make(map[string]interface{}) | ||
native["height"] = msg.Height | ||
mirrors := make([]map[string]interface{}, len(msg.Mirrors), len(msg.Mirrors)) | ||
for idx, t := range msg.Mirrors { | ||
mirrors[idx] = t.ToNativeMap() | ||
} | ||
native["timestamp"] = msg.Timestamp | ||
native["num"] = msg.Num | ||
native["mirrors"] = mirrors | ||
return native | ||
} |
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
Oops, something went wrong.