Skip to content

Commit

Permalink
fix(ario): re-add contract default config
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Mar 18, 2024
1 parent 134319b commit 2296cc3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/common/ar-io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { ARNS_TESTNET_REGISTRY_TX } from '../constants.js';
import {
ArIOContract,
ArIOState,
Expand Down Expand Up @@ -46,7 +47,14 @@ function isContractTxIdConfiguration(
export class ArIO implements ArIOContract {
private contract: SmartWeaveContract<ArIOState>;

constructor(config: ContractConfiguration) {
constructor(
config: ContractConfiguration = {
// default to a contract that uses the arns service to do the evaluation
contract: new RemoteContract<ArIOState>({
contractTxId: ARNS_TESTNET_REGISTRY_TX,
}),
},
) {
if (isContractConfiguration<ArIOState>(config)) {
this.contract = config.contract;
} else if (isContractTxIdConfiguration(config)) {
Expand Down

0 comments on commit 2296cc3

Please sign in to comment.