-
Notifications
You must be signed in to change notification settings - Fork 1
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 #27 from mirrorworld-universe/aide
Update proto/hypergridssn/tx.proto and docs/static/openapi.yml to rem…
- Loading branch information
Showing
10 changed files
with
351 additions
and
350 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,54 @@ | ||
package tools | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/davecgh/go-spew/spew" | ||
) | ||
|
||
func TestSendTxFeeSettlement(t *testing.T) { | ||
// FromId := uint64(1) | ||
// EndID := uint64(100) | ||
// bills := map[string]uint64{ | ||
// "EyYFxQ2FRcSkR8rdvefEDNy69KWHi2xTzbuVKxuBVueS": 100, | ||
// "AzVnQCpY2rqQmxJz6PQzxWj9HHQQc5qFuL89wvov6cL4": 101, | ||
// } | ||
|
||
// sig, err := SendTxFeeSettlement("http://localhost:8899", []string{"AzVnQCpY2rqQmxJz6PQzxWj9HHQQc5qFuL89wvov6cL4"}, FromId, EndID, bills) | ||
// if err != nil { | ||
// panic(err) | ||
// } | ||
// spew.Dump(sig) | ||
|
||
sig, key, err := SendTxInbox("https://api.devnet.solana.com", 53893, "2YmCa9RBVN9CZjAcN3o431UhTEU8BwmaiGoCnbeK1Sgr") | ||
if err != nil { | ||
panic(err) | ||
} | ||
spew.Dump(sig) | ||
spew.Dump(key) | ||
|
||
// Bills := []SettlementBillParam{} | ||
// // convert bills to []SettlementBillParam | ||
// for key, value := range bills { | ||
// Bills = append(Bills, SettlementBillParam{ | ||
// Key: solana.MustPublicKeyFromBase58(key), | ||
// Amount: value, | ||
// }) | ||
// } | ||
|
||
// instructionData := SettleFeeBillParams{ | ||
// Instruction: 1, | ||
// FromID: FromId, | ||
// EndID: EndID, | ||
// Bills: Bills, | ||
// } | ||
|
||
// // Serialize to bytes using Borsh | ||
// // serializedData, err := borsh.Serialize(instructionData) | ||
// serializedData, err := instructionData.BorshEncode() | ||
// if err != nil { | ||
// panic(err) | ||
// } | ||
|
||
// println("serializedData", serializedData) | ||
} |
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
Oops, something went wrong.