Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define some events (and constants), prepare their handling #94

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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"

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

View workflow job for this annotation

GitHub Actions / golangci linter

`transactionEventTransferValueOnly` is unused (deadcode)
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 @@
"math/big"
)

type eventTransferValueOnly struct {

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

View workflow job for this annotation

GitHub Actions / golangci linter

`eventTransferValueOnly` is unused (deadcode)
sender string
receiver string
value string
}

type eventESDT struct {
senderAddress string
receiverAddress string
Expand Down Expand Up @@ -48,3 +54,13 @@

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
}
Loading