@rabbitholegg/questdk-plugin-across
Advanced tools
Comparing version 1.0.0-alpha.32 to 1.0.0-alpha.33
# @rabbitholegg/questdk-plugin-across | ||
## 1.0.0-alpha.33 | ||
### Patch Changes | ||
- [#358](https://github.com/rabbitholegg/questdk-plugins/pull/358) [`9f48ea80`](https://github.com/rabbitholegg/questdk-plugins/commit/9f48ea80919c90c4bc71fc0ecb85c334828bb650) Thanks [@mmackz](https://github.com/mmackz)! - fix issue with spokepool verification | ||
## 1.0.0-alpha.32 | ||
@@ -4,0 +10,0 @@ |
@@ -1,6 +0,6 @@ | ||
{"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/Across.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/Across.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":44}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":47}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":8}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":21}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":26}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":16}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":23}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":77}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":68}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":48}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":0}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":61}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":80}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":10}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":0}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":47}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":72}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":33}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":44}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":39}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":0}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":23}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":27}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":23}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":12}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":30}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":27}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":45}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":21}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":27}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":6}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":4}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":1}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":0}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":49}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":19}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":26}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":40}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":1}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":0}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":49}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":23}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":13,"13":13,"14":13,"15":13,"16":13,"17":13,"18":1,"19":12,"20":13,"21":13,"22":13,"23":13,"24":13,"25":13,"26":13,"27":13,"28":13,"29":13,"30":13,"31":13,"32":13,"33":1,"34":1,"35":0,"36":0,"37":0,"38":0,"39":1,"40":1,"41":0,"42":0},"branchMap":{"0":{"type":"branch","line":12,"loc":{"start":{"line":12,"column":22},"end":{"line":33,"column":1}},"locations":[{"start":{"line":12,"column":22},"end":{"line":33,"column":1}}]},"1":{"type":"branch","line":17,"loc":{"start":{"line":17,"column":18},"end":{"line":17,"column":60}},"locations":[{"start":{"line":17,"column":18},"end":{"line":17,"column":60}}]},"2":{"type":"branch","line":17,"loc":{"start":{"line":17,"column":56},"end":{"line":17,"column":72}},"locations":[{"start":{"line":17,"column":56},"end":{"line":17,"column":72}}]},"3":{"type":"branch","line":18,"loc":{"start":{"line":18,"column":25},"end":{"line":19,"column":44}},"locations":[{"start":{"line":18,"column":25},"end":{"line":19,"column":44}}]},"4":{"type":"branch","line":19,"loc":{"start":{"line":19,"column":43},"end":{"line":20,"column":39}},"locations":[{"start":{"line":19,"column":43},"end":{"line":20,"column":39}}]}},"b":{"0":[13],"1":[1],"2":[12],"3":[1],"4":[12]},"fnMap":{"0":{"name":"bridge","decl":{"start":{"line":12,"column":22},"end":{"line":33,"column":1}},"loc":{"start":{"line":12,"column":22},"end":{"line":33,"column":1}},"line":12},"1":{"name":"getSupportedTokenAddresses","decl":{"start":{"line":35,"column":42},"end":{"line":39,"column":1}},"loc":{"start":{"line":35,"column":42},"end":{"line":39,"column":1}},"line":35},"2":{"name":"getSupportedChainIds","decl":{"start":{"line":41,"column":36},"end":{"line":43,"column":1}},"loc":{"start":{"line":41,"column":36},"end":{"line":43,"column":1}},"line":41}},"f":{"0":13,"1":0,"2":0}} | ||
{"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/Across.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/Across.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":41}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":8}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":21}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":26}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":16}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":20}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":77}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":68}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":48}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":0}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":61}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":80}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":10}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":0}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":47}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":72}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":26}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":10}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":60}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":55}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":6}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":3}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":0}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":23}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":27}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":23}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":12}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":30}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":27}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":45}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":21}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":27}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":6}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":4}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":1}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":0}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":49}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":19}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":26}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":40}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":1}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":0}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":49}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":23}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":13,"13":13,"14":13,"15":13,"16":13,"17":13,"18":13,"19":13,"20":13,"21":13,"22":13,"23":13,"24":13,"25":13,"26":13,"27":13,"28":13,"29":13,"30":13,"31":13,"32":13,"33":13,"34":13,"35":13,"36":1,"37":1,"38":0,"39":0,"40":0,"41":0,"42":1,"43":1,"44":0,"45":0},"branchMap":{"0":{"type":"branch","line":12,"loc":{"start":{"line":12,"column":22},"end":{"line":36,"column":1}},"locations":[{"start":{"line":12,"column":22},"end":{"line":36,"column":1}}]},"1":{"type":"branch","line":17,"loc":{"start":{"line":17,"column":18},"end":{"line":17,"column":60}},"locations":[{"start":{"line":17,"column":18},"end":{"line":17,"column":60}}]},"2":{"type":"branch","line":17,"loc":{"start":{"line":17,"column":56},"end":{"line":17,"column":72}},"locations":[{"start":{"line":17,"column":56},"end":{"line":17,"column":72}}]}},"b":{"0":[13],"1":[1],"2":[12]},"fnMap":{"0":{"name":"bridge","decl":{"start":{"line":12,"column":22},"end":{"line":36,"column":1}},"loc":{"start":{"line":12,"column":22},"end":{"line":36,"column":1}},"line":12},"1":{"name":"getSupportedTokenAddresses","decl":{"start":{"line":38,"column":42},"end":{"line":42,"column":1}},"loc":{"start":{"line":38,"column":42},"end":{"line":42,"column":1}},"line":38},"2":{"name":"getSupportedChainIds","decl":{"start":{"line":44,"column":36},"end":{"line":46,"column":1}},"loc":{"start":{"line":44,"column":36},"end":{"line":46,"column":1}},"line":44}},"f":{"0":13,"1":0,"2":0}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/abi.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/abi.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":34}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":3}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":13}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":70}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":72}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":67}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":79}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":70}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":73}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":64}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":69}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":6}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":20}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":16}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":31}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":21}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":4}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":3}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":13}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":7}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":52}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":26}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":24}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":8}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":70}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":72}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":67}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":79}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":70}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":73}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":64}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":69}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":6}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":20}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":16}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":31}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":21}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":4}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/chain-ids.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/chain-ids.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":18}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":21}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":18}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":22}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":21}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":14}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":15}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/contracts.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/contracts.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":35}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":0}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":67}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":66}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":69}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":66}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":70}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":69}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":62}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":1}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":0}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":44}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":72}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":66}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":69}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":66}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":70}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":69}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":62}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":1}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":0}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":62}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":66}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":79}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":66}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":70}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":69}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":62}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/test-transactions.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/test-transactions.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":58}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":8}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":26}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":9}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":18}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":17}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":43}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":58}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":0}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":28}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":18}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":12}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":73}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":26}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":53}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":15}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":77}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":8}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":593}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":13}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":51}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":23}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":30}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":9}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":74}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":73}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":26}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":13}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":17}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":17}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":1}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":30}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":18}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":12}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":73}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":26}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":53}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":15}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":77}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":8}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":593}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":11}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":51}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":23}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":13}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":9}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":74}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":74}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":26}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":30}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":36}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":13}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":17}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":17}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":1}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":31}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":12}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":73}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":27}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":53}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":17}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":24}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":28}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":28}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":77}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":8}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":593}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":13}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":51}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":22}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":13}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":18}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":17}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":17}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":9}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":74}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":74}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":17}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":1}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":29}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":12}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":73}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":27}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":53}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":17}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":24}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":28}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":28}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":77}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":8}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":593}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":12}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":51}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":22}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":30}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":18}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":17}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":17}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":9}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":73}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":74}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":17}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":1}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":0}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":52}},"105":{"start":{"line":106,"column":0},"end":{"line":106,"column":16}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":16}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":55}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":53}},"109":{"start":{"line":110,"column":0},"end":{"line":110,"column":79}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":10}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":595}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":15}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":4}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":11}},"115":{"start":{"line":116,"column":0},"end":{"line":116,"column":35}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":44}},"117":{"start":{"line":118,"column":0},"end":{"line":118,"column":63}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":52}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":60}},"120":{"start":{"line":121,"column":0},"end":{"line":121,"column":4}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":1}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":0}},"123":{"start":{"line":124,"column":0},"end":{"line":124,"column":52}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":16}},"125":{"start":{"line":126,"column":0},"end":{"line":126,"column":18}},"126":{"start":{"line":127,"column":0},"end":{"line":127,"column":55}},"127":{"start":{"line":128,"column":0},"end":{"line":128,"column":53}},"128":{"start":{"line":129,"column":0},"end":{"line":129,"column":79}},"129":{"start":{"line":130,"column":0},"end":{"line":130,"column":10}},"130":{"start":{"line":131,"column":0},"end":{"line":131,"column":659}},"131":{"start":{"line":132,"column":0},"end":{"line":132,"column":33}},"132":{"start":{"line":133,"column":0},"end":{"line":133,"column":4}},"133":{"start":{"line":134,"column":0},"end":{"line":134,"column":11}},"134":{"start":{"line":135,"column":0},"end":{"line":135,"column":31}},"135":{"start":{"line":136,"column":0},"end":{"line":136,"column":44}},"136":{"start":{"line":137,"column":0},"end":{"line":137,"column":30}},"137":{"start":{"line":138,"column":0},"end":{"line":138,"column":48}},"138":{"start":{"line":139,"column":0},"end":{"line":139,"column":60}},"139":{"start":{"line":140,"column":0},"end":{"line":140,"column":4}},"140":{"start":{"line":141,"column":0},"end":{"line":141,"column":1}},"141":{"start":{"line":142,"column":0},"end":{"line":142,"column":0}},"142":{"start":{"line":143,"column":0},"end":{"line":143,"column":33}},"143":{"start":{"line":144,"column":0},"end":{"line":144,"column":59}},"144":{"start":{"line":145,"column":0},"end":{"line":145,"column":50}},"145":{"start":{"line":146,"column":0},"end":{"line":146,"column":76}},"146":{"start":{"line":147,"column":0},"end":{"line":147,"column":53}},"147":{"start":{"line":148,"column":0},"end":{"line":148,"column":22}},"148":{"start":{"line":149,"column":0},"end":{"line":149,"column":25}},"149":{"start":{"line":150,"column":0},"end":{"line":150,"column":5}},"150":{"start":{"line":151,"column":0},"end":{"line":151,"column":1}},"151":{"start":{"line":152,"column":0},"end":{"line":152,"column":0}},"152":{"start":{"line":153,"column":0},"end":{"line":153,"column":33}},"153":{"start":{"line":154,"column":0},"end":{"line":154,"column":61}},"154":{"start":{"line":155,"column":0},"end":{"line":155,"column":49}},"155":{"start":{"line":156,"column":0},"end":{"line":156,"column":5}},"156":{"start":{"line":157,"column":0},"end":{"line":157,"column":61}},"157":{"start":{"line":158,"column":0},"end":{"line":158,"column":63}},"158":{"start":{"line":159,"column":0},"end":{"line":159,"column":5}},"159":{"start":{"line":160,"column":0},"end":{"line":160,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/test-transactions.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/test-transactions.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":58}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":8}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":26}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":9}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":18}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":17}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":43}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":58}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":0}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":28}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":18}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":12}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":73}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":26}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":53}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":15}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":77}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":8}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":593}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":13}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":51}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":23}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":30}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":9}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":74}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":73}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":26}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":13}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":17}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":17}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":1}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":30}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":18}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":12}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":73}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":26}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":53}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":15}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":77}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":8}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":593}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":11}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":51}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":23}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":13}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":9}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":74}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":74}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":26}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":30}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":36}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":13}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":17}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":17}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":1}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":31}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":12}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":73}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":27}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":53}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":17}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":24}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":28}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":28}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":77}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":8}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":593}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":13}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":51}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":22}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":13}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":18}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":17}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":17}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":9}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":74}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":74}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":17}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":1}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":29}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":12}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":73}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":27}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":53}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":17}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":24}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":28}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":28}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":77}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":8}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":593}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":12}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":51}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":22}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":30}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":18}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":17}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":17}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":9}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":73}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":74}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":17}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":1}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":0}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":52}},"105":{"start":{"line":106,"column":0},"end":{"line":106,"column":16}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":16}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":55}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":53}},"109":{"start":{"line":110,"column":0},"end":{"line":110,"column":79}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":10}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":595}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":15}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":4}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":11}},"115":{"start":{"line":116,"column":0},"end":{"line":116,"column":35}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":44}},"117":{"start":{"line":118,"column":0},"end":{"line":118,"column":63}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":52}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":60}},"120":{"start":{"line":121,"column":0},"end":{"line":121,"column":4}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":1}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":0}},"123":{"start":{"line":124,"column":0},"end":{"line":124,"column":52}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":16}},"125":{"start":{"line":126,"column":0},"end":{"line":126,"column":18}},"126":{"start":{"line":127,"column":0},"end":{"line":127,"column":55}},"127":{"start":{"line":128,"column":0},"end":{"line":128,"column":53}},"128":{"start":{"line":129,"column":0},"end":{"line":129,"column":79}},"129":{"start":{"line":130,"column":0},"end":{"line":130,"column":10}},"130":{"start":{"line":131,"column":0},"end":{"line":131,"column":659}},"131":{"start":{"line":132,"column":0},"end":{"line":132,"column":33}},"132":{"start":{"line":133,"column":0},"end":{"line":133,"column":4}},"133":{"start":{"line":134,"column":0},"end":{"line":134,"column":11}},"134":{"start":{"line":135,"column":0},"end":{"line":135,"column":31}},"135":{"start":{"line":136,"column":0},"end":{"line":136,"column":44}},"136":{"start":{"line":137,"column":0},"end":{"line":137,"column":30}},"137":{"start":{"line":138,"column":0},"end":{"line":138,"column":48}},"138":{"start":{"line":139,"column":0},"end":{"line":139,"column":60}},"139":{"start":{"line":140,"column":0},"end":{"line":140,"column":4}},"140":{"start":{"line":141,"column":0},"end":{"line":141,"column":1}},"141":{"start":{"line":142,"column":0},"end":{"line":142,"column":0}},"142":{"start":{"line":143,"column":0},"end":{"line":143,"column":53}},"143":{"start":{"line":144,"column":0},"end":{"line":144,"column":16}},"144":{"start":{"line":145,"column":0},"end":{"line":145,"column":18}},"145":{"start":{"line":146,"column":0},"end":{"line":146,"column":55}},"146":{"start":{"line":147,"column":0},"end":{"line":147,"column":53}},"147":{"start":{"line":148,"column":0},"end":{"line":148,"column":79}},"148":{"start":{"line":149,"column":0},"end":{"line":149,"column":10}},"149":{"start":{"line":150,"column":0},"end":{"line":150,"column":659}},"150":{"start":{"line":151,"column":0},"end":{"line":151,"column":33}},"151":{"start":{"line":152,"column":0},"end":{"line":152,"column":4}},"152":{"start":{"line":153,"column":0},"end":{"line":153,"column":11}},"153":{"start":{"line":154,"column":0},"end":{"line":154,"column":31}},"154":{"start":{"line":155,"column":0},"end":{"line":155,"column":44}},"155":{"start":{"line":156,"column":0},"end":{"line":156,"column":33}},"156":{"start":{"line":157,"column":0},"end":{"line":157,"column":51}},"157":{"start":{"line":158,"column":0},"end":{"line":158,"column":63}},"158":{"start":{"line":159,"column":0},"end":{"line":159,"column":4}},"159":{"start":{"line":160,"column":0},"end":{"line":160,"column":1}},"160":{"start":{"line":161,"column":0},"end":{"line":161,"column":0}},"161":{"start":{"line":162,"column":0},"end":{"line":162,"column":33}},"162":{"start":{"line":163,"column":0},"end":{"line":163,"column":59}},"163":{"start":{"line":164,"column":0},"end":{"line":164,"column":50}},"164":{"start":{"line":165,"column":0},"end":{"line":165,"column":51}},"165":{"start":{"line":166,"column":0},"end":{"line":166,"column":76}},"166":{"start":{"line":167,"column":0},"end":{"line":167,"column":53}},"167":{"start":{"line":168,"column":0},"end":{"line":168,"column":22}},"168":{"start":{"line":169,"column":0},"end":{"line":169,"column":28}},"169":{"start":{"line":170,"column":0},"end":{"line":170,"column":5}},"170":{"start":{"line":171,"column":0},"end":{"line":171,"column":53}},"171":{"start":{"line":172,"column":0},"end":{"line":172,"column":22}},"172":{"start":{"line":173,"column":0},"end":{"line":173,"column":28}},"173":{"start":{"line":174,"column":0},"end":{"line":174,"column":5}},"174":{"start":{"line":175,"column":0},"end":{"line":175,"column":1}},"175":{"start":{"line":176,"column":0},"end":{"line":176,"column":0}},"176":{"start":{"line":177,"column":0},"end":{"line":177,"column":33}},"177":{"start":{"line":178,"column":0},"end":{"line":178,"column":61}},"178":{"start":{"line":179,"column":0},"end":{"line":179,"column":49}},"179":{"start":{"line":180,"column":0},"end":{"line":180,"column":5}},"180":{"start":{"line":181,"column":0},"end":{"line":181,"column":61}},"181":{"start":{"line":182,"column":0},"end":{"line":182,"column":63}},"182":{"start":{"line":183,"column":0},"end":{"line":183,"column":5}},"183":{"start":{"line":184,"column":0},"end":{"line":184,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
} |
@@ -8,5 +8,5 @@ "use strict"; | ||
exports.getSupportedTokenAddresses = exports.getSupportedChainIds = exports.bridge = void 0; | ||
var _abi = require("./abi.js"); | ||
var _chainIds = require("./chain-ids.js"); | ||
var _contracts = require("./contracts.js"); | ||
var _abi = require("./abi"); | ||
var _chainIds = require("./chain-ids"); | ||
var _contracts = require("./contracts"); | ||
var _questdk = require("@rabbitholegg/questdk"); | ||
@@ -20,2 +20,3 @@ var _questdkPluginUtils = require("@rabbitholegg/questdk-plugin-utils"); | ||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_bridge) { | ||
var _CHAIN_TO_SPOKE_VERIF, _CHAIN_TO_SPOKEPOOL$s; | ||
var sourceChainId, destinationChainId, tokenAddress, amount, recipient, isNative, tokenIn, bridgeContract; | ||
@@ -28,3 +29,5 @@ return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
tokenIn = isNative ? _contracts.CHAIN_TO_WETH[sourceChainId] : tokenAddress; | ||
bridgeContract = isNative ? _contracts.CHAIN_TO_SPOKE_VERIFIER[sourceChainId] : _contracts.CHAIN_TO_SPOKEPOOL[sourceChainId]; | ||
bridgeContract = { | ||
$or: [(_CHAIN_TO_SPOKE_VERIF = _contracts.CHAIN_TO_SPOKE_VERIFIER[sourceChainId]) === null || _CHAIN_TO_SPOKE_VERIF === void 0 ? void 0 : _CHAIN_TO_SPOKE_VERIF.toLowerCase(), (_CHAIN_TO_SPOKEPOOL$s = _contracts.CHAIN_TO_SPOKEPOOL[sourceChainId]) === null || _CHAIN_TO_SPOKEPOOL$s === void 0 ? void 0 : _CHAIN_TO_SPOKEPOOL$s.toLowerCase()] | ||
}; | ||
return _context.abrupt("return", (0, _questdk.compressJson)({ | ||
@@ -31,0 +34,0 @@ chainId: sourceChainId, |
@@ -8,8 +8,6 @@ "use strict"; | ||
exports.WETH_ADRESS_MAINNET = exports.WETH_ADDRESS_ARBITRUM = exports.USDT_ADDRESS_MAINNET = exports.USDT_ADDRESS_ARBITRUM = void 0; | ||
var _Across = require("./Across.js"); | ||
var _abi = require("./abi.js"); | ||
var _contracts = require("./contracts.js"); | ||
var _testTransactions = require("./test-transactions.js"); | ||
var _Across = require("./Across"); | ||
var _testTransactions = require("./test-transactions"); | ||
var _questdkPluginUtils = require("@rabbitholegg/questdk-plugin-utils"); | ||
var _filter = require("@rabbitholegg/questdk/filter"); | ||
var _questdk = require("@rabbitholegg/questdk"); | ||
var _viem = require("viem"); | ||
@@ -24,6 +22,5 @@ var _vitest = require("vitest"); | ||
var USDT_ADDRESS_MAINNET = exports.USDT_ADDRESS_MAINNET = '0xdAC17F958D2ee523a2206206994597C13D831ec7'; | ||
var TEST_USER = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'; | ||
(0, _vitest.describe)('Given the Across plugin', function () { | ||
(0, _vitest.describe)('When generating the filter', function () { | ||
(0, _vitest.test)('should return a valid bridge action filter for L2 token tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { | ||
(0, _vitest.test)('when making a valid bridge action', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { | ||
var filter; | ||
@@ -35,24 +32,30 @@ return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
return (0, _Across.bridge)({ | ||
sourceChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
destinationChainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
tokenAddress: USDT_ADDRESS_ARBITRUM, | ||
amount: (0, _filter.GreaterThanOrEqual)(100000n), | ||
recipient: TEST_USER | ||
sourceChainId: 1, | ||
destinationChainId: 10 | ||
}); | ||
case 2: | ||
filter = _context.sent; | ||
(0, _vitest.expect)(filter).to.deep.equal({ | ||
chainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
to: _contracts.CHAIN_TO_SPOKEPOOL[_questdkPluginUtils.Chains.ARBITRUM_ONE], | ||
input: { | ||
$abi: _abi.ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
amount: { | ||
$gte: '100000' | ||
}, | ||
originToken: USDT_ADDRESS_ARBITRUM | ||
} | ||
}); | ||
case 4: | ||
(0, _vitest.expect)(filter).toBeTypeOf('object'); | ||
(0, _vitest.expect)(Number(filter.chainId)).toBe(1); | ||
if (typeof filter.to === 'string') { | ||
(0, _vitest.expect)(filter.to).toMatch(/^0x[a-fA-F0-9]{40}$/); | ||
} else { | ||
// if to is an object, it should have a logical operator as the only key | ||
(0, _vitest.expect)(filter.to).toBeTypeOf('object'); | ||
(0, _vitest.expect)(Object.keys(filter.to)).toHaveLength(1); | ||
(0, _vitest.expect)(['$or', '$and'].some(function (prop) { | ||
return Object.hasOwnProperty.call(filter.to, prop); | ||
})).to.be["true"]; | ||
(0, _vitest.expect)(Object.values(filter.to)[0]).to.satisfy(function (arr) { | ||
return arr.every(function (val) { | ||
return val.match(/^0x[a-fA-F0-9]{40}$/); | ||
}); | ||
}); | ||
} | ||
// Check the input property is the correct type and has a valid filter operator | ||
(0, _vitest.expect)(filter.input).toBeTypeOf('object'); | ||
(0, _vitest.expect)(['$abi', '$abiParams', '$abiAbstract', '$or', '$and'].some(function (prop) { | ||
return Object.hasOwnProperty.call(filter.input, prop); | ||
})).to.be["true"]; | ||
case 8: | ||
case "end": | ||
@@ -63,79 +66,11 @@ return _context.stop(); | ||
}))); | ||
(0, _vitest.test)('should return a valid bridge action filter for L1 token tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { | ||
var filter; | ||
return _regeneratorRuntime().wrap(function _callee2$(_context2) { | ||
while (1) switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return (0, _Across.bridge)({ | ||
sourceChainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
tokenAddress: USDT_ADDRESS_MAINNET, | ||
amount: (0, _filter.GreaterThanOrEqual)(100000n), | ||
recipient: TEST_USER | ||
}); | ||
case 2: | ||
filter = _context2.sent; | ||
(0, _vitest.expect)(filter).to.deep.equal({ | ||
chainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
to: _contracts.CHAIN_TO_SPOKEPOOL[_questdkPluginUtils.Chains.ETHEREUM], | ||
input: { | ||
$abi: _abi.ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
amount: { | ||
$gte: '100000' | ||
}, | ||
originToken: USDT_ADDRESS_MAINNET | ||
} | ||
}); | ||
case 4: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
}, _callee2); | ||
}))); | ||
(0, _vitest.test)('should return a valid bridge action filter for L1 ETH tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { | ||
var filter; | ||
return _regeneratorRuntime().wrap(function _callee3$(_context3) { | ||
while (1) switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return (0, _Across.bridge)({ | ||
sourceChainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
tokenAddress: WETH_ADRESS_MAINNET, | ||
amount: (0, _filter.GreaterThanOrEqual)(100000n), | ||
recipient: TEST_USER | ||
}); | ||
case 2: | ||
filter = _context3.sent; | ||
(0, _vitest.expect)(filter).to.deep.equal({ | ||
chainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
to: _contracts.CHAIN_TO_SPOKEPOOL[_questdkPluginUtils.Chains.ETHEREUM], | ||
input: { | ||
$abi: _abi.ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
amount: { | ||
$gte: '100000' | ||
}, | ||
originToken: WETH_ADRESS_MAINNET | ||
} | ||
}); | ||
case 4: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
}, _callee3); | ||
}))); | ||
}); | ||
(0, _vitest.describe)('When applying the filter', function () { | ||
(0, _vitest.test)('should pass filter with valid L1 ETH tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { | ||
(0, _vitest.test)('should pass filter with valid L1 ETH tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { | ||
var transaction, filter; | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
while (1) switch (_context4.prev = _context4.next) { | ||
return _regeneratorRuntime().wrap(function _callee2$(_context2) { | ||
while (1) switch (_context2.prev = _context2.next) { | ||
case 0: | ||
transaction = _testTransactions.DEPOSIT_ETH; | ||
_context4.next = 3; | ||
_context2.next = 3; | ||
return (0, _Across.bridge)({ | ||
@@ -145,21 +80,21 @@ sourceChainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
tokenAddress: WETH_ADRESS_MAINNET, | ||
amount: (0, _filter.GreaterThanOrEqual)((0, _viem.parseEther)('.315')), | ||
amount: (0, _questdk.GreaterThanOrEqual)((0, _viem.parseEther)('.315')), | ||
recipient: '0xE751378EC5E5c0b64c4D16A077E8f11FBcfC958A' | ||
}); | ||
case 3: | ||
filter = _context4.sent; | ||
(0, _vitest.expect)((0, _filter.apply)(transaction, filter)).to.be["true"]; | ||
filter = _context2.sent; | ||
(0, _vitest.expect)((0, _questdk.apply)(transaction, filter)).to.be["true"]; | ||
case 5: | ||
case "end": | ||
return _context4.stop(); | ||
return _context2.stop(); | ||
} | ||
}, _callee4); | ||
}, _callee2); | ||
}))); | ||
(0, _vitest.test)('should pass filter with valid L2 ETH tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { | ||
(0, _vitest.test)('should pass filter with valid L2 ETH tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { | ||
var transaction, filter; | ||
return _regeneratorRuntime().wrap(function _callee5$(_context5) { | ||
while (1) switch (_context5.prev = _context5.next) { | ||
return _regeneratorRuntime().wrap(function _callee3$(_context3) { | ||
while (1) switch (_context3.prev = _context3.next) { | ||
case 0: | ||
transaction = _testTransactions.WITHDRAW_ETH; | ||
_context5.next = 3; | ||
_context3.next = 3; | ||
return (0, _Across.bridge)({ | ||
@@ -169,21 +104,21 @@ sourceChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
tokenAddress: WETH_ADDRESS_ARBITRUM, | ||
amount: (0, _filter.GreaterThanOrEqual)((0, _viem.parseEther)('.15')), | ||
amount: (0, _questdk.GreaterThanOrEqual)((0, _viem.parseEther)('.15')), | ||
recipient: '0xbfe7A294ceD3Ce8C33c22c4dcAa6FD4522d6D32a' | ||
}); | ||
case 3: | ||
filter = _context5.sent; | ||
(0, _vitest.expect)((0, _filter.apply)(transaction, filter)).to.be["true"]; | ||
filter = _context3.sent; | ||
(0, _vitest.expect)((0, _questdk.apply)(transaction, filter)).to.be["true"]; | ||
case 5: | ||
case "end": | ||
return _context5.stop(); | ||
return _context3.stop(); | ||
} | ||
}, _callee5); | ||
}, _callee3); | ||
}))); | ||
(0, _vitest.test)('should pass filter with valid L1 Token tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() { | ||
(0, _vitest.test)('should pass filter with valid L1 Token tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { | ||
var transaction, filter; | ||
return _regeneratorRuntime().wrap(function _callee6$(_context6) { | ||
while (1) switch (_context6.prev = _context6.next) { | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
while (1) switch (_context4.prev = _context4.next) { | ||
case 0: | ||
transaction = _testTransactions.DEPOSIT_ERC20; | ||
_context6.next = 3; | ||
_context4.next = 3; | ||
return (0, _Across.bridge)({ | ||
@@ -193,3 +128,3 @@ sourceChainId: _questdkPluginUtils.Chains.ETHEREUM, | ||
tokenAddress: USDT_ADDRESS_MAINNET, | ||
amount: (0, _filter.GreaterThanOrEqual)('9900000'), | ||
amount: (0, _questdk.GreaterThanOrEqual)('9900000'), | ||
// $250 USDC, | ||
@@ -199,17 +134,17 @@ recipient: '0xb3b873a999cff617307A351e32a3dd7A94adD5B2' | ||
case 3: | ||
filter = _context6.sent; | ||
(0, _vitest.expect)((0, _filter.apply)(transaction, filter)).to.be["true"]; | ||
filter = _context4.sent; | ||
(0, _vitest.expect)((0, _questdk.apply)(transaction, filter)).to.be["true"]; | ||
case 5: | ||
case "end": | ||
return _context6.stop(); | ||
return _context4.stop(); | ||
} | ||
}, _callee6); | ||
}, _callee4); | ||
}))); | ||
(0, _vitest.test)('should pass filter with valid L2 token tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { | ||
(0, _vitest.test)('should pass filter with valid L2 token tx', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { | ||
var transaction, filter; | ||
return _regeneratorRuntime().wrap(function _callee7$(_context7) { | ||
while (1) switch (_context7.prev = _context7.next) { | ||
return _regeneratorRuntime().wrap(function _callee5$(_context5) { | ||
while (1) switch (_context5.prev = _context5.next) { | ||
case 0: | ||
transaction = _testTransactions.WITHDRAW_ERC20; | ||
_context7.next = 3; | ||
_context5.next = 3; | ||
return (0, _Across.bridge)({ | ||
@@ -219,13 +154,13 @@ sourceChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
tokenAddress: USDT_ADDRESS_ARBITRUM, | ||
amount: (0, _filter.GreaterThanOrEqual)('19000000'), | ||
amount: (0, _questdk.GreaterThanOrEqual)('19000000'), | ||
recipient: '0x49b887e3f64C7007E76f72C17cE29c7bcFb9Af55' | ||
}); | ||
case 3: | ||
filter = _context7.sent; | ||
(0, _vitest.expect)((0, _filter.apply)(transaction, filter)).to.be["true"]; | ||
filter = _context5.sent; | ||
(0, _vitest.expect)((0, _questdk.apply)(transaction, filter)).to.be["true"]; | ||
case 5: | ||
case "end": | ||
return _context7.stop(); | ||
return _context5.stop(); | ||
} | ||
}, _callee7); | ||
}, _callee5); | ||
}))); | ||
@@ -238,17 +173,17 @@ }); | ||
params = testCase.params; | ||
(0, _vitest.test)(description, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() { | ||
(0, _vitest.test)(description, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() { | ||
var filter; | ||
return _regeneratorRuntime().wrap(function _callee8$(_context8) { | ||
while (1) switch (_context8.prev = _context8.next) { | ||
return _regeneratorRuntime().wrap(function _callee6$(_context6) { | ||
while (1) switch (_context6.prev = _context6.next) { | ||
case 0: | ||
_context8.next = 2; | ||
_context6.next = 2; | ||
return (0, _Across.bridge)(params); | ||
case 2: | ||
filter = _context8.sent; | ||
(0, _vitest.expect)((0, _filter.apply)(transaction, filter)).to.be["true"]; | ||
filter = _context6.sent; | ||
(0, _vitest.expect)((0, _questdk.apply)(transaction, filter)).to.be["true"]; | ||
case 4: | ||
case "end": | ||
return _context8.stop(); | ||
return _context6.stop(); | ||
} | ||
}, _callee8); | ||
}, _callee6); | ||
}))); | ||
@@ -262,17 +197,17 @@ }); | ||
params = testCase.params; | ||
(0, _vitest.test)(description, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { | ||
(0, _vitest.test)(description, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { | ||
var filter; | ||
return _regeneratorRuntime().wrap(function _callee9$(_context9) { | ||
while (1) switch (_context9.prev = _context9.next) { | ||
return _regeneratorRuntime().wrap(function _callee7$(_context7) { | ||
while (1) switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_context9.next = 2; | ||
_context7.next = 2; | ||
return (0, _Across.bridge)(params); | ||
case 2: | ||
filter = _context9.sent; | ||
(0, _vitest.expect)((0, _filter.apply)(transaction, filter)).to.be["false"]; | ||
filter = _context7.sent; | ||
(0, _vitest.expect)((0, _questdk.apply)(transaction, filter)).to.be["false"]; | ||
case 4: | ||
case "end": | ||
return _context9.stop(); | ||
return _context7.stop(); | ||
} | ||
}, _callee9); | ||
}, _callee7); | ||
}))); | ||
@@ -279,0 +214,0 @@ }); |
@@ -8,3 +8,3 @@ "use strict"; | ||
exports.Across = void 0; | ||
var _Across = require("./Across.js"); | ||
var _Across = require("./Across"); | ||
var _questdk = require("@rabbitholegg/questdk"); | ||
@@ -11,0 +11,0 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } |
@@ -63,3 +63,3 @@ "use strict"; | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
to: '0xe35e9842fceaca96570b734083f4a58e8f7c5f2a', | ||
transactionIndex: 1, | ||
@@ -86,3 +86,3 @@ value: '0', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
to: '0xe35e9842fceaca96570b734083f4a58e8f7c5f2a', | ||
transactionIndex: 1, | ||
@@ -132,7 +132,27 @@ value: '150000000000000000', | ||
}; | ||
var passingTestCases = exports.passingTestCases = [(0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when bridging ERC20 tokens'), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ETH, 'when bridging ETH'), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when amount is "any"', { | ||
var BRIDGE_ETH2 = { | ||
transaction: { | ||
chainId: 8453, | ||
from: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
to: '0xb4a8d45647445ea9fc3e1058096142390683dbc2', | ||
hash: '0x1eeb9cd2ef93e33231833322820f0a2be9671c265c27a8135d1eecb0679f5e24', | ||
input: '0xe0db3fcf00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64000000000000000000000000865c301c46d64de5c9b124ec1a97ef1efc1bcbd100000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000011c37937e08000000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000004a8f684ad21b200000000000000000000000000000000000000000000000000000000662a88bb0000000000000000000000000000000000000000000000000000000000000120ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '9000000000000000000' | ||
}, | ||
params: { | ||
sourceChainId: _questdkPluginUtils.Chains.BASE, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE | ||
// tokenAddress: zeroAddress, | ||
// amount: GreaterThanOrEqual(parseEther('9')), | ||
// recipient: '0xeb01d9ef642c54f42a36fd3a80b66f0fcb13e92a', | ||
} | ||
}; | ||
var passingTestCases = exports.passingTestCases = [(0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when bridging ERC20 tokens'), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ETH, 'when bridging ETH'), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ETH2, 'when bridging ETH'), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when amount is "any"', { | ||
amount: undefined | ||
}), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when token is "any"', { | ||
amount: undefined, | ||
recipient: undefined | ||
tokenAddress: undefined | ||
}), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ETH, 'when token is "any"', { | ||
amount: undefined, | ||
tokenAddress: undefined | ||
})]; | ||
@@ -139,0 +159,0 @@ var failingTestCases = exports.failingTestCases = [(0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when amount is insufficient', { |
@@ -1,4 +0,4 @@ | ||
import { ACROSS_BRIDGE_ABI } from './abi.js'; | ||
import { CHAIN_ID_ARRAY } from './chain-ids.js'; | ||
import { CHAIN_TO_SPOKEPOOL, CHAIN_TO_SPOKE_VERIFIER, CHAIN_TO_WETH } from './contracts.js'; | ||
import { ACROSS_BRIDGE_ABI } from './abi'; | ||
import { CHAIN_ID_ARRAY } from './chain-ids'; | ||
import { CHAIN_TO_SPOKEPOOL, CHAIN_TO_SPOKE_VERIFIER, CHAIN_TO_WETH } from './contracts'; | ||
import { compressJson } from '@rabbitholegg/questdk'; | ||
@@ -17,3 +17,5 @@ import { CHAIN_TO_TOKENS } from '@rabbitholegg/questdk-plugin-utils'; | ||
const tokenIn = isNative ? CHAIN_TO_WETH[sourceChainId] : tokenAddress; | ||
const bridgeContract = isNative ? CHAIN_TO_SPOKE_VERIFIER[sourceChainId] : CHAIN_TO_SPOKEPOOL[sourceChainId]; | ||
const bridgeContract = { | ||
$or: [CHAIN_TO_SPOKE_VERIFIER[sourceChainId]?.toLowerCase(), CHAIN_TO_SPOKEPOOL[sourceChainId]?.toLowerCase()] | ||
}; | ||
return compressJson({ | ||
@@ -20,0 +22,0 @@ chainId: sourceChainId, |
@@ -1,7 +0,5 @@ | ||
import { bridge } from './Across.js'; | ||
import { ACROSS_BRIDGE_ABI } from './abi.js'; | ||
import { CHAIN_TO_SPOKEPOOL } from './contracts.js'; | ||
import { DEPOSIT_ERC20, DEPOSIT_ETH, WITHDRAW_ERC20, WITHDRAW_ETH, failingTestCases, passingTestCases } from './test-transactions.js'; | ||
import { bridge } from './Across'; | ||
import { DEPOSIT_ERC20, DEPOSIT_ETH, WITHDRAW_ERC20, WITHDRAW_ETH, failingTestCases, passingTestCases } from './test-transactions'; | ||
import { Chains } from '@rabbitholegg/questdk-plugin-utils'; | ||
import { GreaterThanOrEqual, apply } from '@rabbitholegg/questdk/filter'; | ||
import { GreaterThanOrEqual, apply } from '@rabbitholegg/questdk'; | ||
import { parseEther } from 'viem'; | ||
@@ -13,71 +11,24 @@ import { describe, expect, test } from 'vitest'; | ||
export const USDT_ADDRESS_MAINNET = '0xdAC17F958D2ee523a2206206994597C13D831ec7'; | ||
const TEST_USER = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'; | ||
describe('Given the Across plugin', () => { | ||
describe('When generating the filter', () => { | ||
test('should return a valid bridge action filter for L2 token tx', async () => { | ||
test('when making a valid bridge action', async () => { | ||
const filter = await bridge({ | ||
sourceChainId: Chains.ARBITRUM_ONE, | ||
destinationChainId: Chains.ETHEREUM, | ||
tokenAddress: USDT_ADDRESS_ARBITRUM, | ||
amount: GreaterThanOrEqual(100000n), | ||
recipient: TEST_USER | ||
sourceChainId: 1, | ||
destinationChainId: 10 | ||
}); | ||
expect(filter).to.deep.equal({ | ||
chainId: Chains.ARBITRUM_ONE, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ARBITRUM_ONE], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: Chains.ETHEREUM, | ||
amount: { | ||
$gte: '100000' | ||
}, | ||
originToken: USDT_ADDRESS_ARBITRUM | ||
} | ||
}); | ||
expect(filter).toBeTypeOf('object'); | ||
expect(Number(filter.chainId)).toBe(1); | ||
if (typeof filter.to === 'string') { | ||
expect(filter.to).toMatch(/^0x[a-fA-F0-9]{40}$/); | ||
} else { | ||
// if to is an object, it should have a logical operator as the only key | ||
expect(filter.to).toBeTypeOf('object'); | ||
expect(Object.keys(filter.to)).toHaveLength(1); | ||
expect(['$or', '$and'].some(prop => Object.hasOwnProperty.call(filter.to, prop))).to.be.true; | ||
expect(Object.values(filter.to)[0]).to.satisfy(arr => arr.every(val => val.match(/^0x[a-fA-F0-9]{40}$/))); | ||
} | ||
// Check the input property is the correct type and has a valid filter operator | ||
expect(filter.input).toBeTypeOf('object'); | ||
expect(['$abi', '$abiParams', '$abiAbstract', '$or', '$and'].some(prop => Object.hasOwnProperty.call(filter.input, prop))).to.be.true; | ||
}); | ||
test('should return a valid bridge action filter for L1 token tx', async () => { | ||
const filter = await bridge({ | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: USDT_ADDRESS_MAINNET, | ||
amount: GreaterThanOrEqual(100000n), | ||
recipient: TEST_USER | ||
}); | ||
expect(filter).to.deep.equal({ | ||
chainId: Chains.ETHEREUM, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ETHEREUM], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
amount: { | ||
$gte: '100000' | ||
}, | ||
originToken: USDT_ADDRESS_MAINNET | ||
} | ||
}); | ||
}); | ||
test('should return a valid bridge action filter for L1 ETH tx', async () => { | ||
const filter = await bridge({ | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: WETH_ADRESS_MAINNET, | ||
amount: GreaterThanOrEqual(100000n), | ||
recipient: TEST_USER | ||
}); | ||
expect(filter).to.deep.equal({ | ||
chainId: Chains.ETHEREUM, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ETHEREUM], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
amount: { | ||
$gte: '100000' | ||
}, | ||
originToken: WETH_ADRESS_MAINNET | ||
} | ||
}); | ||
}); | ||
}); | ||
@@ -84,0 +35,0 @@ describe('When applying the filter', () => { |
@@ -1,2 +0,2 @@ | ||
import { bridge, getSupportedChainIds, getSupportedTokenAddresses } from './Across.js'; | ||
import { bridge, getSupportedChainIds, getSupportedTokenAddresses } from './Across'; | ||
import { PluginActionNotImplementedError } from '@rabbitholegg/questdk'; | ||
@@ -3,0 +3,0 @@ export const Across = { |
@@ -57,3 +57,3 @@ import { GreaterThanOrEqual } from '@rabbitholegg/questdk'; | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
to: '0xe35e9842fceaca96570b734083f4a58e8f7c5f2a', | ||
transactionIndex: 1, | ||
@@ -80,3 +80,3 @@ value: '0', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
to: '0xe35e9842fceaca96570b734083f4a58e8f7c5f2a', | ||
transactionIndex: 1, | ||
@@ -126,7 +126,27 @@ value: '150000000000000000', | ||
}; | ||
export const passingTestCases = [createTestCase(BRIDGE_ERC, 'when bridging ERC20 tokens'), createTestCase(BRIDGE_ETH, 'when bridging ETH'), createTestCase(BRIDGE_ERC, 'when amount is "any"', { | ||
const BRIDGE_ETH2 = { | ||
transaction: { | ||
chainId: 8453, | ||
from: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
to: '0xb4a8d45647445ea9fc3e1058096142390683dbc2', | ||
hash: '0x1eeb9cd2ef93e33231833322820f0a2be9671c265c27a8135d1eecb0679f5e24', | ||
input: '0xe0db3fcf00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64000000000000000000000000865c301c46d64de5c9b124ec1a97ef1efc1bcbd100000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000011c37937e08000000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000004a8f684ad21b200000000000000000000000000000000000000000000000000000000662a88bb0000000000000000000000000000000000000000000000000000000000000120ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '9000000000000000000' | ||
}, | ||
params: { | ||
sourceChainId: Chains.BASE, | ||
destinationChainId: Chains.ARBITRUM_ONE | ||
// tokenAddress: zeroAddress, | ||
// amount: GreaterThanOrEqual(parseEther('9')), | ||
// recipient: '0xeb01d9ef642c54f42a36fd3a80b66f0fcb13e92a', | ||
} | ||
}; | ||
export const passingTestCases = [createTestCase(BRIDGE_ERC, 'when bridging ERC20 tokens'), createTestCase(BRIDGE_ETH, 'when bridging ETH'), createTestCase(BRIDGE_ETH2, 'when bridging ETH'), createTestCase(BRIDGE_ERC, 'when amount is "any"', { | ||
amount: undefined | ||
}), createTestCase(BRIDGE_ERC, 'when token is "any"', { | ||
amount: undefined, | ||
recipient: undefined | ||
tokenAddress: undefined | ||
}), createTestCase(BRIDGE_ETH, 'when token is "any"', { | ||
amount: undefined, | ||
tokenAddress: undefined | ||
})]; | ||
@@ -133,0 +153,0 @@ export const failingTestCases = [createTestCase(BRIDGE_ERC, 'when amount is insufficient', { |
{ | ||
"name": "@rabbitholegg/questdk-plugin-across", | ||
"version": "1.0.0-alpha.32", | ||
"version": "1.0.0-alpha.33", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -1,4 +0,2 @@ | ||
import { bridge } from './Across.js' | ||
import { ACROSS_BRIDGE_ABI } from './abi.js' | ||
import { CHAIN_TO_SPOKEPOOL } from './contracts.js' | ||
import { bridge } from './Across' | ||
import { | ||
@@ -11,5 +9,5 @@ DEPOSIT_ERC20, | ||
passingTestCases, | ||
} from './test-transactions.js' | ||
} from './test-transactions' | ||
import { Chains } from '@rabbitholegg/questdk-plugin-utils' | ||
import { GreaterThanOrEqual, apply } from '@rabbitholegg/questdk/filter' | ||
import { GreaterThanOrEqual, apply } from '@rabbitholegg/questdk' | ||
import { parseEther } from 'viem' | ||
@@ -25,77 +23,34 @@ import { describe, expect, test } from 'vitest' | ||
const TEST_USER = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' | ||
describe('Given the Across plugin', () => { | ||
describe('When generating the filter', () => { | ||
test('should return a valid bridge action filter for L2 token tx', async () => { | ||
test('when making a valid bridge action', async () => { | ||
const filter = await bridge({ | ||
sourceChainId: Chains.ARBITRUM_ONE, | ||
destinationChainId: Chains.ETHEREUM, | ||
tokenAddress: USDT_ADDRESS_ARBITRUM, | ||
amount: GreaterThanOrEqual(100000n), | ||
recipient: TEST_USER, | ||
sourceChainId: 1, | ||
destinationChainId: 10, | ||
}) | ||
expect(filter).to.deep.equal({ | ||
chainId: Chains.ARBITRUM_ONE, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ARBITRUM_ONE], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: Chains.ETHEREUM, | ||
amount: { | ||
$gte: '100000', | ||
}, | ||
originToken: USDT_ADDRESS_ARBITRUM, | ||
}, | ||
}) | ||
expect(filter).toBeTypeOf('object') | ||
expect(Number(filter.chainId)).toBe(1) | ||
if (typeof filter.to === 'string') { | ||
expect(filter.to).toMatch(/^0x[a-fA-F0-9]{40}$/) | ||
} else { | ||
// if to is an object, it should have a logical operator as the only key | ||
expect(filter.to).toBeTypeOf('object') | ||
expect(Object.keys(filter.to)).toHaveLength(1) | ||
expect( | ||
['$or', '$and'].some((prop) => | ||
Object.hasOwnProperty.call(filter.to, prop), | ||
), | ||
).to.be.true | ||
expect(Object.values(filter.to)[0]).to.satisfy((arr: string[]) => | ||
arr.every((val) => val.match(/^0x[a-fA-F0-9]{40}$/)), | ||
) | ||
} | ||
// Check the input property is the correct type and has a valid filter operator | ||
expect(filter.input).toBeTypeOf('object') | ||
expect( | ||
['$abi', '$abiParams', '$abiAbstract', '$or', '$and'].some((prop) => | ||
Object.hasOwnProperty.call(filter.input, prop), | ||
), | ||
).to.be.true | ||
}) | ||
test('should return a valid bridge action filter for L1 token tx', async () => { | ||
const filter = await bridge({ | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: USDT_ADDRESS_MAINNET, | ||
amount: GreaterThanOrEqual(100000n), | ||
recipient: TEST_USER, | ||
}) | ||
expect(filter).to.deep.equal({ | ||
chainId: Chains.ETHEREUM, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ETHEREUM], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
amount: { | ||
$gte: '100000', | ||
}, | ||
originToken: USDT_ADDRESS_MAINNET, | ||
}, | ||
}) | ||
}) | ||
test('should return a valid bridge action filter for L1 ETH tx', async () => { | ||
const filter = await bridge({ | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: WETH_ADRESS_MAINNET, | ||
amount: GreaterThanOrEqual(100000n), | ||
recipient: TEST_USER, | ||
}) | ||
expect(filter).to.deep.equal({ | ||
chainId: Chains.ETHEREUM, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ETHEREUM], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
amount: { | ||
$gte: '100000', | ||
}, | ||
originToken: WETH_ADRESS_MAINNET, | ||
}, | ||
}) | ||
}) | ||
}) | ||
@@ -102,0 +57,0 @@ describe('When applying the filter', () => { |
@@ -1,3 +0,3 @@ | ||
import { ACROSS_BRIDGE_ABI } from './abi.js' | ||
import { CHAIN_ID_ARRAY } from './chain-ids.js' | ||
import { ACROSS_BRIDGE_ABI } from './abi' | ||
import { CHAIN_ID_ARRAY } from './chain-ids' | ||
import { | ||
@@ -7,3 +7,3 @@ CHAIN_TO_SPOKEPOOL, | ||
CHAIN_TO_WETH, | ||
} from './contracts.js' | ||
} from './contracts' | ||
import { type BridgeActionParams, compressJson } from '@rabbitholegg/questdk' | ||
@@ -19,5 +19,8 @@ import { CHAIN_TO_TOKENS } from '@rabbitholegg/questdk-plugin-utils' | ||
const tokenIn = isNative ? CHAIN_TO_WETH[sourceChainId] : tokenAddress | ||
const bridgeContract = isNative | ||
? CHAIN_TO_SPOKE_VERIFIER[sourceChainId] | ||
: CHAIN_TO_SPOKEPOOL[sourceChainId] | ||
const bridgeContract = { | ||
$or: [ | ||
CHAIN_TO_SPOKE_VERIFIER[sourceChainId]?.toLowerCase(), | ||
CHAIN_TO_SPOKEPOOL[sourceChainId]?.toLowerCase(), | ||
], | ||
} | ||
@@ -24,0 +27,0 @@ return compressJson({ |
@@ -5,3 +5,3 @@ import { | ||
getSupportedTokenAddresses, | ||
} from './Across.js' | ||
} from './Across' | ||
import { | ||
@@ -8,0 +8,0 @@ type IActionPlugin, |
@@ -69,3 +69,3 @@ import { GreaterThanOrEqual } from '@rabbitholegg/questdk' | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
to: '0xe35e9842fceaca96570b734083f4a58e8f7c5f2a', | ||
transactionIndex: 1, | ||
@@ -94,3 +94,3 @@ value: '0', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
to: '0xe35e9842fceaca96570b734083f4a58e8f7c5f2a', | ||
transactionIndex: 1, | ||
@@ -145,10 +145,34 @@ value: '150000000000000000', | ||
const BRIDGE_ETH2: TestParams<BridgeActionParams> = { | ||
transaction: { | ||
chainId: 8453, | ||
from: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
to: '0xb4a8d45647445ea9fc3e1058096142390683dbc2', | ||
hash: '0x1eeb9cd2ef93e33231833322820f0a2be9671c265c27a8135d1eecb0679f5e24', | ||
input: | ||
'0xe0db3fcf00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64000000000000000000000000865c301c46d64de5c9b124ec1a97ef1efc1bcbd100000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000011c37937e08000000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000004a8f684ad21b200000000000000000000000000000000000000000000000000000000662a88bb0000000000000000000000000000000000000000000000000000000000000120ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '9000000000000000000', | ||
}, | ||
params: { | ||
sourceChainId: Chains.BASE, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
// tokenAddress: zeroAddress, | ||
// amount: GreaterThanOrEqual(parseEther('9')), | ||
// recipient: '0xeb01d9ef642c54f42a36fd3a80b66f0fcb13e92a', | ||
}, | ||
} | ||
export const passingTestCases = [ | ||
createTestCase(BRIDGE_ERC, 'when bridging ERC20 tokens'), | ||
createTestCase(BRIDGE_ETH, 'when bridging ETH'), | ||
createTestCase(BRIDGE_ETH2, 'when bridging ETH'), | ||
createTestCase(BRIDGE_ERC, 'when amount is "any"', { amount: undefined }), | ||
createTestCase(BRIDGE_ERC, 'when token is "any"', { | ||
amount: undefined, | ||
recipient: undefined, | ||
tokenAddress: undefined, | ||
}), | ||
createTestCase(BRIDGE_ETH, 'when token is "any"', { | ||
amount: undefined, | ||
tokenAddress: undefined, | ||
}), | ||
] | ||
@@ -155,0 +179,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2380405
0
14159