Skip to content

Commit

Permalink
update contract v3_2 & deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hvthhien committed May 29, 2024
1 parent 6920e3a commit 0a03bf9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
13 changes: 8 additions & 5 deletions contracts/feralfile-exhibition-v4_2/feralfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Check failure on line 45 in contracts/feralfile-exhibition-v4_2/feralfile.go

View workflow job for this annotation

GitHub Actions / testing-job

struct field erc20Contract has json tag but is not exported
}

if err := json.Unmarshal(arguments, &params); err != nil {
Expand All @@ -66,6 +67,7 @@ func (c *FeralfileExhibitionV4_2Contract) Deploy(
params.ContractURI,
params.SeriesIDs,
params.SeriesMaxSupplies,
params.erc20Contract,
)
if err != nil {
return "", "", err
Expand Down Expand Up @@ -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")
}
Expand Down Expand Up @@ -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, &params); err != nil {
return nil, err
}

return []interface{}{&params.TokenID.Int, params.ImageURI, params.Paramters}, nil
return []interface{}{&params.TokenID.Int, params.ImageURI, params.Paramters, &params.CoinAmount.Int}, nil
default:
return nil, fmt.Errorf("unsupported method")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 2 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 0a03bf9

Please sign in to comment.