Skip to content

Commit

Permalink
include old register node transaction for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Oct 18, 2024
1 parent 68136ec commit ea2ba5a
Show file tree
Hide file tree
Showing 6 changed files with 393 additions and 33 deletions.
76 changes: 69 additions & 7 deletions lib/go/templates/cmd/manifest/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ func generateManifest(env templates.Environment) *manifest {
m.addTemplate(generateTemplate(
"SCO.03", "Register Node",
env,
templates.GenerateCollectionRegisterNode,
templates.GenerateCollectionRegisterNodeOld,
[]argument{
{
Type: "String",
Expand Down Expand Up @@ -478,12 +478,6 @@ func generateManifest(env templates.Environment) *manifest {
Label: "Staking Key",
SampleValues: []cadenceValue{sampleStakingKey},
},
{
Type: "String",
Name: "stakingKeyPoP",
Label: "Staking Key PoP",
SampleValues: []cadenceValue{sampleStakingKeyPoP},
},
{
Type: "UFix64",
Name: "amount",
Expand Down Expand Up @@ -840,6 +834,74 @@ func generateManifest(env templates.Environment) *manifest {
},
))

m.addTemplate(generateTemplate(
"SCO.17", "Register Node with PoP",
env,
templates.GenerateCollectionRegisterNode,
[]argument{
{
Type: "String",
Name: "id",
Label: "Node ID",
SampleValues: []cadenceValue{sampleNodeID},
},
{
Type: "UInt8",
Name: "role",
Label: "Node Role",
SampleValues: []cadenceValue{sampleNodeRole},
},
{
Type: "String",
Name: "networkingAddress",
Label: "Networking Address",
SampleValues: []cadenceValue{sampleNetworkingAddress},
},
{
Type: "String",
Name: "networkingKey",
Label: "Networking Key",
SampleValues: []cadenceValue{sampleNetworkingKey},
},
{
Type: "String",
Name: "stakingKey",
Label: "Staking Key",
SampleValues: []cadenceValue{sampleStakingKey},
},
{
Type: "String",
Name: "stakingKeyPoP",
Label: "Staking Key PoP",
SampleValues: []cadenceValue{sampleStakingKeyPoP},
},
{
Type: "UFix64",
Name: "amount",
Label: "Amount",
SampleValues: []cadenceValue{sampleAmount},
},
{
Type: "String",
Name: "machineAccountKey",
Label: "Machine Account Public Key",
SampleValues: []cadenceValue{sampleKey},
},
{
Type: "UInt8",
Name: "machineAccountKeySignatureAlgorithm",
Label: "Raw Value for Machine Account Signature Algorithm Enum",
SampleValues: []cadenceValue{sampleSigAlgoEnumRawValue},
},
{
Type: "UInt8",
Name: "machineAccountKeyHashAlgorithm",
Label: "Raw Value for Machine Account Hash Algorithm Enum",
SampleValues: []cadenceValue{sampleHashAlgoEnumRawValue},
},
},
))

return m
}

Expand Down
23 changes: 23 additions & 0 deletions lib/go/templates/internal/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ea2ba5a

Please sign in to comment.