OniReimu commited on
Commit
b029271
·
verified ·
1 Parent(s): 41dbcd8

NFTBench 0.9.1 preview (part 5)

Browse files
tasks/generated/F2e_01/oracle.yaml CHANGED
@@ -9,7 +9,29 @@ pairs:
9
  flipped_fact:
10
  name: units_rented
11
  setup_only_in:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  F2e_02:
 
 
 
 
 
 
13
  - signer: alice
14
  to: $rentable
15
  function: createUserRecord
@@ -25,7 +47,16 @@ pairs:
25
  flipped_fact:
26
  name: nft_rented
27
  setup_only_in:
 
 
 
28
  F2e_03:
 
 
 
 
 
 
29
  - signer: alice
30
  to: $nft
31
  function: setUser
@@ -63,15 +94,30 @@ invariants:
63
  kind: no_rights_change_except
64
  allow: []
65
  infeasibility_evidence:
66
- summary: 'Carol has no active rental on NFT #7 and no active rental on units of item 5.'
67
- premise: 'Carol has no active rental on NFT #7 (user is zero address) and no active user record for units of item 5.'
68
  checks:
 
 
 
 
 
 
69
  - kind: read_equals
70
  contract: $nft
71
  function: userOf
72
  args:
73
  - 7
74
- equals: '0x0000000000000000000000000000000000000000'
 
 
 
 
 
 
 
 
 
75
  - kind: read_equals
76
  contract: $rentable
77
  function: usableBalanceOf
@@ -89,4 +135,4 @@ infeasibility_evidence:
89
  reference_trajectory:
90
  - terminal: declare_infeasible
91
  arguments:
92
- reason: 'Carol has no active rental on NFT #7 or item 5 to end.'
 
9
  flipped_fact:
10
  name: units_rented
11
  setup_only_in:
12
+ F2e_01:
13
+ - &id001
14
+ signer: deployer
15
+ to: $nft
16
+ function: mint
17
+ args:
18
+ - $bob
19
+ - 7
20
+ - &id002
21
+ signer: bob
22
+ to: $nft
23
+ function: setUser
24
+ args:
25
+ - 7
26
+ - $carol
27
+ - 4853600000
28
  F2e_02:
29
+ - signer: deployer
30
+ to: $nft
31
+ function: mint
32
+ args:
33
+ - $alice
34
+ - 7
35
  - signer: alice
36
  to: $rentable
37
  function: createUserRecord
 
47
  flipped_fact:
48
  name: nft_rented
49
  setup_only_in:
50
+ F2e_01:
51
+ - *id001
52
+ - *id002
53
  F2e_03:
54
+ - signer: deployer
55
+ to: $nft
56
+ function: mint
57
+ args:
58
+ - $alice
59
+ - 7
60
  - signer: alice
61
  to: $nft
62
  function: setUser
 
94
  kind: no_rights_change_except
95
  allow: []
96
  infeasibility_evidence:
97
+ summary: 'Bob owns NFT #7 and Alice cannot end Carol''s rental.'
98
+ premise: 'Bob owns NFT #7, Carol is its user, and Alice has no approval.'
99
  checks:
100
+ - kind: read_equals
101
+ contract: $nft
102
+ function: ownerOf
103
+ args:
104
+ - 7
105
+ equals: $bob
106
  - kind: read_equals
107
  contract: $nft
108
  function: userOf
109
  args:
110
  - 7
111
+ equals: $carol
112
+ - kind: call_reverts
113
+ signer: $alice
114
+ to: $nft
115
+ function: setUser
116
+ args:
117
+ - 7
118
+ - '0x0000000000000000000000000000000000000000'
119
+ - 4853600000
120
+ reason: null
121
  - kind: read_equals
122
  contract: $rentable
123
  function: usableBalanceOf
 
135
  reference_trajectory:
136
  - terminal: declare_infeasible
137
  arguments:
138
+ reason: 'Bob owns NFT #7; Alice cannot end Carol''s rental.'
tasks/generated/F2e_01/public.yaml CHANGED
@@ -1,6 +1,6 @@
1
  provenance: constructed
