Skip to content

Commit

Permalink
fix go dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
klim0v committed May 15, 2020
1 parent 53330fc commit 6e4e07c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion transaction/check_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math/big"
)

func ExampleNewCheck_Sign() {
func ExampleNewCheck() {
check := transaction.NewCheck(
480,
transaction.TestNetChainID,
Expand Down
10 changes: 1 addition & 9 deletions transaction/create_multisig_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/MinterTeam/minter-go-sdk/transaction"
)

func ExampleNewCreateMultisigData_Sign() {
func ExampleNewCreateMultisigData() {
data := transaction.NewCreateMultisigData().
MustAddSigData("Mx08d920c5d93dbf23038fe1a54bbb34f41f77677c", 1).
MustAddSigData("Mx772fd5bd06356250e5efe572b6ae615860ee0c17", 3).
Expand All @@ -29,11 +29,3 @@ func ExampleNewCreateMultisigData_Sign() {
// Mxd43eef7b9406762aa031b82ed0b1082264a13934
// 0xf8df0b02018a4d4e54000000000000000cb848f84607c3010305f83f9408d920c5d93dbf23038fe1a54bbb34f41f77677c94772fd5bd06356250e5efe572b6ae615860ee0c17949c7f68ff71b5819c41e8f87cc99bdf6359da3d75b83b4d756c74697369672041646472657373204d78643433656566376239343036373632616130333162383265643062313038323236346131333933348001b845f8431ba00dc74e6b4f1b7e34ff06d106bf1b8d963d1538f55730761a88c4d35784fbccc8a05c758e30e1c535e15688bd1c2b240186485f02199f9e12a159fa06daf462ce15
}

func ExampleDecode_CreateMultisig() {
decode, _ := transaction.Decode("0xf901940b02018a4d4e54000000000000000cb848f84607c3010305f83f9408d920c5d93dbf23038fe1a54bbb34f41f77677c94772fd5bd06356250e5efe572b6ae615860ee0c17949c7f68ff71b5819c41e8f87cc99bdf6359da3d75b8f0616530383962333265346530393736636136383838636231303233313438626431613966316363323863356434343265353265353836373534666634386436332c20396437383839356661393534623262303766623366323964326165396635656230646330653932356136386566383336326534306334376261346164623330632c20376534303839633762363833663162386431383332613865393737636637396161343539626631373066663139363335343131323734373132346262643037322c204d78643433656566376239343036373632616130333162383265643062313038323236346131333933348001b845f8431ba03032390eb7457b987b223128b956e514c9847fda62c01b62672712719cca4edfa013d566aef3ba4729a2075ef0db8217e7ae390699be6bc959541d8d4b372219cf")

address := decode.Data().(*transaction.CreateMultisigData).AddressString()
fmt.Println(address)
// Output: Mxd43eef7b9406762aa031b82ed0b1082264a13934
}
4 changes: 2 additions & 2 deletions transaction/deeplink_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math/big"
)

func ExampleNewDeepLink_NewSendData() {
func ExampleNewDeepLink() {
link, _ := transaction.NewDeepLink(
transaction.NewSendData().
MustSetTo("Mx18467bbb64a8edf890201d526c35957d82be3d95").
Expand All @@ -21,7 +21,7 @@ func ExampleNewDeepLink_NewSendData() {
// -DsBqumKQklQAAAAAAAAAJQYRnu7ZKjt-JAgHVJsNZV9gr49lYgRIhD0do20AItIZWxsbyBXb3JsZICAgA
}

func ExampleNewDeepLink_NewSendData_CreateLink() {
func ExampleNewDeepLink_createLink() {
link, _ := transaction.NewDeepLink(
transaction.NewSendData().
MustSetTo("Mx7633980c000139dd3bd24a3f54e06474fa941e16").
Expand Down
3 changes: 1 addition & 2 deletions transaction/redeem_check_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package transaction_test
import (
"fmt"
"github.com/MinterTeam/minter-go-sdk/transaction"
"testing"
)

func TestTransactionRedeemCheck_Sign(t *testing.T) {
func ExampleNewRedeemCheckData() {
data := transaction.NewRedeemCheckData().
MustSetProof("da021d4f84728e0d3d312a18ec84c21768e0caa12a53cb0a1452771f72b0d1a91770ae139fd6c23bcf8cec50f5f2e733eabb8482cf29ee540e56c6639aac469600").
MustSetRawCheck("Mcf89b01830f423f8a4d4e5400000000000000843b9aca00b8419b3beac2c6ad88a8bd54d24912754bb820e58345731cb1b9bc0885ee74f9e50a58a80aa990a29c98b05541b266af99d3825bb1e5ed4e540c6e2f7c9b40af9ecc011ca00f7ba6d0aa47d74274b960fba02be03158d0374b978dcaa5f56fc7cf1754f821a019a829a3b7bba2fc290f5c96e469851a3876376d6a6a4df937327b3a5e9e8297")
Expand Down

0 comments on commit 6e4e07c

Please sign in to comment.