Skip to content

Commit

Permalink
Revert "#13 [Feature Request] Account::deposit(address, token) auto c…
Browse files Browse the repository at this point in the history
…reate a… (#14)"

This reverts commit 88061e9.
  • Loading branch information
nkysg committed Mar 2, 2023
1 parent 76b6699 commit 9e6b9c8
Show file tree
Hide file tree
Showing 31 changed files with 57 additions and 62 deletions.
5 changes: 0 additions & 5 deletions sources/Account.move
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,6 @@ module Account {
to_deposit: Token<TokenType>,
metadata: vector<u8>,
) acquires Account, Balance, AutoAcceptToken {

if (!exists_at(receiver)) {
create_account_with_address<TokenType>(receiver);
};

try_accept_token<TokenType>(receiver);

let deposit_value = Token::value(&to_deposit);
Expand Down
6 changes: 3 additions & 3 deletions spectests/account/basic.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 14 tasks

task 5 'run'. lines 30-41:
{
"gas_used": 122853,
"gas_used": 119542,
"status": {
"Keep": "Executed"
}
Expand Down Expand Up @@ -54,7 +54,7 @@ task 8 'run'. lines 76-95:

task 9 'run'. lines 98-110:
{
"gas_used": 137925,
"gas_used": 134614,
"status": {
"Keep": "Executed"
}
Expand Down Expand Up @@ -86,7 +86,7 @@ task 12 'run'. lines 138-147:

task 13 'run'. lines 150-159:
{
"gas_used": 52949,
"gas_used": 49638,
"status": {
"Keep": "Executed"
}
Expand Down
4 changes: 2 additions & 2 deletions spectests/account/deposit_zero_token.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ processed 4 tasks

task 2 'run'. lines 6-16:
{
"gas_used": 45962,
"gas_used": 42651,
"status": {
"Keep": "Executed"
}
}

task 3 'run'. lines 19-30:
{
"gas_used": 31287,
"gas_used": 27976,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/account/txn_prologue_and_epilogue.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 12 tasks

task 3 'run'. lines 8-23:
{
"gas_used": 414589,
"gas_used": 411278,
"status": {
"Keep": "Executed"
}
Expand Down
8 changes: 4 additions & 4 deletions spectests/account/withdraw_capability.exp
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,31 @@ task 7 'run'. lines 58-73:

task 8 'run'. lines 76-88:
{
"gas_used": 122853,
"gas_used": 119542,
"status": {
"Keep": "Executed"
}
}

task 9 'run'. lines 91-103:
{
"gas_used": 141869,
"gas_used": 138558,
"status": {
"Keep": "Executed"
}
}

task 10 'run'. lines 106-117:
{
"gas_used": 96005,
"gas_used": 92694,
"status": {
"Keep": "Executed"
}
}

task 11 'run'. lines 120-132:
{
"gas_used": 130053,
"gas_used": 126742,
"status": {
"Keep": "Executed"
}
Expand Down
10 changes: 5 additions & 5 deletions spectests/block_reward/basic.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 12 tasks

task 3 'run'. lines 7-21:
{
"gas_used": 202879,
"gas_used": 199568,
"status": {
"Keep": "Executed"
}
Expand Down Expand Up @@ -54,23 +54,23 @@ task 6 'run'. lines 61-76:

task 7 'run'. lines 80-96:
{
"gas_used": 517856,
"gas_used": 514545,
"status": {
"Keep": "Executed"
}
}

task 8 'run'. lines 99-115:
{
"gas_used": 394427,
"gas_used": 391116,
"status": {
"Keep": "Executed"
}
}

task 9 'run'. lines 118-133:
{
"gas_used": 210079,
"gas_used": 206768,
"status": {
"Keep": "Executed"
}
Expand All @@ -86,7 +86,7 @@ task 10 'run'. lines 136-150:

task 11 'run'. lines 153-167:
{
"gas_used": 210079,
"gas_used": 206768,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/dao/test_dao_failure.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 43 tasks

task 5 'run'. lines 12-29:
{
"gas_used": 313160,
"gas_used": 303227,
"status": {
"Keep": "Executed"
}
Expand Down
8 changes: 4 additions & 4 deletions spectests/dao/test_dao_propose.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 21 tasks

task 4 'run'. lines 10-24:
{
"gas_used": 216046,
"gas_used": 209424,
"status": {
"Keep": "Executed"
}
Expand Down Expand Up @@ -42,7 +42,7 @@ task 9 'run'. lines 87-103:

task 11 'run'. lines 109-127:
{
"gas_used": 171029,
"gas_used": 167718,
"status": {
"Keep": "Executed"
}
Expand All @@ -58,15 +58,15 @@ task 12 'run'. lines 131-151:

task 13 'run'. lines 154-187:
{
"gas_used": 503674,
"gas_used": 500363,
"status": {
"Keep": "Executed"
}
}

task 15 'run'. lines 194-216:
{
"gas_used": 157265,
"gas_used": 153954,
"status": {
"Keep": "Executed"
}
Expand Down
8 changes: 4 additions & 4 deletions spectests/dao/test_mint_dao_proposal.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task 5 'run'. lines 32-52:

task 6 'run'. lines 54-68:
{
"gas_used": 116988,
"gas_used": 113677,
"status": {
"Keep": "Executed"
}
Expand All @@ -26,7 +26,7 @@ task 7 'run'. lines 71-82:

task 8 'run'. lines 85-98:
{
"gas_used": 119972,
"gas_used": 116661,
"status": {
"Keep": "Executed"
}
Expand Down Expand Up @@ -94,15 +94,15 @@ task 14 'run'. lines 156-172:

task 16 'run'. lines 177-198:
{
"gas_used": 157785,
"gas_used": 154474,
"status": {
"Keep": "Executed"
}
}

task 18 'run'. lines 204-222:
{
"gas_used": 161473,
"gas_used": 158162,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/nft/identifier_nft.exp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ task 7 'run'. lines 132-140:

task 9 'run'. lines 145-153:
{
"gas_used": 193000,
"gas_used": 186378,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/nft/nft_boxminer.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task 4 'run'. lines 59-67:

task 5 'run'. lines 69-79:
{
"gas_used": 256523,
"gas_used": 253212,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/offer/offer.exp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ task 7 'run'. lines 53-65:

task 9 'run'. lines 69-82:
{
"gas_used": 92321,
"gas_used": 89010,
"status": {
"Keep": "Executed"
}
Expand Down
4 changes: 2 additions & 2 deletions spectests/on_chain_config/test_onchain_config_dao.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 14 tasks

task 4 'run'. lines 10-21:
{
"gas_used": 216046,
"gas_used": 209424,
"status": {
"Keep": "Executed"
}
Expand Down Expand Up @@ -44,7 +44,7 @@ task 8 'run'. lines 47-60:

task 11 'run'. lines 67-87:
{
"gas_used": 157265,
"gas_used": 153954,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/token/burn_and_destroy.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task 4 'run'. lines 25-40:

task 5 'run'. lines 42-55:
{
"gas_used": 116988,
"gas_used": 113677,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/token/dummy_token.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 6 tasks

task 3 'run'. lines 8-26:
{
"gas_used": 178842,
"gas_used": 175531,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/token/join_and_split.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task 4 'run'. lines 28-47:

task 5 'run'. lines 48-64:
{
"gas_used": 117102,
"gas_used": 113791,
"status": {
"Keep": "Executed"
}
Expand Down
4 changes: 2 additions & 2 deletions spectests/token/my_token.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task 5 'run'. lines 41-58:

task 6 'run'. lines 61-76:
{
"gas_used": 116988,
"gas_used": 113677,
"status": {
"Keep": "Executed"
}
Expand All @@ -26,7 +26,7 @@ task 7 'run'. lines 78-86:

task 8 'run'. lines 89-97:
{
"gas_used": 106557,
"gas_used": 103246,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/token/transfer_then_abort.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 5 tasks

task 3 'run'. lines 7-18:
{
"gas_used": 90482,
"gas_used": 87171,
"status": {
"Keep": {
"MoveAbort": [
Expand Down
2 changes: 1 addition & 1 deletion spectests/transaction_fee/distribute_txn_fee.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task 4 'run'. lines 9-20:

task 5 'run'. lines 23-36:
{
"gas_used": 91645,
"gas_used": 88334,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/transaction_scripts/create_account.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 4 tasks

task 3 'run'. lines 8-16:
{
"gas_used": 284361,
"gas_used": 281050,
"status": {
"Keep": "Executed"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ task 8 'run'. lines 51-67:

task 9 'run'. lines 70-86:
{
"gas_used": 89072,
"gas_used": 85761,
"status": {
"Keep": "Executed"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ task 8 'run'. lines 48-64:

task 9 'run'. lines 66-83:
{
"gas_used": 89072,
"gas_used": 85761,
"status": {
"Keep": "Executed"
}
Expand Down
2 changes: 1 addition & 1 deletion spectests/transaction_scripts/module_upgrade.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 15 tasks

task 5 'run'. lines 27-39:
{
"gas_used": 330845,
"gas_used": 327534,
"status": {
"Keep": "Executed"
}
Expand Down
4 changes: 2 additions & 2 deletions spectests/transaction_scripts/peer_to_peer.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ processed 5 tasks

task 3 'run'. lines 9-17:
{
"gas_used": 116751,
"gas_used": 113440,
"status": {
"Keep": "Executed"
}
}

task 4 'run'. lines 19-27:
{
"gas_used": 112512,
"gas_used": 109201,
"status": {
"Keep": "Executed"
}
Expand Down
Loading

0 comments on commit 9e6b9c8

Please sign in to comment.