Skip to content

Commit

Permalink
Merge pull request #94 from multiversx/spica-19-1
Browse files Browse the repository at this point in the history
Define some events (and constants), prepare their handling
  • Loading branch information
andreibancioiu authored Aug 19, 2024
2 parents aa885f7 + 481ac61 commit 4302a04
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
13 changes: 10 additions & 3 deletions server/services/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ var (
transactionProcessingTypeRelayedV1 = "RelayedTx"
transactionProcessingTypeBuiltInFunctionCall = "BuiltInFunctionCall"
transactionProcessingTypeMoveBalance = "MoveBalance"
transactionProcessingTypeContractInvoking = "SCInvoking"

Check failure on line 15 in server/services/constants.go

View workflow job for this annotation

GitHub Actions / golangci linter

`transactionProcessingTypeContractInvoking` is unused (deadcode)
transactionProcessingTypeContractDeployment = "SCDeployment"

Check failure on line 16 in server/services/constants.go

View workflow job for this annotation

GitHub Actions / golangci linter

`transactionProcessingTypeContractDeployment` is unused (deadcode)
amountZero = "0"
builtInFunctionClaimDeveloperRewards = core.BuiltInFunctionClaimDeveloperRewards
builtInFunctionESDTTransfer = core.BuiltInFunctionESDTTransfer
Expand All @@ -20,20 +22,25 @@ var (
sendingValueToNonPayableContractDataPrefix = argumentsSeparator + hex.EncodeToString([]byte("sending value to non payable contract"))
emptyHash = strings.Repeat("0", 64)
nodeVersionForOfflineRosetta = "N / A"
systemContractDeployAddress = "erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu"

Check failure on line 25 in server/services/constants.go

View workflow job for this annotation

GitHub Actions / golangci linter

`systemContractDeployAddress` is unused (deadcode)
nativeAsESDTIdentifier = "EGLD-000000"
)

var (
transactionEventSignalError = core.SignalErrorOperation
transactionEventInternalVMErrors = "internalVMErrors"

Check failure on line 31 in server/services/constants.go

View workflow job for this annotation

GitHub Actions / golangci linter

`transactionEventInternalVMErrors` is unused (deadcode)
transactionEventSCDeploy = core.SCDeployIdentifier

Check failure on line 32 in server/services/constants.go

View workflow job for this annotation

GitHub Actions / golangci linter

`transactionEventSCDeploy` is unused (deadcode)
transactionEventTransferValueOnly = "transferValueOnly"
transactionEventESDTTransfer = "ESDTTransfer"
transactionEventESDTNFTTransfer = "ESDTNFTTransfer"
transactionEventESDTNFTCreate = "ESDTNFTCreate"
transactionEventESDTNFTBurn = "ESDTNFTBurn"
transactionEventESDTNFTAddQuantity = "ESDTNFTAddQuantity"
transactionEventMultiESDTNFTTransfer = "MultiESDTNFTTransfer"
transactionEventESDTLocalBurn = "ESDTLocalBurn"
transactionEventESDTLocalMint = "ESDTLocalMint"
transactionEventESDTWipe = "ESDTWipe"
transactionEventESDTLocalBurn = core.BuiltInFunctionESDTLocalBurn
transactionEventESDTLocalMint = core.BuiltInFunctionESDTLocalMint
transactionEventESDTWipe = core.BuiltInFunctionESDTWipe
transactionEventClaimDeveloperRewards = core.BuiltInFunctionClaimDeveloperRewards

Check failure on line 43 in server/services/constants.go

View workflow job for this annotation

GitHub Actions / golangci linter

`transactionEventClaimDeveloperRewards` is unused (deadcode)
transactionEventTopicInvalidMetaTransaction = "meta transaction is invalid"
transactionEventTopicInvalidMetaTransactionNotEnoughGas = "meta transaction is invalid: not enough gas"
)
Expand Down
16 changes: 16 additions & 0 deletions server/services/transactionEvents.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import (
"math/big"
)

type eventTransferValueOnly struct {
sender string
receiver string
value string
}

type eventESDT struct {
senderAddress string
receiverAddress string
Expand Down Expand Up @@ -48,3 +54,13 @@ func (event *eventESDT) getExtendedIdentifier() string {

return event.identifier
}

type eventSCDeploy struct {

Check failure on line 58 in server/services/transactionEvents.go

View workflow job for this annotation

GitHub Actions / golangci linter

`eventSCDeploy` is unused (deadcode)
contractAddress string
deployerAddress string
}

type eventClaimDeveloperRewards struct {

Check failure on line 63 in server/services/transactionEvents.go

View workflow job for this annotation

GitHub Actions / golangci linter

`eventClaimDeveloperRewards` is unused (deadcode)
value string
receiverAddress string
}

0 comments on commit 4302a04

Please sign in to comment.