Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: L1 NFT attributes #3474

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions contracts/wasm/corecontracts/test/core_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func TestAccountNFTAmountInCollection(t *testing.T) {
"text/html",
"https://my-awesome-nft-project.com",
"a string that is longer than 32 bytes",
`[{"trait_type": "collection", "value": "super"}]`,
[]interface{}{`{"trait_type": "collection", "value": "super"}`},
)

collection, collectionInfo, err := ctx.Chain.Env.MintNFTL1(collectionOwner, collectionOwnerAddr, collectionMetadata.Bytes())
Expand All @@ -318,13 +318,13 @@ func TestAccountNFTAmountInCollection(t *testing.T) {
"application/json",
"https://my-awesome-nft-project.com/1.json",
"nft1",
`[{"trait_type": "Foo", "value": "Bar"}]`,
[]interface{}{`{"trait_type": "Foo", "value": "Bar"}`},
),
isc.NewIRC27NFTMetadata(
"application/json",
"https://my-awesome-nft-project.com/2.json",
"nft2",
`[{"trait_type": "Bar", "value": "Baz"}]`,
[]interface{}{`{"trait_type": "Bar", "value": "Baz"}`},
),
}
nftNum := len(nftMetadatas)
Expand Down Expand Up @@ -380,7 +380,7 @@ func TestAccountNFTsInCollection(t *testing.T) {
"text/html",
"https://my-awesome-nft-project.com",
"a string that is longer than 32 bytes",
`[{"trait_type": "collection", "value": "super"}]`,
[]interface{}{`{"trait_type": "collection", "value": "super"}`},
)

