github.com/klaytn/klaytn@v1.12.1/node/sc/event_interface.go (about) 1 package sc 2 3 import ( 4 "math/big" 5 6 "github.com/klaytn/klaytn/blockchain/types" 7 "github.com/klaytn/klaytn/common" 8 bridgecontract "github.com/klaytn/klaytn/contracts/bridge" 9 ) 10 11 type IRequestValueTransferEvent interface { 12 Nonce() uint64 13 GetTokenType() uint8 14 GetFrom() common.Address 15 GetTo() common.Address 16 GetTokenAddress() common.Address 17 GetValueOrTokenId() *big.Int 18 GetRequestNonce() uint64 19 GetFee() *big.Int 20 GetExtraData() []byte 21 22 GetRaw() types.Log 23 } 24 25 //////////////////// type RequestValueTransferEvent struct //////////////////// 26 // RequestValueTransferEvent from Bridge contract 27 type RequestValueTransferEvent struct { 28 *bridgecontract.BridgeRequestValueTransfer 29 } 30 31 func (rEv RequestValueTransferEvent) Nonce() uint64 { 32 return rEv.RequestNonce 33 } 34 35 func (rEv RequestValueTransferEvent) GetTokenType() uint8 { 36 return rEv.TokenType 37 } 38 39 func (rEv RequestValueTransferEvent) GetFrom() common.Address { 40 return rEv.From 41 } 42 43 func (rEv RequestValueTransferEvent) GetTo() common.Address { 44 return rEv.To 45 } 46 47 func (rEv RequestValueTransferEvent) GetTokenAddress() common.Address { 48 return rEv.TokenAddress 49 } 50 51 func (rEv RequestValueTransferEvent) GetValueOrTokenId() *big.Int { 52 return rEv.ValueOrTokenId 53 } 54 55 func (rEv RequestValueTransferEvent) GetRequestNonce() uint64 { 56 return rEv.RequestNonce 57 } 58 59 func (rEv RequestValueTransferEvent) GetFee() *big.Int { 60 return rEv.Fee 61 } 62 63 func (rEv RequestValueTransferEvent) GetExtraData() []byte { 64 return rEv.ExtraData 65 } 66 67 func (rEv RequestValueTransferEvent) GetRaw() types.Log { 68 return rEv.Raw 69 } 70 71 //////////////////// type RequestValueTransferEncodedEvent struct //////////////////// 72 type RequestValueTransferEncodedEvent struct { 73 *bridgecontract.BridgeRequestValueTransferEncoded 74 } 75 76 func (rEv RequestValueTransferEncodedEvent) Nonce() uint64 { 77 return rEv.RequestNonce 78 } 79 80 func (rEv RequestValueTransferEncodedEvent) GetTokenType() uint8 { 81 return rEv.TokenType 82 } 83 84 func (rEv RequestValueTransferEncodedEvent) GetFrom() common.Address { 85 return rEv.From 86 } 87 88 func (rEv RequestValueTransferEncodedEvent) GetTo() common.Address { 89 return rEv.To 90 } 91 92 func (rEv RequestValueTransferEncodedEvent) GetTokenAddress() common.Address { 93 return rEv.TokenAddress 94 } 95 96 func (rEv RequestValueTransferEncodedEvent) GetValueOrTokenId() *big.Int { 97 return rEv.ValueOrTokenId 98 } 99 100 func (rEv RequestValueTransferEncodedEvent) GetRequestNonce() uint64 { 101 return rEv.RequestNonce 102 } 103 104 func (rEv RequestValueTransferEncodedEvent) GetFee() *big.Int { 105 return rEv.Fee 106 } 107 108 func (rEv RequestValueTransferEncodedEvent) GetExtraData() []byte { 109 return rEv.ExtraData 110 } 111 112 func (rEv RequestValueTransferEncodedEvent) GetRaw() types.Log { 113 return rEv.Raw 114 }