From 0a03bf91aefcebac8cd69cafcba2f61283439ae9 Mon Sep 17 00:00:00 2001 From: hvthhien Date: Wed, 29 May 2024 14:04:34 +0700 Subject: [PATCH] update contract v3_2 & deps --- contracts/feralfile-exhibition-v4_2/feralfile.go | 13 ++++++++----- go.mod | 2 +- go.sum | 12 ++---------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/contracts/feralfile-exhibition-v4_2/feralfile.go b/contracts/feralfile-exhibition-v4_2/feralfile.go index c43ffa7..6e60864 100644 --- a/contracts/feralfile-exhibition-v4_2/feralfile.go +++ b/contracts/feralfile-exhibition-v4_2/feralfile.go @@ -42,6 +42,7 @@ func (c *FeralfileExhibitionV4_2Contract) Deploy( IsBridgeable bool `json:"is_bridgeable"` SeriesIDs []*big.Int `json:"series_ids"` SeriesMaxSupplies []*big.Int `json:"series_max_supplies"` + erc20Contract common.Address `json:"erc20_contract"` } if err := json.Unmarshal(arguments, ¶ms); err != nil { @@ -66,6 +67,7 @@ func (c *FeralfileExhibitionV4_2Contract) Deploy( params.ContractURI, params.SeriesIDs, params.SeriesMaxSupplies, + params.erc20Contract, ) if err != nil { return "", "", err @@ -211,7 +213,7 @@ func (c *FeralfileExhibitionV4_2Contract) Call( return nil, errors.New("Invalid parameters") } - return contract.UpdateTokenInformation(t, params[0].(*big.Int), params[1].(string), params[2].([]byte)) + return contract.UpdateTokenInformation(t, params[0].(*big.Int), params[1].(string), params[2].([]byte), params[3].(*big.Int)) default: return nil, fmt.Errorf("unsupported method") } @@ -397,15 +399,16 @@ func (c *FeralfileExhibitionV4_2Contract) Parse( return []interface{}{params.AdvanceAddresses, advanceAmounts}, nil case "updateTokenInformation": var params struct { - TokenID ethereum.BigInt `json:"token_id"` - ImageURI string `json:"image_uri"` - Paramters []byte `json:"parameters"` + TokenID ethereum.BigInt `json:"token_id"` + ImageURI string `json:"image_uri"` + Paramters []byte `json:"parameters"` + CoinAmount ethereum.BigInt `json:"coin_amount"` } if err := json.Unmarshal(arguments, ¶ms); err != nil { return nil, err } - return []interface{}{¶ms.TokenID.Int, params.ImageURI, params.Paramters}, nil + return []interface{}{¶ms.TokenID.Int, params.ImageURI, params.Paramters, ¶ms.CoinAmount.Int}, nil default: return nil, fmt.Errorf("unsupported method") } diff --git a/go.mod b/go.mod index b2c900c..23ccdd1 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/bitmark-inc/account-vault-ethereum go 1.20 require ( - github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240528023335-544afe01e9f3 + github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240529042939-0b6972bb280b github.com/ethereum/go-ethereum v1.13.10 github.com/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 96ee870..4edb89c 100644 --- a/go.sum +++ b/go.sum @@ -63,16 +63,8 @@ github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240523083611-11a8480de376 h1:+Whj98ezo1eSt8OWl7qnWNIKdp2Xd5zWAEw+hS1wUhk= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240523083611-11a8480de376/go.mod h1:shvtsuJyQJnByXKqf9n/jpjL4++FSJCFjXR/08iBnFY= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240523090831-3bbdf4f223a1 h1:DDUWcIvqkpMPCvJqUskpPCmbY1kdfNysjjU18zRym40= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240523090831-3bbdf4f223a1/go.mod h1:shvtsuJyQJnByXKqf9n/jpjL4++FSJCFjXR/08iBnFY= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240524032905-a9cb9b876fba h1:DK0sqy5xmj8E01Vayt5FSCaDefrBmLUc3uNTLgp9sMc= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240524032905-a9cb9b876fba/go.mod h1:shvtsuJyQJnByXKqf9n/jpjL4++FSJCFjXR/08iBnFY= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240524095144-3bd3a71417e9 h1:GLVv5hYMmGwqQpJOasDz9kMhDyCpafKRK8J/khQs/fY= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240524095144-3bd3a71417e9/go.mod h1:shvtsuJyQJnByXKqf9n/jpjL4++FSJCFjXR/08iBnFY= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240528023335-544afe01e9f3 h1:IrqDO0r3590aIVYOKlmE2OtSZRlhUGDSF4neCBFknaY= -github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240528023335-544afe01e9f3/go.mod h1:shvtsuJyQJnByXKqf9n/jpjL4++FSJCFjXR/08iBnFY= +github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240529042939-0b6972bb280b h1:+8cGdcQknU4nX430a9qgBvgBH1oeUMsnD46ubszByx4= +github.com/bitmark-inc/feralfile-exhibition-smart-contract/go-binding v0.0.0-20240529042939-0b6972bb280b/go.mod h1:shvtsuJyQJnByXKqf9n/jpjL4++FSJCFjXR/08iBnFY= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=