@@ -1053,7 +1053,6 @@ export class ElasticsearchAccessListDatabase extends AbstractAccessListDatabase
10531053 properties : {
10541054 chainId : { type : 'integer' } ,
10551055 contractAddress : { type : 'keyword' } ,
1056- owner : { type : 'keyword' } ,
10571056 factoryDeployed : { type : 'boolean' } ,
10581057 transferable : { type : 'boolean' } ,
10591058 users : {
@@ -1062,8 +1061,7 @@ export class ElasticsearchAccessListDatabase extends AbstractAccessListDatabase
10621061 wallet : { type : 'keyword' } ,
10631062 tokenId : { type : 'long' } ,
10641063 block : { type : 'long' } ,
1065- txId : { type : 'keyword' } ,
1066- timestamp : { type : 'long' }
1064+ txId : { type : 'keyword' }
10671065 }
10681066 } ,
10691067 lastUpdatedBlock : { type : 'long' } ,
@@ -1081,13 +1079,11 @@ export class ElasticsearchAccessListDatabase extends AbstractAccessListDatabase
10811079 async create (
10821080 chainId : number ,
10831081 contractAddress : string ,
1084- owner : string ,
10851082 transferable : boolean ,
10861083 block : number ,
10871084 txId : string
10881085 ) {
10891086 const id = this . docId ( chainId , contractAddress )
1090- const lowerOwner = owner . toLowerCase ( )
10911087 const lowerContract = contractAddress . toLowerCase ( )
10921088 try {
10931089 await this . client . update ( {
@@ -1097,18 +1093,16 @@ export class ElasticsearchAccessListDatabase extends AbstractAccessListDatabase
10971093 script : {
10981094 source : `
10991095 ctx._source.factoryDeployed = true;
1100- ctx._source.owner = params.owner;
11011096 ctx._source.transferable = params.transferable;
11021097 ctx._source.lastUpdatedBlock = params.block;
11031098 ctx._source.lastTxId = params.txId;
11041099 ` ,
11051100 lang : 'painless' ,
1106- params : { owner : lowerOwner , transferable, block, txId }
1101+ params : { transferable, block, txId }
11071102 } ,
11081103 upsert : {
11091104 chainId,
11101105 contractAddress : lowerContract ,
1111- owner : lowerOwner ,
11121106 factoryDeployed : true ,
11131107 transferable,
11141108 users : [ ] ,
@@ -1181,7 +1175,6 @@ export class ElasticsearchAccessListDatabase extends AbstractAccessListDatabase
11811175 upsert : {
11821176 chainId,
11831177 contractAddress : lowerContract ,
1184- owner : '' ,
11851178 factoryDeployed : false ,
11861179 transferable : false ,
11871180 users : [ normalized ] ,
@@ -1253,47 +1246,6 @@ export class ElasticsearchAccessListDatabase extends AbstractAccessListDatabase
12531246 }
12541247 }
12551248
1256- async updateOwner (
1257- chainId : number ,
1258- contractAddress : string ,
1259- owner : string ,
1260- block : number ,
1261- txId : string
1262- ) {
1263- const id = this . docId ( chainId , contractAddress )
1264- try {
1265- await this . client . update ( {
1266- index : this . index ,
1267- id,
1268- body : {
1269- script : {
1270- source : `
1271- ctx._source.owner = params.owner;
1272- ctx._source.lastUpdatedBlock = params.block;
1273- ctx._source.lastTxId = params.txId;
1274- ` ,
1275- lang : 'painless' ,
1276- params : { owner : owner . toLowerCase ( ) , block, txId }
1277- }
1278- } ,
1279- refresh : 'wait_for'
1280- } )
1281- return { id }
1282- } catch ( error ) {
1283- if ( error ?. meta ?. statusCode === 404 ) {
1284- return null
1285- }
1286- const errorMsg = `Error when updating owner on access list ${ id } : ${ error . message } `
1287- DATABASE_LOGGER . logMessageWithEmoji (
1288- errorMsg ,
1289- true ,
1290- GENERIC_EMOJIS . EMOJI_CROSS_MARK ,
1291- LOG_LEVELS_STR . LEVEL_ERROR
1292- )
1293- return null
1294- }
1295- }
1296-
12971249 async searchByWallet ( wallet : string , chainId ?: number ) : Promise < any [ ] > {
12981250 const lowerWallet = wallet . toLowerCase ( )
12991251 const filters : any [ ] = [
0 commit comments