collection, collectionInfo, err := ctx.Chain.Env.MintNFTL1(collectionOwner, collectionOwnerAddr, collectionMetadata.Bytes())
Expand All @@ -391,13 +391,13 @@ func TestAccountNFTsInCollection(t *testing.T) {
"application/json",
"https://my-awesome-nft-project.com/1.json",
"nft1",
`[{"trait_type": "Foo", "value": "Bar"}]`,
[]interface{}{`{"trait_type": "Foo", "value": "Bar"}`},
),
isc.NewIRC27NFTMetadata(
"application/json",
"https://my-awesome-nft-project.com/2.json",
"nft2",
`[{"trait_type": "Bar", "value": "Baz"}]`,
[]interface{}{`{"trait_type": "Bar", "value": "Baz"}`},
),
}
nftNum := len(nftMetadatas)
Expand Down
2 changes: 1 addition & 1 deletion packages/evm/evmtest/ERC20Example.bin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6080604052348015600e575f80fd5b50610ce18061001c5f395ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c80634deefc5a1461004e578063afc1cf661461006a578063b231b87d14610086578063c066591e146100a2575b5f80fd5b61006860048036038101906100639190610498565b6100be565b005b610084600480360381019061007f9190610648565b61018a565b005b6100a0600480360381019061009b9190610498565b610229565b005b6100bc60048036038101906100b791906106e4565b6102c2565b005b6100c66103cf565b8281604001818152505073107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166367d52f6d8261010a85610397565b6040518363ffffffff1660e01b8152600401610127929190610a92565b6020604051808303815f875af1158015610143573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101679190610af9565b5f806101000a81548163ffffffff021916908363ffffffff160217905550505050565b73107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f4f50c425f8054906101000a900463ffffffff168686866101d687610397565b6040518663ffffffff1660e01b81526004016101f6959493929190610b94565b5f604051808303815f87803b15801561020d575f80fd5b505af115801561021f573d5f803e3d5ffd5b5050505050505050565b73107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16638adfedc75f8054906101000a900463ffffffff168461027385610397565b6040518463ffffffff1660e01b815260040161029193929190610c09565b5f604051808303815f87803b1580156102a8575f80fd5b505af11580156102ba573d5f803e3d5ffd5b505050505050565b6102ca6103cf565b8281604001818152505073107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634af8bc528787878561031188610397565b6040518663ffffffff1660e01b8152600401610331959493929190610c45565b6020604051808303815f875af115801561034d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103719190610af9565b5f806101000a81548163ffffffff021916908363ffffffff160217905550505050505050565b61039f6103ed565b6103a76103ed565b82815f019067ffffffffffffffff16908167ffffffffffffffff168152505080915050919050565b60405180606001604052805f81526020015f81526020015f81525090565b60405180606001604052805f67ffffffffffffffff16815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61043a81610428565b8114610444575f80fd5b50565b5f8135905061045581610431565b92915050565b5f67ffffffffffffffff82169050919050565b6104778161045b565b8114610481575f80fd5b50565b5f813590506104928161046e565b92915050565b5f80604083850312156104ae576104ad610420565b5b5f6104bb85828601610447565b92505060206104cc85828601610484565b9150509250929050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610524826104de565b810181811067ffffffffffffffff82111715610543576105426104ee565b5b80604052505050565b5f610555610417565b9050610561828261051b565b919050565b5f67ffffffffffffffff8211156105805761057f6104ee565b5b610589826104de565b9050602081019050919050565b828183375f83830152505050565b5f6105b66105b184610566565b61054c565b9050828152602081018484840111156105d2576105d16104da565b5b6105dd848285610596565b509392505050565b5f82601f8301126105f9576105f86104d6565b5b81356106098482602086016105a4565b91505092915050565b5f60ff82169050919050565b61062781610612565b8114610631575f80fd5b50565b5f813590506106428161061e565b92915050565b5f805f80608085870312156106605761065f610420565b5b5f85013567ffffffffffffffff81111561067d5761067c610424565b5b610689878288016105e5565b945050602085013567ffffffffffffffff8111156106aa576106a9610424565b5b6106b6878288016105e5565b93505060406106c787828801610634565b92505060606106d887828801610484565b91505092959194509250565b5f805f805f60a086880312156106fd576106fc610420565b5b5f86013567ffffffffffffffff81111561071a57610719610424565b5b610726888289016105e5565b955050602086013567ffffffffffffffff81111561074757610746610424565b5b610753888289016105e5565b945050604061076488828901610634565b935050606061077588828901610447565b925050608061078688828901610484565b9150509295509295909350565b61079c81610428565b82525050565b606082015f8201516107b65f850182610793565b5060208201516107c96020850182610793565b5060408201516107dc6040850182610793565b50505050565b6107eb8161045b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f61084c8261081a565b6108568185610824565b9350610866818560208601610834565b61086f816104de565b840191505092915050565b5f602083015f8301518482035f8601526108948282610842565b9150508091505092915050565b5f604083015f8301518482035f8601526108bb828261087a565b91505060208301516108d06020860182610793565b508091505092915050565b5f6108e683836108a1565b905092915050565b5f602082019050919050565b5f610904826107f1565b61090e81856107fb565b9350836020820285016109208561080b565b805f5b8581101561095b578484038952815161093c85826108db565b9450610947836108ee565b925060208a01995050600181019050610923565b50829750879550505050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b5f6109a982610996565b9050919050565b6109b98161099f565b82525050565b5f6109ca83836109b0565b60208301905092915050565b5f602082019050919050565b5f6109ec8261096d565b6109f68185610977565b9350610a0183610987565b805f5b83811015610a31578151610a1888826109bf565b9750610a23836109d6565b925050600181019050610a04565b5085935050505092915050565b5f606083015f830151610a535f8601826107e2565b5060208301518482036020860152610a6b82826108fa565b91505060408301518482036040860152610a8582826109e2565b9150508091505092915050565b5f608082019050610aa55f8301856107a2565b8181036060830152610ab78184610a3e565b90509392505050565b5f63ffffffff82169050919050565b610ad881610ac0565b8114610ae2575f80fd5b50565b5f81519050610af381610acf565b92915050565b5f60208284031215610b0e57610b0d610420565b5b5f610b1b84828501610ae5565b91505092915050565b610b2d81610ac0565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610b5782610b33565b610b618185610b3d565b9350610b71818560208601610834565b610b7a816104de565b840191505092915050565b610b8e81610612565b82525050565b5f60a082019050610ba75f830188610b24565b8181036020830152610bb98187610b4d565b90508181036040830152610bcd8186610b4d565b9050610bdc6060830185610b85565b8181036080830152610bee8184610a3e565b90509695505050505050565b610c0381610428565b82525050565b5f606082019050610c1c5f830186610b24565b610c296020830185610bfa565b8181036040830152610c3b8184610a3e565b9050949350505050565b5f60e0820190508181035f830152610c5d8188610b4d565b90508181036020830152610c718187610b4d565b9050610c806040830186610b85565b610c8d60608301856107a2565b81810360c0830152610c9f8184610a3e565b9050969550505050505056fea264697066735822122087d500930528b4ca930a01970783d2eabf464e34badd7380c2a92ffcb5da7de064736f6c634300081a0033
6080604052348015600e575f80fd5b50610ce18061001c5f395ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c80634deefc5a1461004e578063afc1cf661461006a578063b231b87d14610086578063c066591e146100a2575b5f80fd5b61006860048036038101906100639190610498565b6100be565b005b610084600480360381019061007f9190610648565b61018a565b005b6100a0600480360381019061009b9190610498565b610229565b005b6100bc60048036038101906100b791906106e4565b6102c2565b005b6100c66103cf565b8281604001818152505073107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166367d52f6d8261010a85610397565b6040518363ffffffff1660e01b8152600401610127929190610a92565b6020604051808303815f875af1158015610143573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101679190610af9565b5f806101000a81548163ffffffff021916908363ffffffff160217905550505050565b73107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f4f50c425f8054906101000a900463ffffffff168686866101d687610397565b6040518663ffffffff1660e01b81526004016101f6959493929190610b94565b5f604051808303815f87803b15801561020d575f80fd5b505af115801561021f573d5f803e3d5ffd5b5050505050505050565b73107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16638adfedc75f8054906101000a900463ffffffff168461027385610397565b6040518463ffffffff1660e01b815260040161029193929190610c09565b5f604051808303815f87803b1580156102a8575f80fd5b505af11580156102ba573d5f803e3d5ffd5b505050505050565b6102ca6103cf565b8281604001818152505073107400000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634af8bc528787878561031188610397565b6040518663ffffffff1660e01b8152600401610331959493929190610c45565b6020604051808303815f875af115801561034d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103719190610af9565b5f806101000a81548163ffffffff021916908363ffffffff160217905550505050505050565b61039f6103ed565b6103a76103ed565b82815f019067ffffffffffffffff16908167ffffffffffffffff168152505080915050919050565b60405180606001604052805f81526020015f81526020015f81525090565b60405180606001604052805f67ffffffffffffffff16815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61043a81610428565b8114610444575f80fd5b50565b5f8135905061045581610431565b92915050565b5f67ffffffffffffffff82169050919050565b6104778161045b565b8114610481575f80fd5b50565b5f813590506104928161046e565b92915050565b5f80604083850312156104ae576104ad610420565b5b5f6104bb85828601610447565b92505060206104cc85828601610484565b9150509250929050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610524826104de565b810181811067ffffffffffffffff82111715610543576105426104ee565b5b80604052505050565b5f610555610417565b9050610561828261051b565b919050565b5f67ffffffffffffffff8211156105805761057f6104ee565b5b610589826104de565b9050602081019050919050565b828183375f83830152505050565b5f6105b66105b184610566565b61054c565b9050828152602081018484840111156105d2576105d16104da565b5b6105dd848285610596565b509392505050565b5f82601f8301126105f9576105f86104d6565b5b81356106098482602086016105a4565b91505092915050565b5f60ff82169050919050565b61062781610612565b8114610631575f80fd5b50565b5f813590506106428161061e565b92915050565b5f805f80608085870312156106605761065f610420565b5b5f85013567ffffffffffffffff81111561067d5761067c610424565b5b610689878288016105e5565b945050602085013567ffffffffffffffff8111156106aa576106a9610424565b5b6106b6878288016105e5565b93505060406106c787828801610634565b92505060606106d887828801610484565b91505092959194509250565b5f805f805f60a086880312156106fd576106fc610420565b5b5f86013567ffffffffffffffff81111561071a57610719610424565b5b610726888289016105e5565b955050602086013567ffffffffffffffff81111561074757610746610424565b5b610753888289016105e5565b945050604061076488828901610634565b935050606061077588828901610447565b925050608061078688828901610484565b9150509295509295909350565b61079c81610428565b82525050565b606082015f8201516107b65f850182610793565b5060208201516107c96020850182610793565b5060408201516107dc6040850182610793565b50505050565b6107eb8161045b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f61084c8261081a565b6108568185610824565b9350610866818560208601610834565b61086f816104de565b840191505092915050565b5f602083015f8301518482035f8601526108948282610842565b9150508091505092915050565b5f604083015f8301518482035f8601526108bb828261087a565b91505060208301516108d06020860182610793565b508091505092915050565b5f6108e683836108a1565b905092915050565b5f602082019050919050565b5f610904826107f1565b61090e81856107fb565b9350836020820285016109208561080b565b805f5b8581101561095b578484038952815161093c85826108db565b9450610947836108ee565b925060208a01995050600181019050610923565b50829750879550505050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b5f6109a982610996565b9050919050565b6109b98161099f565b82525050565b5f6109ca83836109b0565b60208301905092915050565b5f602082019050919050565b5f6109ec8261096d565b6109f68185610977565b9350610a0183610987565b805f5b83811015610a31578151610a1888826109bf565b9750610a23836109d6565b925050600181019050610a04565b5085935050505092915050565b5f606083015f830151610a535f8601826107e2565b5060208301518482036020860152610a6b82826108fa565b91505060408301518482036040860152610a8582826109e2565b9150508091505092915050565b5f608082019050610aa55f8301856107a2565b8181036060830152610ab78184610a3e565b90509392505050565b5f63ffffffff82169050919050565b610ad881610ac0565b8114610ae2575f80fd5b50565b5f81519050610af381610acf565b92915050565b5f60208284031215610b0e57610b0d610420565b5b5f610b1b84828501610ae5565b91505092915050565b610b2d81610ac0565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610b5782610b33565b610b618185610b3d565b9350610b71818560208601610834565b610b7a816104de565b840191505092915050565b610b8e81610612565b82525050565b5f60a082019050610ba75f830188610b24565b8181036020830152610bb98187610b4d565b90508181036040830152610bcd8186610b4d565b9050610bdc6060830185610b85565b8181036080830152610bee8184610a3e565b90509695505050505050565b610c0381610428565b82525050565b5f606082019050610c1c5f830186610b24565b610c296020830185610bfa565b8181036040830152610c3b8184610a3e565b9050949350505050565b5f60e0820190508181035f830152610c5d8188610b4d565b90508181036020830152610c718187610b4d565b9050610c806040830186610b85565b610c8d60608301856107a2565b81810360c0830152610c9f8184610a3e565b9050969550505050505056fea2646970667358221220fe0a0c0353c84c7ca7a1239e8c41186f9b5bf812bdd1483f44b15e6f4a5d4a2264736f6c634300081a0033
2 changes: 1 addition & 1 deletion packages/evm/evmtest/ISCTest.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/evm/evmtest/SelfDestruct6780.bin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6080604052348015600e575f80fd5b5061010e8061001c5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063bcfb195914602a575b5f80fd5b60406004803603810190603c919060b2565b6042565b005b8073ffffffffffffffffffffffffffffffffffffffff16ff5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f608682605f565b9050919050565b609481607e565b8114609d575f80fd5b50565b5f8135905060ac81608d565b92915050565b5f6020828403121560c45760c3605b565b5b5f60cf8482850160a0565b9150509291505056fea2646970667358221220c545e030768d61daa0411c6fc386c0dafc130882b06268fed99feec06c2aa12064736f6c634300081a0033
6080604052348015600e575f80fd5b5061010e8061001c5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063bcfb195914602a575b5f80fd5b60406004803603810190603c919060b2565b6042565b005b8073ffffffffffffffffffffffffffffffffffffffff16ff5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f608682605f565b9050919050565b609481607e565b8114609d575f80fd5b50565b5f8135905060ac81608d565b92915050565b5f6020828403121560c45760c3605b565b5b5f60cf8482850160a0565b9150509291505056fea2646970667358221220620f1712e103636cea06552d4318eaebfa9d20b5c50fbd6fc580405a558f9fad64736f6c634300081a0033
Loading
Loading