@rabbitholegg/questdk-plugin-across
Advanced tools
Comparing version 1.0.0-alpha.31 to 1.0.0-alpha.32
# @rabbitholegg/questdk-plugin-across | ||
## 1.0.0-alpha.32 | ||
### Minor Changes | ||
- [#357](https://github.com/rabbitholegg/questdk-plugins/pull/357) [`47e5396b`](https://github.com/rabbitholegg/questdk-plugins/commit/47e5396b36cf3fbe8d6c0f327f54dfd8eb0a6d60) Thanks [@mmackz](https://github.com/mmackz)! - update for Across V3 | ||
- [#296](https://github.com/rabbitholegg/questdk-plugins/pull/296) [`756ca6c0`](https://github.com/rabbitholegg/questdk-plugins/commit/756ca6c0ba08c2c7649a946af54c9186169a9c0e) Thanks [@Quazia](https://github.com/Quazia)! - Revise build and lint strategies | ||
### Patch Changes | ||
- Updated dependencies [[`756ca6c0`](https://github.com/rabbitholegg/questdk-plugins/commit/756ca6c0ba08c2c7649a946af54c9186169a9c0e)]: | ||
- @rabbitholegg/questdk-plugin-utils@1.0.0-alpha.19 | ||
- @rabbitholegg/questdk@2.0.0-alpha.45 | ||
## 1.0.0-alpha.31 | ||
@@ -4,0 +18,0 @@ |
@@ -1,7 +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":77}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":35}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":47}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":44}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":58}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":61}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":72}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":80}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":10}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":0}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":101}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":23}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":62}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":79}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":12}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":64}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":57}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":85}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":53}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":74}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":72}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":4}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":1}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":0}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":49}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":19}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":26}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":11}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":1}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":0}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":49}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":23}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7,"12":7,"13":7,"14":7,"15":7,"16":7,"17":7,"18":7,"19":7,"20":7,"21":7,"22":7,"23":1,"24":1,"25":0,"26":0,"27":0,"28":0,"29":1,"30":1,"31":0,"32":0},"branchMap":{"0":{"type":"branch","line":6,"loc":{"start":{"line":6,"column":22},"end":{"line":23,"column":1}},"locations":[{"start":{"line":6,"column":22},"end":{"line":23,"column":1}}]}},"b":{"0":[7]},"fnMap":{"0":{"name":"bridge","decl":{"start":{"line":6,"column":22},"end":{"line":23,"column":1}},"loc":{"start":{"line":6,"column":22},"end":{"line":23,"column":1}},"line":6},"1":{"name":"getSupportedTokenAddresses","decl":{"start":{"line":25,"column":42},"end":{"line":29,"column":1}},"loc":{"start":{"line":25,"column":42},"end":{"line":29,"column":1}},"line":25},"2":{"name":"getSupportedChainIds","decl":{"start":{"line":31,"column":36},"end":{"line":33,"column":1}},"loc":{"start":{"line":31,"column":36},"end":{"line":33,"column":1}},"line":31}},"f":{"0":7,"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":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},"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":29}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":35}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":38}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":34}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":33}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":35}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":31}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":15}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":19}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":20}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":18}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":16}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"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},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/chain-to-contract.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/chain-to-contract.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":8}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":17}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":17}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":16}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":15}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":17}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":13}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":32}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":8}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":15}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":19}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":20}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":20}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":18}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":16}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":23}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":65}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":33}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":36}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":38}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":38}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":34}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":30}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":10}}},"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},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
,"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/contract-addresses.ts": {"path":"/home/runner/work/questdk-plugins/questdk-plugins/packages/across/src/contract-addresses.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":74}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":74}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":73}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":72}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":74}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":70}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":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":28}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":18}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":12}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":73}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":26}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":53}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":15}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":77}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":8}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":593}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":13}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":51}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":23}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":30}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":9}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":74}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":73}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":26}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":13}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":17}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":17}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":1}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":30}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":18}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":12}},"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":53}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":15}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":77}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":8}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":593}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":11}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":51}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":23}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":13}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":9}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":74}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":74}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":26}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":30}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":36}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":13}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":17}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":17}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":1}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":31}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":12}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":73}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":27}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":53}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":17}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":24}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":28}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":28}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":77}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":8}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":593}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":13}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":51}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":22}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":13}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":18}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":17}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":17}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":9}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":74}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":74}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":17}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":1}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":29}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":12}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":73}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":27}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":53}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":17}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":24}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":28}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":28}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":77}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":8}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":593}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":12}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":51}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":22}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":30}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":18}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":17}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":17}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":9}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":73}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":74}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":17}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"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},"branchMap":{},"b":{},"fnMap":{},"f":{}} | ||
{"/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/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":{}} | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.ACROSS_BRIDGE_ABI = void 0; | ||
exports.ACROSS_BRIDGE_ABI = [ | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'recipient', type: 'address' }, | ||
{ internalType: 'address', name: 'originToken', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'destinationChainId', type: 'uint256' }, | ||
{ internalType: 'int64', name: 'relayerFeePct', type: 'int64' }, | ||
{ internalType: 'uint32', name: 'quoteTimestamp', type: 'uint32' }, | ||
{ internalType: 'bytes', name: 'message', type: 'bytes' }, | ||
{ internalType: 'uint256', name: 'maxCount', type: 'uint256' }, | ||
], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
]; | ||
var ACROSS_BRIDGE_ABI = exports.ACROSS_BRIDGE_ABI = [{ | ||
inputs: [{ | ||
internalType: 'address', | ||
name: 'recipient', | ||
type: 'address' | ||
}, { | ||
internalType: 'address', | ||
name: 'originToken', | ||
type: 'address' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'amount', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'destinationChainId', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'int64', | ||
name: 'relayerFeePct', | ||
type: 'int64' | ||
}, { | ||
internalType: 'uint32', | ||
name: 'quoteTimestamp', | ||
type: 'uint32' | ||
}, { | ||
internalType: 'bytes', | ||
name: 'message', | ||
type: 'bytes' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'maxCount', | ||
type: 'uint256' | ||
}], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function' | ||
}, { | ||
inputs: [{ | ||
internalType: 'contract SpokePoolInterface', | ||
name: 'spokePool', | ||
type: 'address' | ||
}, { | ||
internalType: 'address', | ||
name: 'recipient', | ||
type: 'address' | ||
}, { | ||
internalType: 'address', | ||
name: 'originToken', | ||
type: 'address' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'amount', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'destinationChainId', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'int64', | ||
name: 'relayerFeePct', | ||
type: 'int64' | ||
}, { | ||
internalType: 'uint32', | ||
name: 'quoteTimestamp', | ||
type: 'uint32' | ||
}, { | ||
internalType: 'bytes', | ||
name: 'message', | ||
type: 'bytes' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'maxCount', | ||
type: 'uint256' | ||
}], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function' | ||
}]; | ||
//# sourceMappingURL=abi.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSupportedChainIds = exports.getSupportedTokenAddresses = exports.bridge = void 0; | ||
const questdk_1 = require("@rabbitholegg/questdk"); | ||
const chain_ids_js_1 = require("./chain-ids.js"); | ||
const abi_js_1 = require("./abi.js"); | ||
const chain_to_contract_js_1 = require("./chain-to-contract.js"); | ||
const bridge = async (bridge) => { | ||
const { sourceChainId, destinationChainId, tokenAddress, amount, recipient } = bridge; | ||
return (0, questdk_1.compressJson)({ | ||
chainId: sourceChainId, | ||
to: chain_to_contract_js_1.CHAIN_TO_CONTRACT[sourceChainId], | ||
input: { | ||
$abi: abi_js_1.ACROSS_BRIDGE_ABI, | ||
recipient: recipient, | ||
destinationChainId: destinationChainId, | ||
amount: amount, | ||
originToken: tokenAddress, | ||
}, | ||
}); | ||
}; | ||
exports.bridge = bridge; | ||
const getSupportedTokenAddresses = async (_chainId) => { | ||
return []; | ||
}; | ||
exports.getSupportedTokenAddresses = getSupportedTokenAddresses; | ||
const getSupportedChainIds = async () => { | ||
return chain_ids_js_1.CHAIN_ID_ARRAY; | ||
}; | ||
exports.getSupportedChainIds = getSupportedChainIds; | ||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
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 _questdk = require("@rabbitholegg/questdk"); | ||
var _questdkPluginUtils = require("@rabbitholegg/questdk-plugin-utils"); | ||
var _viem = require("viem"); | ||
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; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
var bridge = exports.bridge = /*#__PURE__*/function () { | ||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_bridge) { | ||
var sourceChainId, destinationChainId, tokenAddress, amount, recipient, isNative, tokenIn, bridgeContract; | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
sourceChainId = _bridge.sourceChainId, destinationChainId = _bridge.destinationChainId, tokenAddress = _bridge.tokenAddress, amount = _bridge.amount, recipient = _bridge.recipient; | ||
isNative = tokenAddress === _viem.zeroAddress; | ||
tokenIn = isNative ? _contracts.CHAIN_TO_WETH[sourceChainId] : tokenAddress; | ||
bridgeContract = isNative ? _contracts.CHAIN_TO_SPOKE_VERIFIER[sourceChainId] : _contracts.CHAIN_TO_SPOKEPOOL[sourceChainId]; | ||
return _context.abrupt("return", (0, _questdk.compressJson)({ | ||
chainId: sourceChainId, | ||
to: bridgeContract, | ||
input: { | ||
$abi: _abi.ACROSS_BRIDGE_ABI, | ||
recipient: recipient, | ||
destinationChainId: destinationChainId, | ||
amount: amount, | ||
originToken: tokenIn | ||
} | ||
})); | ||
case 5: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}, _callee); | ||
})); | ||
return function bridge(_x) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
var getSupportedTokenAddresses = exports.getSupportedTokenAddresses = /*#__PURE__*/function () { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_chainId) { | ||
var _CHAIN_TO_TOKENS$_cha; | ||
return _regeneratorRuntime().wrap(function _callee2$(_context2) { | ||
while (1) switch (_context2.prev = _context2.next) { | ||
case 0: | ||
return _context2.abrupt("return", (_CHAIN_TO_TOKENS$_cha = _questdkPluginUtils.CHAIN_TO_TOKENS[_chainId]) !== null && _CHAIN_TO_TOKENS$_cha !== void 0 ? _CHAIN_TO_TOKENS$_cha : []); | ||
case 1: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
}, _callee2); | ||
})); | ||
return function getSupportedTokenAddresses(_x2) { | ||
return _ref2.apply(this, arguments); | ||
}; | ||
}(); | ||
var getSupportedChainIds = exports.getSupportedChainIds = /*#__PURE__*/function () { | ||
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { | ||
return _regeneratorRuntime().wrap(function _callee3$(_context3) { | ||
while (1) switch (_context3.prev = _context3.next) { | ||
case 0: | ||
return _context3.abrupt("return", _chainIds.CHAIN_ID_ARRAY); | ||
case 1: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
}, _callee3); | ||
})); | ||
return function getSupportedChainIds() { | ||
return _ref3.apply(this, arguments); | ||
}; | ||
}(); | ||
//# sourceMappingURL=Across.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CHAIN_ID_ARRAY = exports.POLYGON_CHAIN_ID = exports.BASE_CHAIN_ID = exports.ZKSYNC_CHAIN_ID = exports.ARBITRUM_CHAIN_ID = exports.OPTIMISM_CHAIN_ID = exports.ETH_CHAIN_ID = void 0; | ||
exports.ETH_CHAIN_ID = 1; | ||
exports.OPTIMISM_CHAIN_ID = 10; | ||
exports.ARBITRUM_CHAIN_ID = 42161; | ||
exports.ZKSYNC_CHAIN_ID = 324; | ||
exports.BASE_CHAIN_ID = 8453; | ||
exports.POLYGON_CHAIN_ID = 137; | ||
exports.CHAIN_ID_ARRAY = [ | ||
exports.ETH_CHAIN_ID, | ||
exports.POLYGON_CHAIN_ID, | ||
exports.OPTIMISM_CHAIN_ID, | ||
exports.ARBITRUM_CHAIN_ID, | ||
exports.ZKSYNC_CHAIN_ID, | ||
exports.BASE_CHAIN_ID, | ||
]; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.CHAIN_ID_ARRAY = void 0; | ||
var _questdkPluginUtils = require("@rabbitholegg/questdk-plugin-utils"); | ||
var CHAIN_ID_ARRAY = exports.CHAIN_ID_ARRAY = [_questdkPluginUtils.Chains.ETHEREUM, _questdkPluginUtils.Chains.POLYGON_POS, _questdkPluginUtils.Chains.OPTIMISM, _questdkPluginUtils.Chains.ARBITRUM_ONE, _questdkPluginUtils.Chains.ZK_SYNC_ERA, _questdkPluginUtils.Chains.BASE, _questdkPluginUtils.Chains.LINEA]; | ||
//# sourceMappingURL=chain-ids.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.Across = void 0; | ||
const questdk_1 = require("@rabbitholegg/questdk"); | ||
const Across_js_1 = require("./Across.js"); | ||
exports.Across = { | ||
pluginId: 'across', | ||
getSupportedTokenAddresses: Across_js_1.getSupportedTokenAddresses, | ||
getSupportedChainIds: Across_js_1.getSupportedChainIds, | ||
bridge: Across_js_1.bridge, | ||
swap: async () => new questdk_1.PluginActionNotImplementedError(), | ||
mint: async () => new questdk_1.PluginActionNotImplementedError(), | ||
var _Across = require("./Across.js"); | ||
var _questdk = require("@rabbitholegg/questdk"); | ||
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; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
var Across = exports.Across = { | ||
pluginId: 'across', | ||
getSupportedTokenAddresses: _Across.getSupportedTokenAddresses, | ||
getSupportedChainIds: _Across.getSupportedChainIds, | ||
bridge: _Across.bridge, | ||
swap: function () { | ||
var _swap = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
return _context.abrupt("return", new _questdk.PluginActionNotImplementedError()); | ||
case 1: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}, _callee); | ||
})); | ||
function swap() { | ||
return _swap.apply(this, arguments); | ||
} | ||
return swap; | ||
}(), | ||
mint: function () { | ||
var _mint = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { | ||
return _regeneratorRuntime().wrap(function _callee2$(_context2) { | ||
while (1) switch (_context2.prev = _context2.next) { | ||
case 0: | ||
return _context2.abrupt("return", new _questdk.PluginActionNotImplementedError()); | ||
case 1: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
}, _callee2); | ||
})); | ||
function mint() { | ||
return _mint.apply(this, arguments); | ||
} | ||
return mint; | ||
}() | ||
}; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WITHDRAW_ETH = exports.WITHDRAW_ERC20 = exports.DEPOSIT_ERC20 = exports.DEPOSIT_ETH = void 0; | ||
exports.DEPOSIT_ETH = { | ||
type: 'eip2930', | ||
blockHash: '0xb5a7ec990a7a38327d3561bbbb9be5511a3169d47fad94ce934ac1fb17a671ba', | ||
blockNumber: '18073017', | ||
from: '0xe751378ec5e5c0b64c4d16a077e8f11fbcfc958a', | ||
gas: '71783', | ||
hash: '0xa90420546af9facb433464c7d6de24dee62b63ec5eff9e542ccc54a7c1be0e1c', | ||
input: '0x1186ec33000000000000000000000000e751378ec5e5c0b64c4d16a077e8f11fbcfc958a000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000461977a33974000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000002a6fefb6a42ce0000000000000000000000000000000000000000000000000000000064f79f040000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 457, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 49, | ||
value: '315700000000000000', | ||
v: '1', | ||
r: '0xde2ae6267d6e595c4165281efd2e1de003fce554919a353d08c4ae106a3c0324', | ||
s: '0x77d0b71828a34bb7e747f8cf729fcd9565c46a8c44a589626d123c526120b88', | ||
gasPrice: '28469577825', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x1', | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.passingTestCases = exports.failingTestCases = exports.WITHDRAW_ETH = exports.WITHDRAW_ERC20 = exports.DEPOSIT_ETH = exports.DEPOSIT_ERC20 = void 0; | ||
var _questdk = require("@rabbitholegg/questdk"); | ||
var _questdkPluginUtils = require("@rabbitholegg/questdk-plugin-utils"); | ||
var _viem = require("viem"); | ||
var DEPOSIT_ETH = exports.DEPOSIT_ETH = { | ||
type: 'eip2930', | ||
blockHash: '0xb5a7ec990a7a38327d3561bbbb9be5511a3169d47fad94ce934ac1fb17a671ba', | ||
blockNumber: '18073017', | ||
from: '0xe751378ec5e5c0b64c4d16a077e8f11fbcfc958a', | ||
gas: '71783', | ||
hash: '0xa90420546af9facb433464c7d6de24dee62b63ec5eff9e542ccc54a7c1be0e1c', | ||
input: '0x1186ec33000000000000000000000000e751378ec5e5c0b64c4d16a077e8f11fbcfc958a000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000461977a33974000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000002a6fefb6a42ce0000000000000000000000000000000000000000000000000000000064f79f040000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 457, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 49, | ||
value: '315700000000000000', | ||
v: '1', | ||
r: '0xde2ae6267d6e595c4165281efd2e1de003fce554919a353d08c4ae106a3c0324', | ||
s: '0x77d0b71828a34bb7e747f8cf729fcd9565c46a8c44a589626d123c526120b88', | ||
gasPrice: '28469577825', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x1' | ||
}; | ||
exports.DEPOSIT_ERC20 = { | ||
type: 'eip1559', | ||
blockHash: '0xe5f73d3f81f334e993ee2a1f2c3742a220ddb892c7d48f1b5035dd7c08141702', | ||
blockNumber: '18070429', | ||
from: '0xb3b873a999cff617307a351e32a3dd7a94add5b2', | ||
gas: '85063', | ||
hash: '0x1d27d0bd0b8bc1894f8e3b30fdb527f2a3d8eee2efaf6d43d23af05f4c7c976b', | ||
input: '0x1186ec33000000000000000000000000b3b873a999cff617307a351e32a3dd7a94add5b2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000890000000000000000000000000000000000000000000000000001298f33a194000000000000000000000000000000000000000000000000000000000064f720740000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 1, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 77, | ||
value: '0', | ||
v: '0', | ||
r: '0x6c84f45cf1dfefd4cdad59e02d24bfe615a6dd32ebbd339906c8f2eb6e77cff6', | ||
s: '0x77e2399b01e2ee8d05be7171513a5011d0900536d532e4b40128d927ed41ad77', | ||
gasPrice: '12517677963', | ||
maxFeePerGas: '14750000000', | ||
maxPriorityFeePerGas: '450000000', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x2', | ||
var DEPOSIT_ERC20 = exports.DEPOSIT_ERC20 = { | ||
type: 'eip1559', | ||
blockHash: '0xe5f73d3f81f334e993ee2a1f2c3742a220ddb892c7d48f1b5035dd7c08141702', | ||
blockNumber: '18070429', | ||
from: '0xb3b873a999cff617307a351e32a3dd7a94add5b2', | ||
gas: '85063', | ||
hash: '0x1d27d0bd0b8bc1894f8e3b30fdb527f2a3d8eee2efaf6d43d23af05f4c7c976b', | ||
input: '0x1186ec33000000000000000000000000b3b873a999cff617307a351e32a3dd7a94add5b2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000890000000000000000000000000000000000000000000000000001298f33a194000000000000000000000000000000000000000000000000000000000064f720740000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 1, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 77, | ||
value: '0', | ||
v: '0', | ||
r: '0x6c84f45cf1dfefd4cdad59e02d24bfe615a6dd32ebbd339906c8f2eb6e77cff6', | ||
s: '0x77e2399b01e2ee8d05be7171513a5011d0900536d532e4b40128d927ed41ad77', | ||
gasPrice: '12517677963', | ||
maxFeePerGas: '14750000000', | ||
maxPriorityFeePerGas: '450000000', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x2' | ||
}; | ||
exports.WITHDRAW_ERC20 = { | ||
blockHash: '0x88bb85e52cff52902327cd510708bb6c03c746f2785531a0d6a4cc87cf526bd6', | ||
blockNumber: '128390530', | ||
from: '0x49b887e3f64c7007e76f72c17ce29c7bcfb9af55', | ||
gas: '1936056', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0x0eed06fe27fcef1666d62ce9a0740eaf498ba94664588f3089b00602c930f23b', | ||
input: '0x1186ec3300000000000000000000000049b887e3f64c7007e76f72c17ce29c7bcfb9af55000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb90000000000000000000000000000000000000000000000000000000001312d000000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000585209cd1dc000000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '0', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '1', | ||
r: '0xac74be86881cc50d0204e8235a1b18296b9ecb79a76a38d905b0f09a00b54f90', | ||
s: '0x27a79140ccfe1b585edf22fcbc80938aabcb2e3ae2eca1d2e5ec16057cae16b5', | ||
typeHex: '0x2', | ||
var WITHDRAW_ERC20 = exports.WITHDRAW_ERC20 = { | ||
blockHash: '0x88bb85e52cff52902327cd510708bb6c03c746f2785531a0d6a4cc87cf526bd6', | ||
blockNumber: '128390530', | ||
from: '0x49b887e3f64c7007e76f72c17ce29c7bcfb9af55', | ||
gas: '1936056', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0x0eed06fe27fcef1666d62ce9a0740eaf498ba94664588f3089b00602c930f23b', | ||
input: '0x1186ec3300000000000000000000000049b887e3f64c7007e76f72c17ce29c7bcfb9af55000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb90000000000000000000000000000000000000000000000000000000001312d000000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000585209cd1dc000000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '0', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '1', | ||
r: '0xac74be86881cc50d0204e8235a1b18296b9ecb79a76a38d905b0f09a00b54f90', | ||
s: '0x27a79140ccfe1b585edf22fcbc80938aabcb2e3ae2eca1d2e5ec16057cae16b5', | ||
typeHex: '0x2' | ||
}; | ||
exports.WITHDRAW_ETH = { | ||
blockHash: '0xb9c8af8a3b087b9fa819ac8db7c8d0b0f807c0a35fcf7299acf26c2b645c7190', | ||
blockNumber: '128390343', | ||
from: '0xbfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a', | ||
gas: '1904633', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0xae9c37671cc94cd9e4487a23b62c93c606601f7a1d5b751d7f2d8a71dc4f65ef', | ||
input: '0x1186ec33000000000000000000000000bfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000214e8348c4f000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000073d8914cdcabc00000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '150000000000000000', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '0', | ||
r: '0xa4bbc679bc5fd22ec05f999e34ee0ed0a3412e364ff4c52523a0288d742ae81', | ||
s: '0x52f9b069de9660c17f9d33bc134623e75d6027af233ccdc8b157e0077f859ee4', | ||
typeHex: '0x2', | ||
var WITHDRAW_ETH = exports.WITHDRAW_ETH = { | ||
blockHash: '0xb9c8af8a3b087b9fa819ac8db7c8d0b0f807c0a35fcf7299acf26c2b645c7190', | ||
blockNumber: '128390343', | ||
from: '0xbfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a', | ||
gas: '1904633', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0xae9c37671cc94cd9e4487a23b62c93c606601f7a1d5b751d7f2d8a71dc4f65ef', | ||
input: '0x1186ec33000000000000000000000000bfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000214e8348c4f000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000073d8914cdcabc00000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '150000000000000000', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '0', | ||
r: '0xa4bbc679bc5fd22ec05f999e34ee0ed0a3412e364ff4c52523a0288d742ae81', | ||
s: '0x52f9b069de9660c17f9d33bc134623e75d6027af233ccdc8b157e0077f859ee4', | ||
typeHex: '0x2' | ||
}; | ||
var BRIDGE_ERC = { | ||
transaction: { | ||
chainId: 10, | ||
from: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
to: '0x6f26bf09b1c792e3228e5467807a900a503c0281', | ||
hash: '0x837959755dde49584e12e4400175c22a43a4e5bf83cf2253a03e1321b74a0a03', | ||
input: '0x1186ec33000000000000000000000000865c301c46d64de5c9b124ec1a97ef1efc1bcbd10000000000000000000000007f5c764cbc14f9669b88837ca1490cca17c316070000000000000000000000000000000000000000000000000000000000e4e1c0000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000003b97cea0ddf8b000000000000000000000000000000000000000000000000000000006628437b0000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '0' | ||
}, | ||
params: { | ||
sourceChainId: _questdkPluginUtils.Chains.OPTIMISM, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
tokenAddress: '0x7f5c764cbc14f9669b88837ca1490cca17c31607', | ||
amount: (0, _questdk.GreaterThanOrEqual)((0, _viem.parseUnits)('15', 6)), | ||
recipient: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1' | ||
} | ||
}; | ||
var BRIDGE_ETH = { | ||
transaction: { | ||
chainId: 8453, | ||
from: '0xeb01d9ef642c54f42a36fd3a80b66f0fcb13e92a', | ||
to: '0xb4a8d45647445ea9fc3e1058096142390683dbc2', | ||
hash: '0x4dc56a3e4695313e32604d9b5e45fa154689c3b60a5c5d145d8307e0383433be', | ||
input: '0xe0db3fcf00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64000000000000000000000000eb01d9ef642c54f42a36fd3a80b66f0fcb13e92a00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000007ce66c50e2840000000000000000000000000000000000000000000000000000000000000000a4b100000000000000000000000000000000000000000000000000010b02ec41d5a3000000000000000000000000000000000000000000000000000000006628437b0000000000000000000000000000000000000000000000000000000000000120ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '9000000000000000000' | ||
}, | ||
params: { | ||
sourceChainId: _questdkPluginUtils.Chains.BASE, | ||
destinationChainId: _questdkPluginUtils.Chains.ARBITRUM_ONE, | ||
tokenAddress: _viem.zeroAddress, | ||
amount: (0, _questdk.GreaterThanOrEqual)((0, _viem.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_ERC, 'when amount is "any"', { | ||
amount: undefined | ||
}), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when token is "any"', { | ||
amount: undefined, | ||
recipient: undefined | ||
})]; | ||
var failingTestCases = exports.failingTestCases = [(0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when amount is insufficient', { | ||
amount: (0, _questdk.GreaterThanOrEqual)((0, _viem.parseEther)('16')) | ||
}), (0, _questdkPluginUtils.createTestCase)(BRIDGE_ERC, 'when token address is wrong', { | ||
tokenAddress: '0x7f5c764cbc14f9669b88837ca1490cca17c31608' | ||
})]; | ||
//# sourceMappingURL=test-transactions.js.map |
@@ -1,19 +0,82 @@ | ||
export const ACROSS_BRIDGE_ABI = [ | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'recipient', type: 'address' }, | ||
{ internalType: 'address', name: 'originToken', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'destinationChainId', type: 'uint256' }, | ||
{ internalType: 'int64', name: 'relayerFeePct', type: 'int64' }, | ||
{ internalType: 'uint32', name: 'quoteTimestamp', type: 'uint32' }, | ||
{ internalType: 'bytes', name: 'message', type: 'bytes' }, | ||
{ internalType: 'uint256', name: 'maxCount', type: 'uint256' }, | ||
], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
]; | ||
export const ACROSS_BRIDGE_ABI = [{ | ||
inputs: [{ | ||
internalType: 'address', | ||
name: 'recipient', | ||
type: 'address' | ||
}, { | ||
internalType: 'address', | ||
name: 'originToken', | ||
type: 'address' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'amount', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'destinationChainId', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'int64', | ||
name: 'relayerFeePct', | ||
type: 'int64' | ||
}, { | ||
internalType: 'uint32', | ||
name: 'quoteTimestamp', | ||
type: 'uint32' | ||
}, { | ||
internalType: 'bytes', | ||
name: 'message', | ||
type: 'bytes' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'maxCount', | ||
type: 'uint256' | ||
}], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function' | ||
}, { | ||
inputs: [{ | ||
internalType: 'contract SpokePoolInterface', | ||
name: 'spokePool', | ||
type: 'address' | ||
}, { | ||
internalType: 'address', | ||
name: 'recipient', | ||
type: 'address' | ||
}, { | ||
internalType: 'address', | ||
name: 'originToken', | ||
type: 'address' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'amount', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'destinationChainId', | ||
type: 'uint256' | ||
}, { | ||
internalType: 'int64', | ||
name: 'relayerFeePct', | ||
type: 'int64' | ||
}, { | ||
internalType: 'uint32', | ||
name: 'quoteTimestamp', | ||
type: 'uint32' | ||
}, { | ||
internalType: 'bytes', | ||
name: 'message', | ||
type: 'bytes' | ||
}, { | ||
internalType: 'uint256', | ||
name: 'maxCount', | ||
type: 'uint256' | ||
}], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function' | ||
}]; | ||
//# sourceMappingURL=abi.js.map |
@@ -0,28 +1,36 @@ | ||
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 { compressJson } from '@rabbitholegg/questdk'; | ||
import {} from 'viem'; | ||
import { CHAIN_ID_ARRAY } from './chain-ids.js'; | ||
import { ACROSS_BRIDGE_ABI } from './abi.js'; | ||
import { CHAIN_TO_CONTRACT } from './chain-to-contract.js'; | ||
export const bridge = async (bridge) => { | ||
// This is the information we'll use to compose the Transaction object | ||
const { sourceChainId, destinationChainId, tokenAddress, amount, recipient } = bridge; | ||
// We always want to return a compressed JSON object which we'll transform into a TransactionFilter | ||
return compressJson({ | ||
chainId: sourceChainId, // The chainId of the source chain | ||
to: CHAIN_TO_CONTRACT[sourceChainId], // The contract address of the bridge | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, // The ABI of the bridge contract | ||
recipient: recipient, // The recipient of the funds | ||
destinationChainId: destinationChainId, // The chainId of the destination chain | ||
amount: amount, // The amount of tokens to send | ||
originToken: tokenAddress, // The token address of the token to send | ||
}, // The input object is where we'll put the ABI and the parameters | ||
}); | ||
import { CHAIN_TO_TOKENS } from '@rabbitholegg/questdk-plugin-utils'; | ||
import { zeroAddress } from 'viem'; | ||
export const bridge = async bridge => { | ||
const { | ||
sourceChainId, | ||
destinationChainId, | ||
tokenAddress, | ||
amount, | ||
recipient | ||
} = bridge; | ||
const isNative = tokenAddress === zeroAddress; | ||
const tokenIn = isNative ? CHAIN_TO_WETH[sourceChainId] : tokenAddress; | ||
const bridgeContract = isNative ? CHAIN_TO_SPOKE_VERIFIER[sourceChainId] : CHAIN_TO_SPOKEPOOL[sourceChainId]; | ||
return compressJson({ | ||
chainId: sourceChainId, | ||
to: bridgeContract, | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: recipient, | ||
destinationChainId: destinationChainId, | ||
amount: amount, | ||
originToken: tokenIn | ||
} | ||
}); | ||
}; | ||
export const getSupportedTokenAddresses = async (_chainId) => { | ||
return []; | ||
export const getSupportedTokenAddresses = async _chainId => { | ||
return CHAIN_TO_TOKENS[_chainId] ?? []; | ||
}; | ||
export const getSupportedChainIds = async () => { | ||
return CHAIN_ID_ARRAY; | ||
return CHAIN_ID_ARRAY; | ||
}; | ||
//# sourceMappingURL=Across.js.map |
@@ -1,15 +0,3 @@ | ||
export const ETH_CHAIN_ID = 1; | ||
export const OPTIMISM_CHAIN_ID = 10; | ||
export const ARBITRUM_CHAIN_ID = 42161; | ||
export const ZKSYNC_CHAIN_ID = 324; | ||
export const BASE_CHAIN_ID = 8453; | ||
export const POLYGON_CHAIN_ID = 137; | ||
export const CHAIN_ID_ARRAY = [ | ||
ETH_CHAIN_ID, | ||
POLYGON_CHAIN_ID, | ||
OPTIMISM_CHAIN_ID, | ||
ARBITRUM_CHAIN_ID, | ||
ZKSYNC_CHAIN_ID, | ||
BASE_CHAIN_ID, | ||
]; | ||
import { Chains } from '@rabbitholegg/questdk-plugin-utils'; | ||
export const CHAIN_ID_ARRAY = [Chains.ETHEREUM, Chains.POLYGON_POS, Chains.OPTIMISM, Chains.ARBITRUM_ONE, Chains.ZK_SYNC_ERA, Chains.BASE, Chains.LINEA]; | ||
//# sourceMappingURL=chain-ids.js.map |
@@ -1,11 +0,11 @@ | ||
import { PluginActionNotImplementedError, } from '@rabbitholegg/questdk'; | ||
import { bridge, getSupportedChainIds, getSupportedTokenAddresses, } from './Across.js'; | ||
import { bridge, getSupportedChainIds, getSupportedTokenAddresses } from './Across.js'; | ||
import { PluginActionNotImplementedError } from '@rabbitholegg/questdk'; | ||
export const Across = { | ||
pluginId: 'across', | ||
getSupportedTokenAddresses, | ||
getSupportedChainIds, | ||
bridge, | ||
swap: async () => new PluginActionNotImplementedError(), | ||
mint: async () => new PluginActionNotImplementedError(), | ||
pluginId: 'across', | ||
getSupportedTokenAddresses, | ||
getSupportedChainIds, | ||
bridge, | ||
swap: async () => new PluginActionNotImplementedError(), | ||
mint: async () => new PluginActionNotImplementedError() | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
{"type":"module","sideEffects":false} | ||
{"type":"module"} |
@@ -0,87 +1,135 @@ | ||
import { GreaterThanOrEqual } from '@rabbitholegg/questdk'; | ||
import { Chains, createTestCase } from '@rabbitholegg/questdk-plugin-utils'; | ||
import { parseEther, parseUnits, zeroAddress } from 'viem'; | ||
export const DEPOSIT_ETH = { | ||
type: 'eip2930', | ||
blockHash: '0xb5a7ec990a7a38327d3561bbbb9be5511a3169d47fad94ce934ac1fb17a671ba', | ||
blockNumber: '18073017', | ||
from: '0xe751378ec5e5c0b64c4d16a077e8f11fbcfc958a', | ||
gas: '71783', | ||
hash: '0xa90420546af9facb433464c7d6de24dee62b63ec5eff9e542ccc54a7c1be0e1c', | ||
input: '0x1186ec33000000000000000000000000e751378ec5e5c0b64c4d16a077e8f11fbcfc958a000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000461977a33974000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000002a6fefb6a42ce0000000000000000000000000000000000000000000000000000000064f79f040000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 457, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 49, | ||
value: '315700000000000000', | ||
v: '1', | ||
r: '0xde2ae6267d6e595c4165281efd2e1de003fce554919a353d08c4ae106a3c0324', | ||
s: '0x77d0b71828a34bb7e747f8cf729fcd9565c46a8c44a589626d123c526120b88', | ||
gasPrice: '28469577825', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x1', | ||
type: 'eip2930', | ||
blockHash: '0xb5a7ec990a7a38327d3561bbbb9be5511a3169d47fad94ce934ac1fb17a671ba', | ||
blockNumber: '18073017', | ||
from: '0xe751378ec5e5c0b64c4d16a077e8f11fbcfc958a', | ||
gas: '71783', | ||
hash: '0xa90420546af9facb433464c7d6de24dee62b63ec5eff9e542ccc54a7c1be0e1c', | ||
input: '0x1186ec33000000000000000000000000e751378ec5e5c0b64c4d16a077e8f11fbcfc958a000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000461977a33974000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000002a6fefb6a42ce0000000000000000000000000000000000000000000000000000000064f79f040000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 457, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 49, | ||
value: '315700000000000000', | ||
v: '1', | ||
r: '0xde2ae6267d6e595c4165281efd2e1de003fce554919a353d08c4ae106a3c0324', | ||
s: '0x77d0b71828a34bb7e747f8cf729fcd9565c46a8c44a589626d123c526120b88', | ||
gasPrice: '28469577825', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x1' | ||
}; | ||
export const DEPOSIT_ERC20 = { | ||
type: 'eip1559', | ||
blockHash: '0xe5f73d3f81f334e993ee2a1f2c3742a220ddb892c7d48f1b5035dd7c08141702', | ||
blockNumber: '18070429', | ||
from: '0xb3b873a999cff617307a351e32a3dd7a94add5b2', | ||
gas: '85063', | ||
hash: '0x1d27d0bd0b8bc1894f8e3b30fdb527f2a3d8eee2efaf6d43d23af05f4c7c976b', | ||
input: '0x1186ec33000000000000000000000000b3b873a999cff617307a351e32a3dd7a94add5b2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000890000000000000000000000000000000000000000000000000001298f33a194000000000000000000000000000000000000000000000000000000000064f720740000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 1, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 77, | ||
value: '0', | ||
v: '0', | ||
r: '0x6c84f45cf1dfefd4cdad59e02d24bfe615a6dd32ebbd339906c8f2eb6e77cff6', | ||
s: '0x77e2399b01e2ee8d05be7171513a5011d0900536d532e4b40128d927ed41ad77', | ||
gasPrice: '12517677963', | ||
maxFeePerGas: '14750000000', | ||
maxPriorityFeePerGas: '450000000', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x2', | ||
type: 'eip1559', | ||
blockHash: '0xe5f73d3f81f334e993ee2a1f2c3742a220ddb892c7d48f1b5035dd7c08141702', | ||
blockNumber: '18070429', | ||
from: '0xb3b873a999cff617307a351e32a3dd7a94add5b2', | ||
gas: '85063', | ||
hash: '0x1d27d0bd0b8bc1894f8e3b30fdb527f2a3d8eee2efaf6d43d23af05f4c7c976b', | ||
input: '0x1186ec33000000000000000000000000b3b873a999cff617307a351e32a3dd7a94add5b2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000890000000000000000000000000000000000000000000000000001298f33a194000000000000000000000000000000000000000000000000000000000064f720740000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 1, | ||
to: '0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5', | ||
transactionIndex: 77, | ||
value: '0', | ||
v: '0', | ||
r: '0x6c84f45cf1dfefd4cdad59e02d24bfe615a6dd32ebbd339906c8f2eb6e77cff6', | ||
s: '0x77e2399b01e2ee8d05be7171513a5011d0900536d532e4b40128d927ed41ad77', | ||
gasPrice: '12517677963', | ||
maxFeePerGas: '14750000000', | ||
maxPriorityFeePerGas: '450000000', | ||
chainId: 1, | ||
accessList: [], | ||
typeHex: '0x2' | ||
}; | ||
export const WITHDRAW_ERC20 = { | ||
blockHash: '0x88bb85e52cff52902327cd510708bb6c03c746f2785531a0d6a4cc87cf526bd6', | ||
blockNumber: '128390530', | ||
from: '0x49b887e3f64c7007e76f72c17ce29c7bcfb9af55', | ||
gas: '1936056', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0x0eed06fe27fcef1666d62ce9a0740eaf498ba94664588f3089b00602c930f23b', | ||
input: '0x1186ec3300000000000000000000000049b887e3f64c7007e76f72c17ce29c7bcfb9af55000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb90000000000000000000000000000000000000000000000000000000001312d000000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000585209cd1dc000000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '0', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '1', | ||
r: '0xac74be86881cc50d0204e8235a1b18296b9ecb79a76a38d905b0f09a00b54f90', | ||
s: '0x27a79140ccfe1b585edf22fcbc80938aabcb2e3ae2eca1d2e5ec16057cae16b5', | ||
typeHex: '0x2', | ||
blockHash: '0x88bb85e52cff52902327cd510708bb6c03c746f2785531a0d6a4cc87cf526bd6', | ||
blockNumber: '128390530', | ||
from: '0x49b887e3f64c7007e76f72c17ce29c7bcfb9af55', | ||
gas: '1936056', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0x0eed06fe27fcef1666d62ce9a0740eaf498ba94664588f3089b00602c930f23b', | ||
input: '0x1186ec3300000000000000000000000049b887e3f64c7007e76f72c17ce29c7bcfb9af55000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb90000000000000000000000000000000000000000000000000000000001312d000000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000585209cd1dc000000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 322, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '0', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '1', | ||
r: '0xac74be86881cc50d0204e8235a1b18296b9ecb79a76a38d905b0f09a00b54f90', | ||
s: '0x27a79140ccfe1b585edf22fcbc80938aabcb2e3ae2eca1d2e5ec16057cae16b5', | ||
typeHex: '0x2' | ||
}; | ||
export const WITHDRAW_ETH = { | ||
blockHash: '0xb9c8af8a3b087b9fa819ac8db7c8d0b0f807c0a35fcf7299acf26c2b645c7190', | ||
blockNumber: '128390343', | ||
from: '0xbfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a', | ||
gas: '1904633', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0xae9c37671cc94cd9e4487a23b62c93c606601f7a1d5b751d7f2d8a71dc4f65ef', | ||
input: '0x1186ec33000000000000000000000000bfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000214e8348c4f000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000073d8914cdcabc00000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '150000000000000000', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '0', | ||
r: '0xa4bbc679bc5fd22ec05f999e34ee0ed0a3412e364ff4c52523a0288d742ae81', | ||
s: '0x52f9b069de9660c17f9d33bc134623e75d6027af233ccdc8b157e0077f859ee4', | ||
typeHex: '0x2', | ||
blockHash: '0xb9c8af8a3b087b9fa819ac8db7c8d0b0f807c0a35fcf7299acf26c2b645c7190', | ||
blockNumber: '128390343', | ||
from: '0xbfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a', | ||
gas: '1904633', | ||
gasPrice: '100000000', | ||
maxFeePerGas: '135000000', | ||
maxPriorityFeePerGas: '0', | ||
hash: '0xae9c37671cc94cd9e4487a23b62c93c606601f7a1d5b751d7f2d8a71dc4f65ef', | ||
input: '0x1186ec33000000000000000000000000bfe7a294ced3ce8c33c22c4dcaa6fd4522d6d32a00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000214e8348c4f000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000073d8914cdcabc00000000000000000000000000000000000000000000000000000000064f7abe80000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
nonce: 18, | ||
to: '0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A', | ||
transactionIndex: 1, | ||
value: '150000000000000000', | ||
type: 'eip1559', | ||
accessList: [], | ||
chainId: 42161, | ||
v: '0', | ||
r: '0xa4bbc679bc5fd22ec05f999e34ee0ed0a3412e364ff4c52523a0288d742ae81', | ||
s: '0x52f9b069de9660c17f9d33bc134623e75d6027af233ccdc8b157e0077f859ee4', | ||
typeHex: '0x2' | ||
}; | ||
const BRIDGE_ERC = { | ||
transaction: { | ||
chainId: 10, | ||
from: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
to: '0x6f26bf09b1c792e3228e5467807a900a503c0281', | ||
hash: '0x837959755dde49584e12e4400175c22a43a4e5bf83cf2253a03e1321b74a0a03', | ||
input: '0x1186ec33000000000000000000000000865c301c46d64de5c9b124ec1a97ef1efc1bcbd10000000000000000000000007f5c764cbc14f9669b88837ca1490cca17c316070000000000000000000000000000000000000000000000000000000000e4e1c0000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000003b97cea0ddf8b000000000000000000000000000000000000000000000000000000006628437b0000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '0' | ||
}, | ||
params: { | ||
sourceChainId: Chains.OPTIMISM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: '0x7f5c764cbc14f9669b88837ca1490cca17c31607', | ||
amount: GreaterThanOrEqual(parseUnits('15', 6)), | ||
recipient: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1' | ||
} | ||
}; | ||
const BRIDGE_ETH = { | ||
transaction: { | ||
chainId: 8453, | ||
from: '0xeb01d9ef642c54f42a36fd3a80b66f0fcb13e92a', | ||
to: '0xb4a8d45647445ea9fc3e1058096142390683dbc2', | ||
hash: '0x4dc56a3e4695313e32604d9b5e45fa154689c3b60a5c5d145d8307e0383433be', | ||
input: '0xe0db3fcf00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64000000000000000000000000eb01d9ef642c54f42a36fd3a80b66f0fcb13e92a00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000007ce66c50e2840000000000000000000000000000000000000000000000000000000000000000a4b100000000000000000000000000000000000000000000000000010b02ec41d5a3000000000000000000000000000000000000000000000000000000006628437b0000000000000000000000000000000000000000000000000000000000000120ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
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_ERC, 'when amount is "any"', { | ||
amount: undefined | ||
}), createTestCase(BRIDGE_ERC, 'when token is "any"', { | ||
amount: undefined, | ||
recipient: undefined | ||
})]; | ||
export const failingTestCases = [createTestCase(BRIDGE_ERC, 'when amount is insufficient', { | ||
amount: GreaterThanOrEqual(parseEther('16')) | ||
}), createTestCase(BRIDGE_ERC, 'when token address is wrong', { | ||
tokenAddress: '0x7f5c764cbc14f9669b88837ca1490cca17c31608' | ||
})]; | ||
//# sourceMappingURL=test-transactions.js.map |
@@ -5,3 +5,3 @@ import { type BridgeActionParams } from '@rabbitholegg/questdk'; | ||
export declare const getSupportedTokenAddresses: (_chainId: number) => Promise<Address[]>; | ||
export declare const getSupportedChainIds: () => Promise<number[]>; | ||
export declare const getSupportedChainIds: () => Promise<import("@rabbitholegg/questdk-plugin-utils").Chains[]>; | ||
//# sourceMappingURL=Across.d.ts.map |
@@ -1,8 +0,3 @@ | ||
export declare const ETH_CHAIN_ID = 1; | ||
export declare const OPTIMISM_CHAIN_ID = 10; | ||
export declare const ARBITRUM_CHAIN_ID = 42161; | ||
export declare const ZKSYNC_CHAIN_ID = 324; | ||
export declare const BASE_CHAIN_ID = 8453; | ||
export declare const POLYGON_CHAIN_ID = 137; | ||
export declare const CHAIN_ID_ARRAY: number[]; | ||
import { Chains } from '@rabbitholegg/questdk-plugin-utils'; | ||
export declare const CHAIN_ID_ARRAY: Chains[]; | ||
//# sourceMappingURL=chain-ids.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { type BridgeActionParams } from '@rabbitholegg/questdk-plugin-utils'; | ||
export declare const DEPOSIT_ETH: { | ||
@@ -87,2 +88,4 @@ type: string; | ||
}; | ||
export declare const passingTestCases: import("@rabbitholegg/questdk-plugin-utils").TestCase<BridgeActionParams>[]; | ||
export declare const failingTestCases: import("@rabbitholegg/questdk-plugin-utils").TestCase<BridgeActionParams>[]; | ||
//# sourceMappingURL=test-transactions.d.ts.map |
{ | ||
"name": "@rabbitholegg/questdk-plugin-across", | ||
"version": "1.0.0-alpha.31", | ||
"version": "1.0.0-alpha.32", | ||
"type": "module", | ||
@@ -19,7 +19,7 @@ "exports": { | ||
"devDependencies": { | ||
"tsconfig": "0.0.1-alpha.0" | ||
"tsconfig": "0.1.0-alpha.1" | ||
}, | ||
"dependencies": { | ||
"@rabbitholegg/questdk-plugin-utils": "1.0.0-alpha.18", | ||
"@rabbitholegg/questdk": "2.0.0-alpha.44" | ||
"@rabbitholegg/questdk-plugin-utils": "1.0.0-alpha.19", | ||
"@rabbitholegg/questdk": "2.0.0-alpha.45" | ||
}, | ||
@@ -29,10 +29,12 @@ "scripts": { | ||
"bench:ci": "CI=true vitest bench", | ||
"build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", | ||
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'", | ||
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir ./dist/esm && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'", | ||
"build": "pnpm build:types && pnpm build:esm && pnpm postbuild:esm && pnpm build:cjs && pnpm postbuild:cjs && BABEL_ENV=esmBundled pnpm rollup -c", | ||
"build:esm": "BABEL_ENV=esmUnbundled babel src --extensions '.ts' --out-dir 'dist/esm' --source-maps", | ||
"build:cjs": "BABEL_ENV=cjs babel src --extensions '.ts' --out-dir 'dist/cjs' --source-maps", | ||
"build:types": "tsc --project tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", | ||
"clean": "rimraf dist", | ||
"postbuild:cjs": "echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", | ||
"postbuild:esm": "echo '{\"type\":\"module\"}' > dist/esm/package.json", | ||
"format": "rome format . --write", | ||
"lint": "rome check .", | ||
"lint:fix": "pnpm lint --apply", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"test": "vitest dev", | ||
@@ -39,0 +41,0 @@ "test:cov": "vitest dev --coverage", |
@@ -18,2 +18,23 @@ export const ACROSS_BRIDGE_ABI = [ | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: 'contract SpokePoolInterface', | ||
name: 'spokePool', | ||
type: 'address', | ||
}, | ||
{ internalType: 'address', name: 'recipient', type: 'address' }, | ||
{ internalType: 'address', name: 'originToken', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'destinationChainId', type: 'uint256' }, | ||
{ internalType: 'int64', name: 'relayerFeePct', type: 'int64' }, | ||
{ internalType: 'uint32', name: 'quoteTimestamp', type: 'uint32' }, | ||
{ internalType: 'bytes', name: 'message', type: 'bytes' }, | ||
{ internalType: 'uint256', name: 'maxCount', type: 'uint256' }, | ||
], | ||
name: 'deposit', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
] |
@@ -1,19 +0,16 @@ | ||
import { GreaterThanOrEqual, apply } from '@rabbitholegg/questdk/filter' | ||
import { describe, expect, test } from 'vitest' | ||
import { bridge } from './Across.js' | ||
import { ACROSS_BRIDGE_ABI } from './abi.js' | ||
import { CHAIN_TO_SPOKEPOOL } from './contracts.js' | ||
import { | ||
DEPOSIT_ERC20, | ||
DEPOSIT_ETH, | ||
DEPOSIT_ERC20, | ||
WITHDRAW_ERC20, | ||
WITHDRAW_ETH, | ||
WITHDRAW_ERC20, | ||
failingTestCases, | ||
passingTestCases, | ||
} from './test-transactions.js' | ||
import { | ||
ARBITRUM_CHAIN_ID, | ||
ETH_CHAIN_ID, | ||
POLYGON_CHAIN_ID, | ||
OPTIMISM_CHAIN_ID, | ||
} from './chain-ids.js' | ||
import { ACROSS_BRIDGE_ABI } from './abi.js' | ||
import { Chains } from '@rabbitholegg/questdk-plugin-utils' | ||
import { GreaterThanOrEqual, apply } from '@rabbitholegg/questdk/filter' | ||
import { parseEther } from 'viem' | ||
import { CHAIN_TO_CONTRACT } from './chain-to-contract.js' | ||
import { describe, expect, test } from 'vitest' | ||
@@ -27,3 +24,2 @@ export const WETH_ADRESS_MAINNET = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' | ||
// Random ETHEREUM address | ||
const TEST_USER = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' | ||
@@ -35,4 +31,4 @@ | ||
const filter = await bridge({ | ||
sourceChainId: ARBITRUM_CHAIN_ID, | ||
destinationChainId: ETH_CHAIN_ID, | ||
sourceChainId: Chains.ARBITRUM_ONE, | ||
destinationChainId: Chains.ETHEREUM, | ||
tokenAddress: USDT_ADDRESS_ARBITRUM, | ||
@@ -44,8 +40,8 @@ amount: GreaterThanOrEqual(100000n), | ||
expect(filter).to.deep.equal({ | ||
chainId: ARBITRUM_CHAIN_ID, | ||
to: CHAIN_TO_CONTRACT[ARBITRUM_CHAIN_ID], | ||
chainId: Chains.ARBITRUM_ONE, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ARBITRUM_ONE], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: ETH_CHAIN_ID, | ||
destinationChainId: Chains.ETHEREUM, | ||
amount: { | ||
@@ -61,4 +57,4 @@ $gte: '100000', | ||
const filter = await bridge({ | ||
sourceChainId: ETH_CHAIN_ID, | ||
destinationChainId: ARBITRUM_CHAIN_ID, | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: USDT_ADDRESS_MAINNET, | ||
@@ -70,8 +66,8 @@ amount: GreaterThanOrEqual(100000n), | ||
expect(filter).to.deep.equal({ | ||
chainId: ETH_CHAIN_ID, | ||
to: CHAIN_TO_CONTRACT[ETH_CHAIN_ID], | ||
chainId: Chains.ETHEREUM, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ETHEREUM], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: ARBITRUM_CHAIN_ID, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
amount: { | ||
@@ -87,4 +83,4 @@ $gte: '100000', | ||
const filter = await bridge({ | ||
sourceChainId: ETH_CHAIN_ID, | ||
destinationChainId: ARBITRUM_CHAIN_ID, | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: WETH_ADRESS_MAINNET, | ||
@@ -96,8 +92,8 @@ amount: GreaterThanOrEqual(100000n), | ||
expect(filter).to.deep.equal({ | ||
chainId: ETH_CHAIN_ID, | ||
to: CHAIN_TO_CONTRACT[ETH_CHAIN_ID], | ||
chainId: Chains.ETHEREUM, | ||
to: CHAIN_TO_SPOKEPOOL[Chains.ETHEREUM], | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: TEST_USER, | ||
destinationChainId: ARBITRUM_CHAIN_ID, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
amount: { | ||
@@ -115,4 +111,4 @@ $gte: '100000', | ||
const filter = await bridge({ | ||
sourceChainId: ETH_CHAIN_ID, | ||
destinationChainId: OPTIMISM_CHAIN_ID, | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.OPTIMISM, | ||
tokenAddress: WETH_ADRESS_MAINNET, | ||
@@ -127,4 +123,4 @@ amount: GreaterThanOrEqual(parseEther('.315')), | ||
const filter = await bridge({ | ||
sourceChainId: ARBITRUM_CHAIN_ID, | ||
destinationChainId: ETH_CHAIN_ID, | ||
sourceChainId: Chains.ARBITRUM_ONE, | ||
destinationChainId: Chains.ETHEREUM, | ||
tokenAddress: WETH_ADDRESS_ARBITRUM, | ||
@@ -139,4 +135,4 @@ amount: GreaterThanOrEqual(parseEther('.15')), | ||
const filter = await bridge({ | ||
sourceChainId: ETH_CHAIN_ID, | ||
destinationChainId: POLYGON_CHAIN_ID, | ||
sourceChainId: Chains.ETHEREUM, | ||
destinationChainId: Chains.POLYGON_POS, | ||
tokenAddress: USDT_ADDRESS_MAINNET, | ||
@@ -151,4 +147,4 @@ amount: GreaterThanOrEqual('9900000'), // $250 USDC, | ||
const filter = await bridge({ | ||
sourceChainId: ARBITRUM_CHAIN_ID, | ||
destinationChainId: POLYGON_CHAIN_ID, | ||
sourceChainId: Chains.ARBITRUM_ONE, | ||
destinationChainId: Chains.POLYGON_POS, | ||
tokenAddress: USDT_ADDRESS_ARBITRUM, | ||
@@ -162,3 +158,21 @@ amount: GreaterThanOrEqual('19000000'), | ||
test('should not pass filter with invalid transactions', () => {}) | ||
describe('should pass filter with valid transactions', () => { | ||
passingTestCases.forEach((testCase) => { | ||
const { transaction, description, params } = testCase | ||
test(description, async () => { | ||
const filter = await bridge(params) | ||
expect(apply(transaction, filter)).to.be.true | ||
}) | ||
}) | ||
}) | ||
describe('should not pass filter with invalid transactions', () => { | ||
failingTestCases.forEach((testCase) => { | ||
const { transaction, description, params } = testCase | ||
test(description, async () => { | ||
const filter = await bridge(params) | ||
expect(apply(transaction, filter)).to.be.false | ||
}) | ||
}) | ||
}) | ||
}) |
@@ -0,22 +1,32 @@ | ||
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 { type BridgeActionParams, compressJson } from '@rabbitholegg/questdk' | ||
import { type Address } from 'viem' | ||
import { CHAIN_ID_ARRAY } from './chain-ids.js' | ||
import { ACROSS_BRIDGE_ABI } from './abi.js' | ||
import { CHAIN_TO_CONTRACT } from './chain-to-contract.js' | ||
import { CHAIN_TO_TOKENS } from '@rabbitholegg/questdk-plugin-utils' | ||
import { type Address, zeroAddress } from 'viem' | ||
export const bridge = async (bridge: BridgeActionParams) => { | ||
// This is the information we'll use to compose the Transaction object | ||
const { sourceChainId, destinationChainId, tokenAddress, amount, recipient } = | ||
bridge | ||
// We always want to return a compressed JSON object which we'll transform into a TransactionFilter | ||
const isNative = tokenAddress === zeroAddress | ||
const tokenIn = isNative ? CHAIN_TO_WETH[sourceChainId] : tokenAddress | ||
const bridgeContract = isNative | ||
? CHAIN_TO_SPOKE_VERIFIER[sourceChainId] | ||
: CHAIN_TO_SPOKEPOOL[sourceChainId] | ||
return compressJson({ | ||
chainId: sourceChainId, // The chainId of the source chain | ||
to: CHAIN_TO_CONTRACT[sourceChainId], // The contract address of the bridge | ||
chainId: sourceChainId, | ||
to: bridgeContract, | ||
input: { | ||
$abi: ACROSS_BRIDGE_ABI, // The ABI of the bridge contract | ||
recipient: recipient, // The recipient of the funds | ||
destinationChainId: destinationChainId, // The chainId of the destination chain | ||
amount: amount, // The amount of tokens to send | ||
originToken: tokenAddress, // The token address of the token to send | ||
}, // The input object is where we'll put the ABI and the parameters | ||
$abi: ACROSS_BRIDGE_ABI, | ||
recipient: recipient, | ||
destinationChainId: destinationChainId, | ||
amount: amount, | ||
originToken: tokenIn, | ||
}, | ||
}) | ||
@@ -28,3 +38,3 @@ } | ||
): Promise<Address[]> => { | ||
return [] | ||
return CHAIN_TO_TOKENS[_chainId] ?? [] | ||
} | ||
@@ -31,0 +41,0 @@ |
@@ -1,14 +0,11 @@ | ||
export const ETH_CHAIN_ID = 1 | ||
export const OPTIMISM_CHAIN_ID = 10 | ||
export const ARBITRUM_CHAIN_ID = 42161 | ||
export const ZKSYNC_CHAIN_ID = 324 | ||
export const BASE_CHAIN_ID = 8453 | ||
export const POLYGON_CHAIN_ID = 137 | ||
import { Chains } from '@rabbitholegg/questdk-plugin-utils' | ||
export const CHAIN_ID_ARRAY = [ | ||
ETH_CHAIN_ID, | ||
POLYGON_CHAIN_ID, | ||
OPTIMISM_CHAIN_ID, | ||
ARBITRUM_CHAIN_ID, | ||
ZKSYNC_CHAIN_ID, | ||
BASE_CHAIN_ID, | ||
Chains.ETHEREUM, | ||
Chains.POLYGON_POS, | ||
Chains.OPTIMISM, | ||
Chains.ARBITRUM_ONE, | ||
Chains.ZK_SYNC_ERA, | ||
Chains.BASE, | ||
Chains.LINEA, | ||
] |
import { | ||
type IActionPlugin, | ||
PluginActionNotImplementedError, | ||
} from '@rabbitholegg/questdk' | ||
import { | ||
bridge, | ||
@@ -10,2 +6,7 @@ getSupportedChainIds, | ||
} from './Across.js' | ||
import { | ||
type IActionPlugin, | ||
PluginActionNotImplementedError, | ||
} from '@rabbitholegg/questdk' | ||
export const Across: IActionPlugin = { | ||
@@ -12,0 +13,0 @@ pluginId: 'across', |
@@ -0,1 +1,10 @@ | ||
import { GreaterThanOrEqual } from '@rabbitholegg/questdk' | ||
import { | ||
type BridgeActionParams, | ||
Chains, | ||
type TestParams, | ||
createTestCase, | ||
} from '@rabbitholegg/questdk-plugin-utils' | ||
import { parseEther, parseUnits, zeroAddress } from 'viem' | ||
export const DEPOSIT_ETH = { | ||
@@ -95,1 +104,58 @@ type: 'eip2930', | ||
} | ||
const BRIDGE_ERC: TestParams<BridgeActionParams> = { | ||
transaction: { | ||
chainId: 10, | ||
from: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
to: '0x6f26bf09b1c792e3228e5467807a900a503c0281', | ||
hash: '0x837959755dde49584e12e4400175c22a43a4e5bf83cf2253a03e1321b74a0a03', | ||
input: | ||
'0x1186ec33000000000000000000000000865c301c46d64de5c9b124ec1a97ef1efc1bcbd10000000000000000000000007f5c764cbc14f9669b88837ca1490cca17c316070000000000000000000000000000000000000000000000000000000000e4e1c0000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000003b97cea0ddf8b000000000000000000000000000000000000000000000000000000006628437b0000000000000000000000000000000000000000000000000000000000000100ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
value: '0', | ||
}, | ||
params: { | ||
sourceChainId: Chains.OPTIMISM, | ||
destinationChainId: Chains.ARBITRUM_ONE, | ||
tokenAddress: '0x7f5c764cbc14f9669b88837ca1490cca17c31607', | ||
amount: GreaterThanOrEqual(parseUnits('15', 6)), | ||
recipient: '0x865c301c46d64de5c9b124ec1a97ef1efc1bcbd1', | ||
}, | ||
} | ||
const BRIDGE_ETH: TestParams<BridgeActionParams> = { | ||
transaction: { | ||
chainId: 8453, | ||
from: '0xeb01d9ef642c54f42a36fd3a80b66f0fcb13e92a', | ||
to: '0xb4a8d45647445ea9fc3e1058096142390683dbc2', | ||
hash: '0x4dc56a3e4695313e32604d9b5e45fa154689c3b60a5c5d145d8307e0383433be', | ||
input: | ||
'0xe0db3fcf00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64000000000000000000000000eb01d9ef642c54f42a36fd3a80b66f0fcb13e92a00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000007ce66c50e2840000000000000000000000000000000000000000000000000000000000000000a4b100000000000000000000000000000000000000000000000000010b02ec41d5a3000000000000000000000000000000000000000000000000000000006628437b0000000000000000000000000000000000000000000000000000000000000120ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000', | ||
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_ERC, 'when amount is "any"', { amount: undefined }), | ||
createTestCase(BRIDGE_ERC, 'when token is "any"', { | ||
amount: undefined, | ||
recipient: undefined, | ||
}), | ||
] | ||
export const failingTestCases = [ | ||
createTestCase(BRIDGE_ERC, 'when amount is insufficient', { | ||
amount: GreaterThanOrEqual(parseEther('16')), | ||
}), | ||
createTestCase(BRIDGE_ERC, 'when token address is wrong', { | ||
tokenAddress: '0x7f5c764cbc14f9669b88837ca1490cca17c31608', | ||
}), | ||
] |
@@ -12,8 +12,6 @@ { | ||
"compilerOptions": { | ||
"declaration": true, | ||
"declarationDir": "./dist/types", | ||
"resolveJsonModule": true, | ||
"sourceMap": true, | ||
"rootDir": "./src" | ||
"rootDir": "./src", | ||
} | ||
} |
{ | ||
"extends": "tsconfig/base.json", | ||
"include": ["src/**/*", "src/chain-data.ts"], | ||
"include": ["src/*"], | ||
"exclude": ["dist", "build", "node_modules"] | ||
} |
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
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
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
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
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
2371803
14217
81
1
+ Added@rabbitholegg/questdk@2.0.0-alpha.45(transitive)
+ Added@rabbitholegg/questdk-plugin-utils@1.0.0-alpha.19(transitive)
- Removed@rabbitholegg/questdk@2.0.0-alpha.44(transitive)
- Removed@rabbitholegg/questdk-plugin-utils@1.0.0-alpha.18(transitive)