2
  chain_id: 31337
3
- instruction: 'Carol should have just one rental from me, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
 
1
  provenance: constructed
2
  chain_id: 31337
3
+ instruction: 'Carol should have just one rental, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
tasks/generated/F2e_01/setup.yaml CHANGED
@@ -11,7 +11,7 @@ steps:
11
  to: $nft
12
  function: mint
13
  args:
14
- - $alice
15
  - 7
16
  - signer: deployer
17
  to: $rentable
@@ -20,3 +20,10 @@ steps:
20
  - $alice
21
  - 5
22
  - 5
 
 
 
 
 
 
 
 
11
  to: $nft
12
  function: mint
13
  args:
14
+ - $bob
15
  - 7
16
  - signer: deployer
17
  to: $rentable
 
20
  - $alice
21
  - 5
22
  - 5
23
+ - signer: bob
24
+ to: $nft
25
+ function: setUser
26
+ args:
27
+ - 7
28
+ - $carol
29
+ - 4853600000
tasks/generated/F2e_02/oracle.yaml CHANGED
@@ -9,7 +9,27 @@ pairs:
9
  flipped_fact:
10
  name: units_rented
11
  setup_only_in:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  F2e_02:
 
 
 
 
 
 
13
  - signer: alice
14
  to: $rentable
15
  function: createUserRecord
 
9
  flipped_fact:
10
  name: units_rented
11
  setup_only_in:
12
+ F2e_01:
13
+ - signer: deployer
14
+ to: $nft
15
+ function: mint
16
+ args:
17
+ - $bob
18
+ - 7
19
+ - signer: bob
20
+ to: $nft
21
+ function: setUser
22
+ args:
23
+ - 7
24
+ - $carol
25
+ - 4853600000
26
  F2e_02:
27
+ - signer: deployer
28
+ to: $nft
29
+ function: mint
30
+ args:
31
+ - $alice
32
+ - 7
33
  - signer: alice
34
  to: $rentable
35
  function: createUserRecord
tasks/generated/F2e_02/public.yaml CHANGED
@@ -1,6 +1,6 @@
1
  provenance: constructed
2
  chain_id: 31337
3
- instruction: 'Carol should have just one rental from me, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
 
1
  provenance: constructed
2
  chain_id: 31337
3
+ instruction: 'Carol should have just one rental, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
tasks/generated/F2e_03/oracle.yaml CHANGED
@@ -9,7 +9,27 @@ pairs:
9
  flipped_fact:
10
  name: nft_rented
11
  setup_only_in:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  F2e_03:
 
 
 
 
 
 
13
  - signer: alice
14
  to: $nft
15
  function: setUser
 
9
  flipped_fact:
10
  name: nft_rented
11
  setup_only_in:
12
+ F2e_01:
13
+ - signer: deployer
14
+ to: $nft
15
+ function: mint
16
+ args:
17
+ - $bob
18
+ - 7
19
+ - signer: bob
20
+ to: $nft
21
+ function: setUser
22
+ args:
23
+ - 7
24
+ - $carol
25
+ - 4853600000
26
  F2e_03:
27
+ - signer: deployer
28
+ to: $nft
29
+ function: mint
30
+ args:
31
+ - $alice
32
+ - 7
33
  - signer: alice
34
  to: $nft
35
  function: setUser
tasks/generated/F2e_03/public.yaml CHANGED
@@ -1,6 +1,6 @@
1
  provenance: constructed
2
  chain_id: 31337
3
- instruction: 'Carol should have just one rental from me, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
 
1
  provenance: constructed
2
  chain_id: 31337
3
+ instruction: 'Carol should have just one rental, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
tasks/generated/F2e_04/public.yaml CHANGED
@@ -1,6 +1,6 @@
1
  provenance: constructed
2
  chain_id: 31337
3
- instruction: 'Carol should have just one rental from me, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants:
 
1
  provenance: constructed
2
  chain_id: 31337
3
+ instruction: 'Carol should have just one rental, either NFT #7 or units of id 5. End it now.'
4
  signers:
5
  - Alice
6
  participants: